Feed the machine

HTML5 introduces a number of elements to provide context to content — elements like section, article, and nav.

Of course, using markup to provide context isn’t a new concept. Before HTML5, people used tags like <div id="nav"> to make pages more structured and usable. Unfortunately the attribute values of the div tag were left to the whim of developers so the tags didn’t make a lot of sense to machines. If <div id="deep_thoughts"> described your content, then bravo! But the machines were unimpressed.

The standardized semantic elements in HTML5 not only help humans make sense of the content but machines too. The elements open up realms of possibilities for the future. New products, features, and extensions could be developed. Examples:

  • A browser on a mobile device could hide all <aside> elements to reduce clutter
  • A standard browser could provide a print dialog that lets the user skip all <nav> elements
  • A screen reader could announce <aside> elements, or be configured to skip <nav> or <footer> elements
  • A search engine could sniff out headings to index pages more effectively, or pick up the links in nav elements to display them as quick links in search results.

Who knows? A yet-to-be-imagined use case could give birth to the next Internet giant.

For more information, see the Semantics section of the W3C HTML5 spec. For a good overview of semantic markup, see Semantic Markup and Page Layout by Jennifer Marsman on her MSDN blog.

Comments are closed.