Sigurdhsson

Opinions and web experimentation

Correct use of
?

Published .

HTML5 has started to see real use in the wild, but unfortunately there's already some misunderstandings concerning some parts of the draft - most notably the <section> element. People seem to have missed the purpose of this element - it is "not just a “semantic @
@”":http://blog.whatwg.org/is-not-just-a-semantic.

An example of what you can often see is this:

pre(brush:html). <!doctype html>


...

Lorem ipsum ...



...

Clearly, this is not the intended purpose of the <section> element. It was intended to make outlining of documents (creating TOCs) easier by grouping content to headings, instead of having several different heading elements. The correct usage of the <section> element, therefore, looks like this:

pre(brush:html). <!doctype html>

Title

Lorem Ipsum...


Subtitle

Lorem ipsum...


Sub-subtitle

Lorem ipsum...




Subtitle

Lorem ipsum...


No trackbacks

Writing about this post? A reply, retort, reaction? Use the trackback URI below to automatically create a link to your entry!

http://blog.sigurdhsson.org/cgi-bin/mt/mt-tb.cgi/338

Join the discussion!