[html5] Can a <section> wrap more than one <h1>?
Tae Sandoval Murgan
taecilla at gmail.com
Fri Mar 12 19:43:56 PST 2010
On Fri, Mar 12, 2010 at 20:43, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 1 Mar 2010, Tae Sandoval Murgan wrote:
> If you have two <h1>s in the section, it's effectively two sections. A
> <section> scopes <hx>s like <body> does.
That behavior makes me ask: what is <section> for? I thought that for
to structure a page in a easier way, 'cause allows to do things like:
<section>
<h1></h1>
<section>
<h1></h1>
</section>
</section>
but the spec says: "Authors are also encouraged to explicitly wrap
sections in elements of sectioning content, instead of relying on the
implicit sections generated by having multiple headings in one element
of sectioning content." So I'm a little bit confuse. <section> is not
for apply style to content, however that's the only useful feature
that I see, 'cause
<body>
<h1></h1>
</body>
is the same as:
<body>
<section>
<h1></h1>
</section>
</body>
with no less semantic/structural value, or am I missing something?
> If you have a suggestion for an example to demonstrate this, and if you
> have a good suggestion of where I should put it (where did you look to try
> to understand this? That's probably the best place) I'd be happy to add
> one.
Well, I wrote some like:
<body>
<header>
<h1>Apples</h1>
</header>
<section>
<h1>Taste</h1>
<p>They taste lovely.</p>
</section>
<section>
<h1>Sweet</h1>
<p>Red apples are sweeter than green one.</p>
<h1>Color</h1>
<p>Apples come in various colors.</p>
</section>
</body>
And I was reading the section 4.4.11: Headings and sections[1], trying
to understand it.
Cheers and thanks in advance.
[1]http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#headings-and-sections
More information about the Help
mailing list