In HTML most tags are semantic: that is, they carry meaning, but there is no way to provide meaning for every piece of content. This impoverishes the web: machine-readable tags that provide context make for a richer, more semantic internet. But short of an XML utopia, there's no way to cover every possibility.
Instead, there are several measures that add to, or extend, the semantics of web pages:
- Microformats extend tags via special values for
idattributes. Microformats have strong support by Google, Facebook and YouTube through schemas like hcard (to represent people, companies, organizations, and places), calendar (for events), recipe, and XFN (to diagram relationships between people).
- RDFa is another means of providing context to tags via values added to
classattributes, currently used to indicate Creative Commons licenses, amongst other purposes.
- Unlike meta tags, microdata is written in the body of an HTML document; unlike microformats and RDFa, it does not abuse
class, instead using attributes such as
item type, with established, central schemas such as schema.org and data-vocabulary.org.
Which system you use depends on what you are trying to do:
- Want to add a Creative Commons license?
- Use RDFa, plus a public notification.
- Making a HTML page?
- Use microdata, adding meta tags and RDFa as they are supported.
Photograph by Eli Christman, used under a Creative Commons Attribution 2.0 Generic license
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.