I’ve been doing a bit of thinking recently.
I’ve been thinking about HTML 5 and the new semantic sectioning elements it proposes to introduce:
I’ve also been thinking about the way microformats use data format standards and reserved
id values to organise content.
Then thinking about this 2005 research into reused class names, which shows that, probably mostly unconsciously, website makers were already using the proposed HTML 5 elements as class names to organise their data.
And then thinking: we should make this a de facto standard. So I have; in the last few weeks I’ve begun to mark up the websites I make using reserved class names based on the HTML 5 elements. Some were no-brainers – who doesn’t use <div class=”header”>? – but marking up sections with <div class=”section” id=”section_name”> is new for me.
It makes a lot of sense, however; first of all, it will make it easier for me to review my code in the future; second, it will help me get used to the conventions of marking up in that way; and third, when (if) HTML 5 becomes a recommendation and supported in browsers, it will be a matter of seconds to do find+replace on my code to change <div class=”section”> to <section>.
I don’t imagine we’ll see the proposed HTML 5 changes for a few years yet, so marking up your content with HTML 5 class names is a good way to keep ahead of the curve.