[whatwg] The div element

Nicholas C. Zakas html at nczonline.net
Sat Mar 1 19:37:03 PST 2008

Reading your description makes me think that you're more displeased with the <hn/> elements than you are happy with the <section/> element. I've never had issues promoting headers or moving content around, and I'm not clear that <section/> would help in any of these circumstances. Nested sections using different <hn/> elements seem more confusing to me than just using the <hn/> elements.


----- Original Message ----
From: Tab Atkins Jr. <jackalmage at gmail.com>
To: whatwg List <whatwg at whatwg.org>
Sent: Saturday, March 1, 2008 11:33:18 AM
Subject: Re: [whatwg] The div element

On Fri, Feb 29, 2008 at 10:57 PM, Nicholas C. Zakas <html at nczonline.net> wrote:
>From this description, it seems like the <section/> element has little use. If you're talking about writing articles, most authors consider the start and end of sections as implicitly defined by headings. Making this explicit seems unnecessary so long as headings are still available and used. It's just extra syntax to represent something that is more easily represented without it.


Certainly they're defined by headings.  The issue is *which* heading.

If you move sections around (for example, promoting what was originally a subsection to a full section of an article) you have to manually renumber all of your headings to get the semantics right.  This is a ton of meaningless search-and-replace.

If you use a site template, you have to constantly remember that your content's most important heading is <h3> (or whatever), since the <h1> and <h2> tags are used in the template.

If you are writing blog posts, you have *no idea* what your top-most heading should be.  If the post is looked at all by itself, perhaps it gets <h1> or <h2>.  If the post is displayed among several others on a page, perhaps it should start with <h3> because the higher tags are taken up by category headings separating out the posts.

If you are copy-pasting someone else's code into your own (for a blockquote, frex), you have to adjust all the headings, because the original author has no way of knowing what level of heading you're using in the piece you're quoting him in (and obviously has no reason to care).

These are just the use-cases that I could come up with off the top of my head.  All of these are relatively large inconveniences with the current <hn> nesting scheme.  They are all solved by using <section> tags, since that 'resets' the <hn> hierarchy by explicitly sectioning the content.

Nobody is being forced to section all their content using <section>s explicitly.  That's why the <hn> implicit sectioning algorithm exists - it's easier to work with.  However, there are many situations when being able to explicitly define sections is a great boon.



      Never miss a thing.   Make Yahoo your homepage.

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080301/50c3964e/attachment-0001.htm>

More information about the whatwg mailing list