post

In my intent to adapt the design of this site to a nice HTML5 markup, and the fact that the site is divided in two sections side by side rather than a regular top header, i ran into a few obstacles, and it made me wonder.

After some investigation, I decided (for now) to use two simple <div> tags to separate the navigation area from the main content area, and the reason for that was that i didn’t find enough evidence to use something else. I was tempted to use the <section> tag, but the information about the right way to use it was too confusing.

I did quite a bit of research and I have to say that it really surprised me the lack of clear documentation out there for some of the new semantic tags like <header> and <section>, while so many different opinions going against each other seem to have valid points.

Sometimes it seems to me like the people at the W3C tend to imagine the Internet as a bunch of blogs and news sites, or even books, where everything is long text articles and documents that need to be formatted properly to make them easy to read and semantic.

The spec for the <section> tag explains it as a “…generic section of a document or application…” and then says “…is not a generic container…”, which can be easily misinterpreted. Also the examples they show are chapters, tabbed sections on a dialog box and numbered sections on a thesis. Nothing about nesting, importance, hierarchy, etc.

We are even encouraged not to use the <section> tag unless we are completely sure is the right thing to do and there’s no other tag that will do the job. The general rule is to use it only when the element’s content is listed in the document’s outline, which is sort of a tree of the document and may, or may not have sections in it.

Problems or Benefits?

The near future can either bring us a big mess, with each one doing things the way they want, or a great advance, and a meaningful and organized web. Or both :). For the time being, I can only say that I’m glad to see so many people trying to learn the right way to do it.

With the given information, there’s a lot to assume. And having a lot to assume means we, the developers, get to chose how are we going to shape the web.

Previous article Next article

Comments

blog comments powered by Disqus