Thursday, December 24, 2015

Header Tags for Structure not Presentation

The often misused header elements (<h1>--<h6>) are where we need to focus. The mis-use usually occurs with the headers not following in immediate descending order. In other words, the headers that should follow an <h1> element are <h2> elements. No <h3> elements should be direct descendants of the <h1> element. This paradigm should continue throughout the document. Also true of header elements is that they are used to convey the document's structure; they are not used for presentation within the document. If you need to create a section of code with larger text, use appropriate markup and do not simply throw in header elements to accomplish the task.
Ajax: the Definitive Guide; O'Reilly 2008. pp 292.

Quote from section on leveraging header elements to drive a table of contents.