Results 1 to 2 of 2
Feb 14, 2013, 09:33 #1
- Join Date
- Aug 2007
- 51 Post(s)
- 2 Thread(s)
To h1 everything or not: current answer is "don't".
Those who've been following the HTML5 spec(s) have surely heard of the document outline, where certain elements (such as header, footer, aside, section, article...) set up a semantic structure to a page whereby the architectural outline of the information on the page can be... I dunno. More easily parsed by software? Or something.
Anyway along with this came back an old idea from XHTML2, which proposed a sort of EveryHeading: <h>. With the new document outline in place, h1 could serve as the generic heading for each level of the outline, meaning software parsing the page would realise that a <h1> within an <article> who was within a main <section> who was the main child of the body with its own <h1> would be considered an <h2> instead. Or something like that.
The idea has pros and cons. One of the main pros is "syndication": that your "main" article on your website (<h1>How to Change a Tire-- an article by Joe</h1>) would, if copied over to the Motorcycle News site as one of several maintenance articles (where the section heading is <h2>Maintaining your Bike</h2>), then Joe's <h1> would now be interpreted as an h3 and the heading levels would make sense to all software, without manual human intervention. You would magically end up with this:
<p>...for all your motorcycle articles.</p>
<h2>Maintaining your Bike</h2>
<h3>How to Change a Tire -- an article by Joe</h3>
Well that's awesome and peaches, but there's problems: it doesn't actually do this. There isn't software today consuming HTML with the outlining algorithm (well, there is the outline checker at w3 tho... :D ) and there's plenty out there which does not, meaning anything older than the latest nightly of something is seeing... just h1's everywhere.
Of course, this also means AT (accessibility technology), where headings are not just structural components, but also (mostly due to crappily-built pages) a major navigation component. Users of these technologies not only rely on there being headings, but the headings being the correct level for the nesting of the content beneath it.
So, currently, the specs have been formally changed (for now) to no longer encourage using only h1's, or to let devs think that using only h1's and relying on the document outline is in any way recommended.
The more you know.