How can you help the realize Tim Berners-Lee's vision of the semantic web? Developers know to separate semantics (HTML) from presentation (CSS), but what specifically are the best current solutions for tagging the meaning of content, and what is the case for using them? This talk will discuss the evolving HTML5 and JSON-LD microdata specifications, and show sample code using these elements and attributes in blog and commerce web pages.
11. Semantic HTML5
Content Grouping Elements
<p>Paragraph</p>
<ul>
<li>List Item #1</li>
<li>List Item #2</li>
</ul>
Also ordered list, description list, blockquote,
figure
Use to group content within a section
They create line breaks by default in display
12. Semantic HTML5
Text-Level Elements
<strong>important</strong>
<b>keyword</b> or <b>article lede</b>
<em>emphasized</em>
<cite>book title</cite>
<i lang="fr">c'est la vie</i>
<small>fine print</small>
<s>inaccurate, outdated $3.99</s>
Group words, phrases, or other content parts
They do not create line breaks
13. Semantic HTML5
<article id=“filmreview”>
<header>
<h1>Avatar</h1>
<span class=“author”>Roger Ebert</span>
<time datetime=“2009-12-11”>December 11,
2009</time>
</header>
<p class=“review”><b class=“lede”>Watching
<cite>Avatar</cite>, I felt sort of the same as when I
saw <cite>Star Wars</cite> in 1977. </b></p>
</article>
22. Semantic Web
Discovery / Analysis example:
Show me Roger Ebert’s favorite films with an Asian director of
photography.
Agent / Automation example (schema.org Actions):
Purchase tickets and load directions into my device for a movie
playing in a theater today, near my current location, that fits my
taste in film.
23. Other Semantic Concepts
WAI-ARIA Roles (accessibility)
<form role=“search”>
Wikidata (public database, name-value pairs)
London /wiki/Q84: Area is 1572 Square Kilometers
24. Other Semantic Concepts
RDF (Subject-Predicate-Object “Triplet”
Expressions)
Ferrari Is Car
OWL (Web Ontology Language)
DataPropertyAssertion
( :hasAge :John "51"^^xsd:integer )
SPARQL (SQL-like Query Language for RDF
Graphs)
25. Other Semantic Concepts
SKOS (Simple Knowledge Organization
System)
Concept, definition, example, broader,
narrower
JSKSOS (JSON-LD structure for encoding
SKOS)
26. WEB SEMANTICS
David Kelleher Ski PHP ‘16 www.davidk.net
David Kelleher
http://www.davidk.net
https://joind.in/talk/3783e