[html5] h3 - h6: What's the best practice when in a section/article?

Micky Hulse mickyhulse.lists at gmail.com
Wed Sep 19 14:41:38 PDT 2012


Thanks Erik and Ian, that's pretty helpful! :)

Sorry for my vague question. I'm working on a test server that's not
public facing, so unfortunately I don't have much to show.

> When you have subsections, as in:

That's basically what I was curious about... Sub sections that don't
really "feel" like they deserve their own <section>.

Just for my own edification, could someone show me an example of an
<h6> used in a <section>?

> I use a tool to help me with my document outlines. Perhaps it will help you too: http://gsnedders.html5.org/outliner

Awesome! Yah, I have used this before for URLs, but I just now
realized that I can just copy and paste my HTML into the bottom field.

Just now playing around with things, based on the outline results, I
re-worked my HTML example into this:

<doctype html>
<title>Hello, world!</title>
<h1>Foo</h1>
<section>
	<header>
		<hgroup>
			<h1>My main header</h1>
			<h2>Subhead goes here</h2>
		</hgroup>
	</header>
	<p>Maybe a description of section goes here...</p>
	<h3>Heading used to divide paragraphs</h3>
	<p>Here's a paragraph...</p>
	<h3>Heading used to divide paragraphs</h3>
	<p>Here's a paragraph...</p>
	<h3>Heading used to divide paragraphs</h3>
	<p>Here's a paragraph...</p>
	<hgroup>
		<h3>How to handle this?</h3>
		<h4>Is it weird to have multiple headers per section like this?</h4>
	</hgroup>
	<p>Here's a paragraph... Should I have created a nested section in
this case?</p>
</section>

Using <hgroup> instead of <header> for that second grouping of
headings makes a ton more sense now. For some reason, I forgot about
<hgroup> when writing my example. :D

Thanks again folks! Much appreciated.

Next time I'll try to be more specific.



More information about the Help mailing list