Wednesday, September 1st, 2010
Google Rich Snippet
Oli Studholme has an excellent new article on HTML5 Doctor on the different ways HTML5 can be extended with things like microformats, the link tag, and more. Why would you want to do this?
While HTML5 has a bunch of semantic elements, including new ones like
<nav>, sometimes there just isn’t an element with the right meaning. What we want are ways to extend what we’ve got, to add extra semantics that are machine-readable — data that a browser, script, or robot can use.
First, he starts with the options HTML4 gave us and what options we now have with HTML5:
There were five fundamental ways we could extend HTML 4:
revhas fallen by the wayside, becoming obsolete since hardly anyone used it correctly, and because it can be replaced by
profileis also obsolete, and there is no support for namespaces in HTML5. However,
relare all in HTML5. In fact,
<meta>now has spec-defined
names and a way to submit new
relhas several new link types defined in the HTML5 specification and a way to submit more too.
Even better, WAI–ARIA’s
aria-*attributes are allowed in HTML5, and HTML5 validators can check HTML5+ ARIA. Other new methods of extending HTML5 include custom data attributes (
data-*), microdata, and RDFa. Guest doctor Chris Bewick introduced us to HTML5’s new
Finally there are microformats. As Dr. Bruce touched on microformats in his article on the
<time>element, let’s delve a little deeper into what microformats are and how to use them in HTML5.
Oli then does a great deep dive of microformats, going over the different ones defined by the community to date (there are 33 microformat specifications!) and covering some of the common patterns that you can use if you need to roll your own microformat. If you’ve been wondering how to use things like hCard, hCalendar, XHTML Friends Network (XFN), etc. in your own systems then definitely give this article a gander.
Posted by Brad Neuberg at 5:30 am