Created by
"Leaving aside the artificial intelligence problem of training machines to behave like people, the Semantic Web approach instead develops languages for expressing information in a machine processable form"Semantic Web Road map by Tim Berners-Lee, 1998
"Semantic Web only indicates a machine's ability to solve a well-defined problem by performing well-defined operations on existing well-defined data. Instead of asking machines to understand people's language, it involves asking people to make the extra effort"What Semantic Web is Not (TBL, 1998)
<person>, <developer>, ...
will be ignored by the browsers.
<tag data-something="value"></tag>
<!-- or if we need a boolean data-attribute (i.e. 'on'/'off') -->
<tag data-something></tag>
<li data-isbn="0385333498" data-book-id='1'>The Sirens of Titan</li>
<li data-isbn="0141189347" data-book-id="2" data-selected>Cat's Cradle</li>
class
/id
attribute is for stylingdata-*
attributes as we needdata-*
values in JavaScriptSee the Pen data-* attributes with pseudo-elements by Iva Popova (@webdesigncourse) on CodePen.
Example from Styled Tooltips Using Psuedo Elements by CSS-Tricks Team (@css-tricks) on CodePen.
// read data-something value
let valueSomething = element.dataset.something;
// write to data-something value
element.dataset.something = 'xyz'
// read data-something-else value
let valueSomethingElse = element.dataset.somethingElse;
// write to data-something-else value
element.dataset.somethingElse = 9;
Note, that when the part after data-
prefix contains dashes it is converted to Camel Case and dashes are removed.
See the Pen read/write data-* attributes by Iva Popova (@webdesigncourse) on CodePen.
See the Pen Access data-* with JS by Iva Popova (@webdesigncourse) on CodePen.
data-genre
attribute.data-track_lenght
attribute for each track.These slides are based on
customised version of
framework