[whatwg] Re: <section> and headings

Ian Hickson ian at hixie.ch
Fri Nov 12 02:29:33 PST 2004


On Mon, 30 Aug 2004, Lachlan Hunt wrote:
>
> Doing this essentially says that h1 to h6 are exactly the same, which 
> they are not.

Why are they not? I mean, that's just up to what the spec says, right?

In HTML, <h1> .. <h6> are different in that they implicitly mark section 
starts and ends. If we introduce explicit markup to mark a section start 
and end, then it makes no sense for <h1> .. <h6> to still do this, indeed 
it would be very confusing for there to be two separate traversals of the 
content which gave two different descriptions of the structure. If we 
simply redefine <h1> .. <h6> to be equivalent, we sidestep that entire 
issue, since you can no longer look at the heading number to work out the 
section depth, and therefore there is only one allowed traversal.


> DO NOT overload the type attribute any more than it already is.  We had 
> this discussion a few months ago when I was paying more attention to 
> this work, and several people were suggesting the use of type for 
> various things.  The type attrubue *SHOULD* only be used for denothing 
> the MIME type of a resource, and for form controls.  HTML4 already 
> overloaded the attrbute with 10 different uses; 8 of them being 
> presentational, and thus deprecated.

While I don't have any plans to reuse the "type" attribute for anything 
other than the cases you list, I have to say, I don't understand why using 
that attribute name in different places for different things is a bad 
thing. Attributes are per-element.


> Andy Clarke did a study a few months back on the most common section 
> ids, to determine what a general site consists of, and published his 
> results [2 - 4]. Maybe that could help with determining semantics for 
> new elements.
> 
> [2] http://www.stuffandnonsense.co.uk/archives/whats_in_a_name.html
> [3] http://www.stuffandnonsense.co.uk/archives/naming_conventions_table.html
> [4] http://www.stuffandnonsense.co.uk/archives/whats_in_a_name_pt2.html

Interesting stuff! It actually maps pretty well to what is currently in 
the draft:

| Here are my suggestions for main 'structural' divs
|
|    * Container div: container

<body>

|    * Header or banner div: header

<header>

|    * Main or global navigation div: main-nav

<navigation>

|    * Left or right side columns: sidebar-a, sidebar-b

<sidebar>

|    * Content div: content

<article>

|    * Footer div: footer

<footer>

| And for other page elements
|
|    * Sub-navigation list: sub-nav

<navigation><ul><li><ul>

|    * Search: search

<navigation><form><input>

|    * Search results: search-results

Nothing in particular.

|    * Copyright information: copyright

Nothing in particular.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list