Update (November 12th 2011): Read a reply by Jeremy Keith1 to this article in which he strongly argues about the importance of pursuing semantic value and addresses issues discussed in the article as well as in the comments here on Smashing Magazine.
Disclaimer: This article is published in the Opinion column section in which we provide active members of the community with the opportunity to share their thoughts and ideas publicly. Do you agree with the author? Please leave a comment. And if you disagree, would you like to write a rebuttal or counter piece? Leave a comment, too, and we will get back to you! Thank you.
Meta-utopia is a world of reliable meta data. When poisoning the well confers benefits to the poisoners, the meta-waters get awfully toxic in short order.
Allow me to paint a picture:
- You are busy creating a website.
- You have a thought, “Oh, now I have to add an element.”
- Then another thought, “I feel so guilty adding a
div. Div-itis is terrible, I hear.”
- Then, “I should use something else. The
asideelement might be appropriate.”
- Three searches and five articles later, you’re fairly confident that
asideis not semantically correct.
- You decide on
article, because at least it’s not a
- You’ve wasted 40 minutes, with no tangible benefit to show for it.
This Just Straight Up Sucks
Mark-up structures content, but your choice of tags matters a lot less than we’ve been taught for a while. Let’s go through some of the reasons why.
The Web No Longer Consists Of Structured Content
In the golden days of the Web, Web pages were supposed to be repositories of information and meaning, nothing more. Today, the Web has content, but meaning is derived from users’ interactions with it.
XML, RDFA, Dublin Core and other structured specifications have very solid use cases, but those use cases do not account for the majority of interactions6 on the Web. Heck, no website really has the purity of semantic mark-up that such specifications demand. Mark Pilgrim writes about this7 much better than I do.
If you have content that demands semantic purity — such as a library database, a document that needs a table of contents, or an online book (i.e. anything for which semantic purity makes sense) — then by all means stick to the HTML5 outlining algorithm, and split hairs on which element should be an
article and which a
section. No customer-facing tool exists that takes advantage of this algorithm by producing a table of contents. No browser seems to exploit such tools either.
Is It Really Accessible?
If accessibility is your reason for using semantic mark-up, then understand that accessibility and semantic mark-up have very little correlation, due to the massive abuse of HTML mark-up on the Web. (I would love to link to Mark Pilgrim’s post on this, but it is dead, so this will have to do8.)
As stated on HTML5 Accessibility10, almost every new HTML5 element currently provides to assistive technology only as much semantic information as a div element. So, if you thought that using HTML5 elements would make your website more accessible, think again. (How much additional information do
<figcaption> bring? None11.)
Is It Really Searchable?
If SEO is your grand purpose for using semantic mark-up, then know that most search engines do not give more credence to a page just because of its mark-up. The only thing recommended in this SEO guide from Google13 is to use relevant headings and anchor links (other search engines work similarly). Your use of HTML5 elements or of
span tags will not affect how your content is read by them.
There is another way to provide rich data to search engines, and that is via micro-data14. In no way does this make your website rank better on search engines; it simply adds value to the search result15 when a relevant one is found for your website.
Is It Really Portable?
Another much-touted advantage of the semantic Web is data portability. Miraculously, all devices are supposed to understand the semantic mark-up used everywhere and be able to parse the information therein with no effort. Aryeh Gregor puts that myth to sleep16:
… +Manu Sporny said that semantic Web people had received feedback that out-of-band data was harder to keep in sync with content. I can attest that in MediaWiki’s case this isn’t true, though… The only times I can see where you’d want to use RDFa or microdata instead of separate RDF is if either you don’t have good enough page-generation tools, or you want the metadata to be consumed by specific known clients that only support inline metadata (e.g. search engines supporting schema.org or such). If the page is being processed by a script anyway, and if the script author has ready access to server-side tools that can extract the metadata into a separate RDF stream, then it’s normally going to be just as easy to publish as a separate stream as to publish inline. And it saves a lot of bloat on every page view.
What Now, Then?
- There is no harm using
divelements; you can continue using them instead of
article. I think we should use the new elements to make your mark-up readable, not for any inherent semantic advantage. If you want to use HTML5
articletags to enhance some particular textual documentation for a future document reader, do it.
- Tools exist today that take advantage of the
footerelements. NVDA now assigns implied semantics17 with these elements. The elements are straightforward to understand and use.
- There is good support18 for ARIA landmarks in screen readers, but be careful19 when using them with HTML5 elements.
What do you think?
This article is published in the Opinion column section in which we provide active members of the community with the opportunity to share their thoughts and ideas publicly. Do you agree with the author? Please leave a comment. And if you disagree, would you like to write a rebuttal or counter piece? Leave a comment, too, and we will get back to you! Thank you.
- 1 http://www.smashingmagazine.com/2011/11/12/pursuing-semantic-value/
- 2 http://www.well.com/~doctorow/metacrap.htm
- 3 http://www.andybudd.com/archives/2004/05/semantic_coding/
- 4 http://www.impressivewebs.com/aside-vs-blockquote-html5/
- 5 http://twitter.theinfo.org/29661575610630145
- 6 http://www.alexa.com/topsites
- 7 http://web.archive.org/web/20060428021228/http://diveintomark.org/archives/2002/12/30/the_tag_soup_of_a_new_generation
- 8 http://krijnhoetmer.nl/irc-logs/whatwg/20090604#l-877
- 9 http://www.w3.org/TR/2011/WD-html-aapi-20110414/
- 10 http://www.html5accessibility.com/
- 11 http://www.paciellogroup.com/blog/2011/08/html5-accessibility-chops-the-figure-and-figcaption-elements/
- 12 http://html5doctor.com/time-and-data-element/
- 13 http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35291
- 14 http://schema.org/
- 15 http://www.google.com/support/webmasters/bin/answer.py?answer=1211158
- 16 https://plus.google.com/105458233028934590147/posts/Q2Wnvy1ysBD
- 17 http://www.accessibleculture.org/research/html5-aria-2011/
- 18 http://www.html5accessibility.com/tests/landmarks.html
- 19 http://www.accessibleculture.org/articles/2011/04/html5-aria-2011/
- 20 http://platform.html5.org
- 21 http://www.highercomputingforeveryone.com/
- 22 http://yuilibrary.com/theater/douglas-crockford/crockford-tjpl/