Heading for Trouble | July 20, 2004
There is an interesting discussion going on over at Jogin.com about the correct use of headlines. I’ve always seen headings as an indication of importance. If you look at this site you’ll see that the main headline for each post is a <h1> and any sub heads are <h2>’s. If you look at the side bar, all the headlines there are <h2>’s as well.
However Thomas points out that if you run such a site through the W3C validator with outline mode checked, you get an interesting result. Outline mode seems to be similar to documents outlines in Word which ï¿½ if you’re lucky enough never to have used Word ï¿½ provides you with a structural outline of your document. Looking at the outline of my homepage you’ll see that items in my side bar are being shown as structurally subordinate to the last post on my homepage. This obviously isn’t the case.
So it seems like headings are more to do with structure than importance. If you look at the specs they say
There are six levels of headings from H1 (the most important) to H6 (the least important).
Fair enough. This is probably why I, and many other web designers, have always seen heading levels being related to importance rather than structure. However you’d have thought that this being in the “structure” section of the specs would have been the first clue. The second clue for me is this line.
Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
Thinking about it logically, the only way a user agent would be able to do this is if ï¿½ like the validator outline display ï¿½ the user agent used the heading levels to extract structural meaning from the document.
So rather than my document structure looking like this:
It should look like this:
The thing is, you may not always want to display a main sidebar headline. This is another reason why people have chosen to use headlines to denote importance rather than structure. However following the whole “markup first, style later” philosophy, it would seem logical to create the correct page structure and then use CSS to hide any elements that you don’t want to visually display.
What do you think?
Posted at July 20, 2004 9:20 AM