<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML5 Doctor &#187; header</title>
	<atom:link href="http://html5doctor.com/tag/header/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:36:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Your Questions Answered 9</title>
		<link>http://html5doctor.com/your-questions-answered-9/</link>
		<comments>http://html5doctor.com/your-questions-answered-9/#comments</comments>
		<pubDate>Fri, 14 May 2010 14:15:57 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[figcaption]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[offline]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1779</guid>
		<description><![CDATA[<p>The Doctor is in with another round of patient questions about <abbr>HTML</abbr>5. This week, we'll cover offline viewing on requests, the drag-and-drop <abbr>API</abbr>, using <code>href</code> on any element, the <code>&#60;figure&#62;</code> element, and headings.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" /> The Doctor is in with another round of patient questions about <abbr>HTML</abbr>5. This week, we&#8217;ll cover offline viewing on requests, the drag-and-drop <abbr>API</abbr>, using <code>href</code> on any element, the <code>&lt;figure&gt;</code> element, and headings.</p>
<h2>Offline viewing on requests</h2>
<p>Johan asked:</p>
<blockquote><p>It is possible to let Firefox 3.5/3.6 save a page for offline viewing with the manifest file?<br />
In that case Firefox asks for permission to save the site the same second you arrive – not very user-friendly.</p>
<p>Is it possible to send the save-it-locally request via Javascript on a click?</p>
<p>Basically I want a link/button which will fire the request – and not on document load.</p>
</blockquote>
<p>While it isn&#8217;t possible to make Firefox 3.5/3.6 save a page for offline viewing with the manifest file, there is <em>a</em> way to do this. It all depends on how you write the &#8220;save-it-locally request&#8221; code. You have two options:</p>
<ol>
<li>If you want to store an arbitrary document that is not explicitly listed in your manifest, you could run an Ajax request for that document and store its contents in <code>localStorage</code>. When you want to view that document, load it from <code>localStorage</code> and overlay it on the existing page.</li>
<li>Dynamically manage a manifest file for individual users, so that if a user requests a new file that isn&#8217;t in their manifest, register this on the server side and add it to the manifest — which is bespoke to this specific user — on the fly.</li>
</ol>
<p>I&#8217;m not sure what you&#8217;re seeing with regards to the permissions error. When I test the manifest (offline **cache**), it doesn&#8217;t ask twice.</p>
<p><small>Note: you asked about Firefox 3.5 — the offline manifest doesn&#8217;t work properly at all in this version.</small></p>
<p>Thanks, Remy</p>
<h2>Question about dragging</h2>
<p>Marc asked:</p>
<blockquote><p>Evening,</p>
<p>I&#8217;m trying to get my head around the drag and drop (DnD) possibilities of <abbr>HTML</abbr>5. I have a &#8220;simple&#8221; task: Read the content of a <abbr>XML</abbr> file, using JavaScript, and do some manipulations of he <abbr>XML</abbr>. Without the use of server side scripts.</p>
<p>I tried my way with Google, but apart from people complaining about the DnD specs, I wasn&#8217;t able to find much insightful informations.</p>
<p>Can you point me toward resources to understand the DnD possibilities of <abbr>HTML</abbr>5?</p>
<p>Thank you Doctor, a French canadian <abbr>HTML</abbr>5 fan <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
</blockquote>
<p>Absolutely! There&#8217;s actually an <abbr>HTML</abbr>5 Doctor article covering <a href="http://html5doctor.com/native-drag-and-drop/">native drag-and-drop</a>. It also includes links for further reading and related posts (such as accessibility experiments).</p>
<p>I hope that helps.</p>
<p>Cheers, Remy</p>
<h2>About the <code>href</code> on any element</h2>
<p>Luan asked:</p>
<blockquote><p>I&#8217;ve heard a long ago that href would work in any tag, such as a <code>&lt;p href="..."&gt;</code> or a <code>h1</code>, even a <code>div</code> and others&#8230; but I don&#8217;t see anything about this in the last days. Do you know if this is going to work?</p>
</blockquote>
<p>That was in <abbr>XHTML</abbr>2 (on which the <abbr>W3C</abbr> have now stopped work).</p>
<p>The <abbr>HTML</abbr>5 equivalent is to wrap an <code>&lt;a href="..."&gt;</code> around the other tags. It&#8217;s called block-level linking, and we&#8217;ve <a href="http://html5doctor.com/block-level-links-in-html-5/">written an article</a> about it.</p>
<p>Cheers, Bruce</p>
<h2><abbr>W3C</abbr> Validator for the <code>&lt;figure&gt;</code> element</h2>
<p>Fjpoblam asked:</p>
<blockquote><p>I have a (prospective) structure containing 8 figures: each an image with a caption. My goal is an image gallery, each image clickable toward an individual htm file containing a slide show. (In html4 I structured each &#8220;figure&#8221; as a div: figure seemed ideal for the task.)</p>
<p>Problem is, I tried to follow the *validator* hint with a dd for the image and a dt for the caption (each surrounded by an a). Upon doing so, the validator pops up an error. When I try a straight image with a legend, it is also rejected for want of a dd and an optional dt.</p>
<p>What gives? Do you have a hint? Or better, simply, point me doofus to the correct doc so&#8217;s you&#8217;ll &#8220;teach a man to fish&#8221;.</p>
</blockquote>
<p>I&#8217;m not sure if the validator is up to date or not, but you shouldn&#8217;t be using <code>&lt;dd&gt;</code>/<code>&lt;dt&gt;</code> in <code>&lt;figure&gt;</code> anymore. Please use <code>&lt;figcaption&gt;</code>.</p>
<p>See our article on <a href="http://html5doctor.com/the-figure-figcaption-elements/">the <code>&lt;figure&gt;</code> and <code>&lt;figcaption&gt;</code> elements</a> for more.</p>
<p>Also see our <a href="http://html5doctor.com/glossary/">glossary</a> for more examples.</p>
<p>Cheers, Rich</p>
<h2>Headings</h2>
<p>Thomas asked:</p>
<blockquote><p>Dear Doctors,</p>
<p>you covered the new <code>header</code> tag in an article. The <code>header</code> tag should contain a heading element, like h1-6. So far so good, but how do I structure my headings further on. E.g. I&#8217;ve got this:</p>
<pre><code>&lt;article&gt;
	&lt;header&gt;
		&lt;h1&gt;My major heading&lt;/h1&gt;
		&lt;h2&gt;Subheading&lt;/h2&gt;
		Abstract text...
	&lt;/header&gt;
	... lorem ipsum ....
	&lt;hX&gt;Heading within my article&lt;/hX&gt;
	... dolor sit amet ...
	&lt;hX+1&gt;Subheading in my article&lt;/hX+1&gt;
&lt;/article&gt;</code></pre>
<p>Which heading-level would be appropriate in my example? h1 because it starts again? or h3 because it continues?</p>
<p>Thank you</p>
</blockquote>
<p>If the first <code>&lt;hX&gt;</code> is a new subheading and <em>not related</em> to the <code>&lt;h2&gt;</code> already there, then <code>&lt;hX&gt;</code> would be an <code>&lt;h2&gt;</code>. Then <code>&lt;hX+1&gt;</code> would be an <code>&lt;h3&gt;</code> if it is a subheading of the above <code>&lt;h2&gt;</code>.</p>
<p>However, if you&#8217;re splitting the article into sections, then you <em>could</em> use an <code>&lt;h1&gt;</code> each time. See our article on <a href="http://html5doctor.com/the-section-element/">the section element</a> for more.</p>
<p>Thanks, Tom</p>
<h2>Got a question for us?</h2>
<p>That wraps up this round of questions! If you&#8217;ve got a query about the <abbr>HTML</abbr>5 spec or how to implement it, you can <a href="http://html5doctor.com/ask-the-doctor/">get in touch</a> with us and we&#8217;ll do our best to help.</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark" class="crp_title">Your Questions Answered #10</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-3/" rel="bookmark" class="crp_title">Your Questions Answered #3</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark" class="crp_title">Your Questions Answered #8</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Your%20Questions%20Answered%209%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;title=Your%20Questions%20Answered%209&amp;bodytext=The%20Doctor%20is%20in%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20This%20week%2C%20we%27ll%20cover%20offline%20viewing%20on%20requests%2C%20the%20drag-and-drop%20API%2C%20using%20href%20on%20any%20element%2C%20the%20%26lt%3Bfigure%26gt%3B%20element%2C%20and%20headings." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;title=Your%20Questions%20Answered%209" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;title=Your%20Questions%20Answered%209&amp;notes=The%20Doctor%20is%20in%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20This%20week%2C%20we%27ll%20cover%20offline%20viewing%20on%20requests%2C%20the%20drag-and-drop%20API%2C%20using%20href%20on%20any%20element%2C%20the%20%26lt%3Bfigure%26gt%3B%20element%2C%20and%20headings." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;title=Your%20Questions%20Answered%209" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Your%20Questions%20Answered%209&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;t=Your%20Questions%20Answered%209" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;title=Your%20Questions%20Answered%209&amp;annotation=The%20Doctor%20is%20in%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20This%20week%2C%20we%27ll%20cover%20offline%20viewing%20on%20requests%2C%20the%20drag-and-drop%20API%2C%20using%20href%20on%20any%20element%2C%20the%20%26lt%3Bfigure%26gt%3B%20element%2C%20and%20headings." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Your%20Questions%20Answered%209&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;t=Your%20Questions%20Answered%209" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;title=Your%20Questions%20Answered%209&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=The%20Doctor%20is%20in%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20This%20week%2C%20we%27ll%20cover%20offline%20viewing%20on%20requests%2C%20the%20drag-and-drop%20API%2C%20using%20href%20on%20any%20element%2C%20the%20%26lt%3Bfigure%26gt%3B%20element%2C%20and%20headings." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;h=Your%20Questions%20Answered%209" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-9%2F&amp;t=Your%20Questions%20Answered%209&amp;s=The%20Doctor%20is%20in%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20This%20week%2C%20we%27ll%20cover%20offline%20viewing%20on%20requests%2C%20the%20drag-and-drop%20API%2C%20using%20href%20on%20any%20element%2C%20the%20%26lt%3Bfigure%26gt%3B%20element%2C%20and%20headings." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark">Your Questions Answered 9</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 14, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-9/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered #8</title>
		<link>http://html5doctor.com/your-questions-answered-8/</link>
		<comments>http://html5doctor.com/your-questions-answered-8/#comments</comments>
		<pubDate>Wed, 05 May 2010 13:00:55 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[outline]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1775</guid>
		<description><![CDATA[We're back with more of your questions (and our answers) about <abbr>HTML</abbr>5. In this article, we'll discuss using a <code>&#60;footer&#62;</code> at the top of your markup, how to skip to certain parts of a video, styling form elements and attributes, and more.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" /> We&#8217;re back with more of your questions (and our answers) about <abbr>HTML</abbr>5. In this article, we&#8217;ll discuss using a <code>&lt;footer&gt;</code> at the top of your markup, how to skip to certain parts of a video, styling form elements and attributes, and more.</p>
<h2><abbr>HTML</abbr>5 <code>&lt;footer&gt;</code> on top</h2>
<p>David asked:</p>
<blockquote><p>Hi!</p>
<p>I wonder if it possible to put the footer on top such as www.perfectfools.com with <abbr>HTML</abbr>5 and still make the <abbr>HTML</abbr> validate.</p>
<p>Thanks a lot and best regards!</p>
<p>David</p>
</blockquote>
<p><abbr>HTML</abbr> elements should always describe their content, so if you think that <code>&lt;footer&gt;</code> is most suitable for your content, then you&#8217;re absolutely entitled to use it. Despite its name, <code>&lt;footer&gt;</code>&#8217;s position is in no way restricted — visually or ordinally — within a document.</p>
<p>Cheers, Rich</p>
<h2>Skip to certain parts of a video file</h2>
<p>John Paul asked:</p>
<blockquote><p>Hello</p>
<p>supposing I have a very long video file in an accompanying video element, without using the controls, how do I skip to certain time stages through the <abbr>API</abbr>? Much as one would on a <abbr>DVD</abbr> menu, for example.</p>
<p>Apologies if this has been asked already.</p>
<p>JP</p>
</blockquote>
<p>You can achieve this using JavaScript and <code>data</code> attributes. Check out these articles from Bruce Lawson and Patrick Lauke from Opera. They&#8217;ve used <code>data</code> attributes to add subtitles, but you could just as easily use the attributes to jump to specific parts of a video.</p>
<ul>
<li><a href="http://dev.opera.com/articles/view/introduction-html5-video/">Introduction to HTML5 video</a></li>
<li><a href="http://dev.opera.com/articles/view/accessible-html5-video-with-javascripted-captions/">Accessible <abbr>HTML</abbr>5 video with scripted captions</a></li>
</ul>
<p>For example, set <code>data-start</code> and <code>data-end</code> attributes on your <code>&lt;video&gt;</code> element. You can then use JavaScript to read the attribute values, set the current position of the video using the <code>currentTime</code> attribute, start playing the video via the <code>play()</code> method, and even stop playing the video by listening for the <code>timeupdate</code> event and stopping the video with <code>pause()</code> once it&#8217;s reached a specified time. See <a href="http://www.w3.org/TR/html5/video.html#media-elements">the spec for the HTMLMediaElement object</a> for more details.</p>
<p>Cheers, Rich</p>
<p><small>In addition to this, the recent addition of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-track-element">the <code>track</code> element</a> will make this more easily achievable. We will cover the <code>track</code> element in more detail soon.</small></p>
<h2><code>&lt;h1&gt;</code>s within navigation links</h2>
<p>Benjamin asked:</p>
<blockquote><p>Hey,</p>
<p>I&#8217;m currently doing up the new version of my website, and decided to do it in <abbr>HTML</abbr>5.</p>
<p>One area I&#8217;m confused about is whether or not for navigation links I should be using a h1 or h2 element.</p>
<p>For example:</p>
<pre><code>&lt;nav id="nav-actions"&gt;
    &lt;header&gt;
        &lt;h1&gt;&lt;span class="title"&gt;Actions&lt;/span&gt;&lt;/h1&gt;
    &lt;/header&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="#"&gt;&lt;span class="title"&gt;Sitemap&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;&lt;span class="title"&gt;Login&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li id="action-search"&gt;&lt;a href="#"&gt;&lt;span class="title"&gt;Search&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li id="action-enquire"&gt;&lt;a href="#"&gt;&lt;span class="title"&gt;Enquire&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/nav&gt;</code></pre>
<p>Should those span.title elements be wrapped in a h2? My thoughts on why this would be required is for an outline, as navigation should appear in the outline right?</p>
<p>Thanks a bunch.</p>
</blockquote>
<p>In theory, yes, navigation should appear in the outline. I personally don&#8217;t think it <em>should</em> require a heading, and I know there have been requests to the developers of the outline algorithm to make <code>&lt;nav&gt;</code> show as a &#8216;Navigation&#8217; element rather than &#8216;untitled section&#8217;.</p>
<p>If you want to use a heading within your <code>&lt;nav&gt;</code> element, using an <code>&lt;h1&gt;</code> would be fine. You don&#8217;t really need the <code>&lt;header&gt;</code> element in there too. The outline would be calculated correctly without it. With current browser implementations, however, I don&#8217;t think it would make much difference if you used an <code>&lt;h2&gt;</code>.</p>
<p>You don&#8217;t need the <code>&lt;span&gt;</code> elements in the <code>&lt;h2&gt;</code>s. They aren&#8217;t required in the outline unless they&#8217;re providing a table of contents for the document.</p>
<p>I hope that answers your question. We plan to write an article regarding outlining soon.</p>
<p>Cheers, Rich</p>
<h2>Styling supported <abbr>HTML</abbr>5 form elements and attributes</h2>
<p>Mike asked:</p>
<blockquote><p>First off, I wanted to say I really appreciate the service this site is doing. I have found this site to be a very valuable resource and is always the first place I look when I have a question about implementing <abbr>HTML</abbr>5.</p>
<p>How do I style/edit/change the <abbr>UI</abbr> generated feedback for the new <abbr>HTML</abbr>5 form elements and attributes. For example, In Opera, is there a standard <abbr>CSS</abbr> notation to style the error message so that it doesn&#8217;t necessarily show up under the field in red? Where in the DOM is it inserted? Is the message for a required field customizable? Finally, is this information specified in the <abbr>HTML</abbr>5 spec or are the implementation details left up to the browsers?</p>
</blockquote>
<p>There is currently no way to use <abbr>CSS</abbr> to style error messages. As the <abbr>HTML</abbr>5 spec isn&#8217;t finished yet, it&#8217;s a bit early to start specifying new <abbr>CSS</abbr>.</p>
<p>The <abbr>HTML</abbr>5 spec defines no <abbr>UI</abbr> requirements regarding how browsers should display messages.</p>
<p>You <em>can</em> override a browser&#8217;s default behaviour with JavaScript. I&#8217;m not a scripter, but I reckon you would need to attach an event handler to the error event and have the handler cancel the default action and show a custom error message. I think that as long as you call <code>evt.preventDefault()</code> within the event handler, it should prevent showing the default error message. Then you can add an element into the DOM and style it as you wish, with the default error handling as a fallback for those without JavaScript. If anyone gives this a go and gets it working, we&#8217;d be very interested to see the results.</p>
<p>Ta, Bruce</p>
<h2>Section headers</h2>
<p>Tibor asked:</p>
<blockquote><p>Hi. I would like to know, how to use section&#8217;s headers. Is this code correct?</p>
<pre><code>&lt;aside&gt;
	&lt;h1&gt;header 1&lt;/h1&gt;
&lt;/aside&gt;
&lt;article&gt;
	&lt;h1&gt;header 2&lt;/h1&gt;
&lt;/article&gt;</code></pre>
<p>or I have to use header element inside every aside, article, section etc.</p>
<pre><code>&lt;aside&gt;
	&lt;header&gt;
    	&lt;h1&gt;header 1&lt;/h1&gt;
	&lt;/header&gt;
&lt;/aside&gt;
&lt;article&gt;
	&lt;header&gt;
    	&lt;h1&gt;header 2&lt;/h1&gt;
	&lt;/header&gt;
&lt;/article&gt;</code></pre>
<p>Tibor</p>
</blockquote>
<p>Your first example is correct. You only need <code>&lt;header&gt;</code> to group items within a header. If the header contains only a single <code>&lt;h1&gt;</code>–<code>&lt;h6&gt;</code> element, you don&#8217;t need to wrap it in a <code>&lt;header&gt;</code>.</p>
<p>Thanks, Bruce</p>
<h2>Got a question for us?</h2>
<p>That wraps up this round of questions! If you&#8217;ve got a query about the <abbr>HTML</abbr>5 spec or how to implement it, you can <a href="http://html5doctor.com/ask-the-doctor/">get in touch</a> with us and we&#8217;ll do our best to help.</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/your-questions-5/" rel="bookmark" class="crp_title">Your Questions Answered #5</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li>
<li><a href="http://html5doctor.com/video-the-track-element-and-webm-codec/" rel="bookmark" class="crp_title">Video: the track element and webM codec</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark" class="crp_title">Your Questions Answered 9</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Your%20Questions%20Answered%20%238%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;title=Your%20Questions%20Answered%20%238&amp;bodytext=We%27re%20back%20with%20more%20of%20your%20questions%20%28and%20our%20answers%29%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20a%20%26lt%3Bfooter%26gt%3B%20at%20the%20top%20of%20your%20markup%2C%20how%20to%20skip%20to%20certain%20parts%20of%20a%20video%2C%20styling%20form%20elements%20and%20attributes%2C%20and%20more." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;title=Your%20Questions%20Answered%20%238" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;title=Your%20Questions%20Answered%20%238&amp;notes=We%27re%20back%20with%20more%20of%20your%20questions%20%28and%20our%20answers%29%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20a%20%26lt%3Bfooter%26gt%3B%20at%20the%20top%20of%20your%20markup%2C%20how%20to%20skip%20to%20certain%20parts%20of%20a%20video%2C%20styling%20form%20elements%20and%20attributes%2C%20and%20more." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;title=Your%20Questions%20Answered%20%238" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Your%20Questions%20Answered%20%238&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;t=Your%20Questions%20Answered%20%238" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;title=Your%20Questions%20Answered%20%238&amp;annotation=We%27re%20back%20with%20more%20of%20your%20questions%20%28and%20our%20answers%29%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20a%20%26lt%3Bfooter%26gt%3B%20at%20the%20top%20of%20your%20markup%2C%20how%20to%20skip%20to%20certain%20parts%20of%20a%20video%2C%20styling%20form%20elements%20and%20attributes%2C%20and%20more." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Your%20Questions%20Answered%20%238&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;t=Your%20Questions%20Answered%20%238" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;title=Your%20Questions%20Answered%20%238&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=We%27re%20back%20with%20more%20of%20your%20questions%20%28and%20our%20answers%29%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20a%20%26lt%3Bfooter%26gt%3B%20at%20the%20top%20of%20your%20markup%2C%20how%20to%20skip%20to%20certain%20parts%20of%20a%20video%2C%20styling%20form%20elements%20and%20attributes%2C%20and%20more." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;h=Your%20Questions%20Answered%20%238" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-8%2F&amp;t=Your%20Questions%20Answered%20%238&amp;s=We%27re%20back%20with%20more%20of%20your%20questions%20%28and%20our%20answers%29%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20a%20%26lt%3Bfooter%26gt%3B%20at%20the%20top%20of%20your%20markup%2C%20how%20to%20skip%20to%20certain%20parts%20of%20a%20video%2C%20styling%20form%20elements%20and%20attributes%2C%20and%20more." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark">Your Questions Answered #8</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 5, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-8/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered #7</title>
		<link>http://html5doctor.com/your-questions-answered-7/</link>
		<comments>http://html5doctor.com/your-questions-answered-7/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 14:10:51 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[aside]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[hgroup]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[section]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1584</guid>
		<description><![CDATA[Here we are again with another round up of  patient questions about <abbr>HTML</abbr>5. In this article, we'll be covering a host of topics including <abbr>AJAX</abbr>, the eternal question of <code>div</code> or <code>section</code>, how to markup multiple blocks of content in a sidebar and using <code>header</code> with <code>hgroup</code>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" /> Here we are again with another round of patient questions about <abbr>HTML</abbr>5. In this article, we&#8217;ll be covering AJAX, the eternal question of <code>&lt;div&gt;</code> or <code>&lt;section&gt;</code>, our old friend Internet Explorer, how to mark up multiple blocks of content in a sidebar, and using <code>&lt;header&gt;</code> with <code>&lt;hgroup&gt;</code>.</p>
<h2><abbr>HTML</abbr> and AJAX</h2>
<p>Arie asked:</p>
<blockquote><p>I&#8217;m still learning about <abbr>html</abbr>5 and javascript, I&#8217;m wondering how <abbr>html</abbr>5 makes doing a lot of the things currently done in ajax and javascript more simple.  Is it by providing things like the canvas that unify ideas?</p>
</blockquote>
<p>Certain parts of <abbr>HTML</abbr>5 will indeed simplify or reduce the need for JavaScript. One such area of improvement is Web Forms 2.0, which will handle client-side form validation in the browser and provide new input types (like <code>&lt;input type="email"&gt;</code> that checks for a valid email address). Of course, you&#8217;ll still need to validate your forms on the server, but at least the browser will catch the most obvious mistakes before the user actually submits the form.</p>
<p>Other parts of <abbr>HTML</abbr>5, like <a href="http://html5doctor.com/introducing-web-sql-databases/">Web SQL Databases</a> and <code>&lt;canvas&gt;</code>, are essentially JavaScript <abbr>API</abbr>s. They may not cut down on your need for JavaScript, but they do provide a consistent interface to some powerful functionality and will enable your application or site to do more things within (or outside of) the browser.</p>
<p>Cheers, Rich</p>
<h2><code>&lt;div&gt;</code> or <code>&lt;section&gt;</code>?</h2>
<p>Paul asked:</p>
<blockquote><p>Hello</p>
<p>I see you are using divs on your website, I thought divs should be replaced by more semantic tags such as sections or article. what did I miss?</p>
<p>Thanks</p>
</blockquote>
<p>Hi Paul,</p>
<p>Just like with <abbr>HTML</abbr>4, you shouldn&#8217;t use <code>&lt;div&gt;</code>s or <code>&lt;span&gt;</code>s where another, more precise element would fit the bill. But for grouping arbitrary content, <code>&lt;div&gt;</code>s and <code>&lt;span&gt;</code>s remain the way to go.</p>
<p>Thanks, Bruce</p>
<h2><abbr>HTML</abbr>5 and <abbr>IE</abbr>6</h2>
<p>Adam asked:</p>
<blockquote><p>Greetings HTML5 Doctor,</p>
<p>Is it at all possible to have a <abbr>HTML</abbr>5 layout while 30% of our users are running <abbr>IE</abbr>6? We are an <abbr>IT</abbr> company and our website is very large so having separate versions is completely impractical. <abbr>HTML</abbr>5 would allow us to move on and keep our markup a lot simpler but with no concrete guarantees regarding universal support is <abbr>HTML</abbr>5 ever going to get off the ground within 5 years while not having to resort to javascript solutions?</p>
</blockquote>
<p>Simply change the doctype and you&#8217;ll be writing <abbr>HTML</abbr>5! If you want to use new elements, however, you&#8217;ll need to use JavaScript to support them (for all versions of <abbr>IE</abbr> up to <abbr>IE</abbr>8). The best place to start? Read <a href="http://html5doctor.com/author/remys/">Remy&#8217;s</a> article on <a href="http://html5doctor.com/how-to-get-html5-working-in-ie-and-firefox-2/">How to get <abbr>HTML</abbr>5 working in <abbr>IE</abbr> and Firefox 2</a>.</p>
<p>I think we&#8217;re in a position to do something about this. By using the new doctype, block-level links, and new form input types (that degrade gracefully), we can start promoting <abbr>HTML</abbr>5 <em>right now</em>.</p>
<p>Cheers, Rich</p>
<h2>Multiple blocks in a sidebar</h2>
<p>Bart asked:</p>
<blockquote><p>On my page (revora.net) I have a sidebar with content that I deem appropriate for the <code>aside</code> element. The sidebar contains several blocks of content. I&#8217;ve currently made the whole bar <code>aside</code> and made the blocks <code>div</code>. Is this correct, or should I do it the other way around?</p>
</blockquote>
<p>It sounds like your first approach is correct. The <code>&lt;div&gt;</code>s might be <code>&lt;section&gt;</code>s or maybe <code>&lt;nav&gt;</code> elements though, depending on their content. I suggest you read our article (and the comments) on <a href="http://html5doctor.com/aside-revisited/">the <code>&lt;aside&gt;</code> element</a>.</p>
<p>Thanks, Tom</p>
<h2>Header with <code>&lt;hgroup&gt;</code></h2>
<p>Diego asked:</p>
<blockquote><p>Hi,</p>
<p>This structure is right?</p>
<pre><code>&lt;section id="choose-tip"&gt;
   &lt;header&gt;
       &lt;hgroup&gt;
           &lt;h1&gt;Foo Bar&lt;/h1&gt;
           &lt;h2&gt;Baz Bat Qux&lt;/h2&gt;
       &lt;/hgroup&gt;
   &lt;/header&gt;
   &lt;p&gt;lorem ipsum&lt;/p&gt;
&lt;/section&gt;</code></pre>
<p>What I mean is, if I have a HEADER with just 2 H(n) I need to put these into a HGROUP ? Or&#8230; I can remove the HEADER and leave just a HGROUP? What&#8217;s the better solutions for it?</p>
<p>Thanks for all,</p>
<p>Diego Tres</p>
</blockquote>
<p>What you have is correct. Basically, in the document outline, you will only see &#8220;Foo Bar&#8221; as the heading for that section. &#8220;Baz Bat Qux&#8221; will be hidden from the outline.</p>
<p>You don&#8217;t <em>have</em> to use a <code>&lt;header&gt;</code> within your <code>&lt;section&gt;</code> or an <code>&lt;hgroup&gt;</code> within your <code>&lt;header&gt;</code>. Similarly, you don&#8217;t <em>have</em> to use a <code>&lt;header&gt;</code> around your <code>&lt;hgroup&gt;</code>.</p>
<p>To summarise, the best solution (if you don&#8217;t require the <code>&lt;h2&gt;</code> to appear in the document outline) is what you&#8217;ve already got.</p>
<p>Cheers, Rich</p>
<h2>Got a question for us?</h2>
<p>That wraps up this round of questions! If you&#8217;ve got a query about the <abbr>HTML</abbr>5 spec or how to implement it, you can <a href="http://html5doctor.com/ask-the-doctor/">get in touch</a> with us and we&#8217;ll do our best to help.</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark" class="crp_title">Your Questions Answered #8</a></li>
<li><a href="http://html5doctor.com/your-questions-5/" rel="bookmark" class="crp_title">Your Questions Answered #5</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark" class="crp_title">Your Questions Answered 9</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark" class="crp_title">Your Questions Answered #10</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Your%20Questions%20Answered%20%237%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;title=Your%20Questions%20Answered%20%237&amp;bodytext=Here%20we%20are%20again%20with%20another%20round%20up%20of%20%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20be%20covering%20a%20host%20of%20topics%20including%20AJAX%2C%20the%20eternal%20question%20of%20div%20or%20section%2C%20how%20to%20markup%20multiple%20blocks%20of%20content%20in%20a%20sidebar%20and%20using%20header%20with%20hgroup." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;title=Your%20Questions%20Answered%20%237" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;title=Your%20Questions%20Answered%20%237&amp;notes=Here%20we%20are%20again%20with%20another%20round%20up%20of%20%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20be%20covering%20a%20host%20of%20topics%20including%20AJAX%2C%20the%20eternal%20question%20of%20div%20or%20section%2C%20how%20to%20markup%20multiple%20blocks%20of%20content%20in%20a%20sidebar%20and%20using%20header%20with%20hgroup." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;title=Your%20Questions%20Answered%20%237" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Your%20Questions%20Answered%20%237&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;t=Your%20Questions%20Answered%20%237" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;title=Your%20Questions%20Answered%20%237&amp;annotation=Here%20we%20are%20again%20with%20another%20round%20up%20of%20%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20be%20covering%20a%20host%20of%20topics%20including%20AJAX%2C%20the%20eternal%20question%20of%20div%20or%20section%2C%20how%20to%20markup%20multiple%20blocks%20of%20content%20in%20a%20sidebar%20and%20using%20header%20with%20hgroup." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Your%20Questions%20Answered%20%237&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;t=Your%20Questions%20Answered%20%237" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;title=Your%20Questions%20Answered%20%237&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=Here%20we%20are%20again%20with%20another%20round%20up%20of%20%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20be%20covering%20a%20host%20of%20topics%20including%20AJAX%2C%20the%20eternal%20question%20of%20div%20or%20section%2C%20how%20to%20markup%20multiple%20blocks%20of%20content%20in%20a%20sidebar%20and%20using%20header%20with%20hgroup." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;h=Your%20Questions%20Answered%20%237" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-7%2F&amp;t=Your%20Questions%20Answered%20%237&amp;s=Here%20we%20are%20again%20with%20another%20round%20up%20of%20%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20be%20covering%20a%20host%20of%20topics%20including%20AJAX%2C%20the%20eternal%20question%20of%20div%20or%20section%2C%20how%20to%20markup%20multiple%20blocks%20of%20content%20in%20a%20sidebar%20and%20using%20header%20with%20hgroup." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark">Your Questions Answered #7</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on April 20, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-7/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>The hgroup element</title>
		<link>http://html5doctor.com/the-hgroup-element/</link>
		<comments>http://html5doctor.com/the-hgroup-element/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 15:45:12 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[hgroup]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1052</guid>
		<description><![CDATA[<p>One of the new elements defined in <abbr>HTML</abbr>5 is <code>&#60;hgroup&#62;</code>, used for grouping titles with their associated subtitles. But why do we need <code>&#60;hgroup&#62;</code> when we've already got the <code>&#60;header&#62;</code> element? In this article, we'll do our best to answer that question.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
			</a>
		</div><p>One of the new elements defined in <abbr>HTML</abbr>5 is <code>&lt;hgroup&gt;</code>, used for grouping titles with their associated subtitles. But why do we need <code>&lt;hgroup&gt;</code> when we&#8217;ve already got the <code>&lt;header&gt;</code> element? In this article, we&#8217;ll do our best to answer that question.</p>

<h2>What is the <code>&lt;hgroup&gt;</code> element?</h2>
<p>Here&#8217;s what the spec says about <code>&lt;hgroup&gt;</code>:</p>
<blockquote><p>The hgroup element is typically used to group a set of one or more h1-h6 elements — to group, for example, a section title and an accompanying subtitle.</p><footer><cite><a href="http://dev.w3.org/html5/markup/hgroup.html">W3C Specification</a></cite></footer></blockquote>

<h3>So what does that mean?</h3>
<p><code>&lt;hgroup&gt;</code> acts as a wrapper for <del>two</del> one or more related heading elements possibly contained within a <code>&lt;header&gt;</code> element. It can <em>only</em> contain a group of <code>&lt;h1&gt;</code>–<code>&lt;h6&gt;</code> element(s), and it should be used for subtitles, alternative titles, and tag lines.</p>

<p>The easiest way to demonstrate proper use of <code>&lt;hgroup&gt;</code> is through some examples. Thanks to <a href="http://twitter.com/boblet">Dr. Oli</a> for letting us use <a href="http://oli.jp/2009/html5-structure2/">his examples</a>.</p>

<h3>An article with one title</h3>
<p>The title consists of a single <code>&lt;h1&gt;</code>, so neither <code>&lt;hgroup&gt;</code> nor <code>&lt;header&gt;</code> is required:</p>
<pre><code>&lt;article&gt;
  &lt;h1&gt;Title goes here&lt;/h1&gt;
  &lt;p&gt;Lorem Ipsum dolor set amet&lt;/p&gt;
&lt;/article&gt;</code></pre>

<h3>An article with a title and metadata</h3>
<p>Here we&#8217;re using <code>&lt;header&gt;</code> to group the title and associated metadata, so an <code>&lt;hgroup&gt;</code> is not required:</p>
<pre><code>&lt;article&gt;
  &lt;header&gt;
    &lt;h1&gt;Title goes here&lt;/h1&gt;
    &lt;p&gt;&lt;time datetime="2010-03-20"&gt;20th March, 2010&lt;/time&gt;&lt;/p&gt;
  &lt;/header&gt;
  &lt;p&gt;Lorem Ipsum dolor set amet&lt;/p&gt;
&lt;/article&gt;</code></pre>

<h3>An article with a title and subtitle</h3>
<p>An <code>&lt;hgroup&gt;</code> contains the title and subtitle of the article:</p>
<pre><code>&lt;article&gt;
  &lt;hgroup&gt;
    &lt;h1&gt;Title goes here&lt;/h1&gt;
    &lt;h2&gt;Subtitle of article&lt;/h2&gt;
  &lt;/hgroup&gt;
  &lt;p&gt;Lorem Ipsum dolor set amet&lt;/p&gt;
&lt;/article&gt;</code></pre>

<h3>An article with a title, subtitle and metadata</h3>
<p>An <code>&lt;hgroup&gt;</code> contains the title and subtitle of the article, and then a <code>&lt;header&gt;</code> contains the metadata and the <code>&lt;hgroup&gt;</code>:</p>
<pre><code>&lt;article&gt;
  &lt;header&gt;
    &lt;hgroup&gt;
      &lt;h1&gt;Title goes here&lt;/h1&gt;
      &lt;h2&gt;Subtitle of article&lt;/h2&gt;
    &lt;/hgroup&gt;
    &lt;p&gt;&lt;time datetime="2010-03-20"&gt;20th March, 2010&lt;/time&gt;&lt;/p&gt;
  &lt;/header&gt;                
  &lt;p&gt;Lorem Ipsum dolor set amet&lt;/p&gt;
&lt;/article></code></pre>


<h3>Real world examples</h3>
<p>On <a href="http://twitter.com/alex_gibson">Alex Gibson&#8217;s</a> <a href="http://miniapps.co.uk">MiniApps</a>, he uses <code>&lt;hgroup&gt;</code> to include a tag line after the main &#8220;MiniApps&#8221; heading. (This is also what we&#8217;ve done on this site if you view the source.)</p>

<figure>
	<img src="http://html5doctor.com/wp-content/uploads/2010/03/mini-apps-hgroup.jpg" alt="Screenshot from http://miniapps.co.uk" />
    <figcaption>Screenshot from Alex Gibson&#8217;s MiniApps site</figcaption>
</figure>

<h2>So why use <code>&lt;hgroup&gt;</code>?</h2>
<p>It&#8217;s all about the <em>document outline</em>. When grouping headings in an <code>&lt;hgroup&gt;</code> element, the outline algorithm will mask <del>the lowest level</del> <ins>all but the highest level</ins> heading in the group from the resulting document outline. Using MiniApps as an example again, in his markup (although this is simplified), Alex uses:</p>

<pre><code>&#60;header&#62;
  <mark>&#60;hgroup&#62;</mark>
    &#60;h1&#62;&#60;a href="/"&#62;Mini Apps&#60;/a&#62;&#60;/h1&#62;
    &#60;h2&#62;Web applications for iPhone, Android &#38; other mobile platforms&#60;/h2&#62;
  <mark>&#60;/hgroup&#62;</mark>
&#60;/header&#62;
</code></pre>

<p>The <code>&lt;hgroup&gt;</code> contains both <code>&lt;h1&gt;</code> and <code>&lt;h2&gt;</code> elements, but the <a href="http://gsnedders.html5.org/outliner/">outliner</a> only includes the <code>&lt;h1&gt;</code>. This is illustrated in the image below. (Please ignore the &#8220;untitled section&#8221; as well. This is caused by the <code>nav</code> element, and a change request has been submitted to address this.)</p>

<figure>
	<img src="http://html5doctor.com/wp-content/uploads/2010/03/mini-apps-outline.jpg" alt="The page outline from http://miniapps.co.uk" />
    <figcaption>Document outline of miniapps.co.uk</figcaption>
</figure>

<p>We&#8217;ll be covering document outlines in another article, so I won&#8217;t go into detail here. You can test your own pages in the <a href="http://gsnedders.html5.org/outliner/" title="HTML5 Outliner"><abbr>HTML</abbr>5 Outliner</a> to ensure that you’re using the heading elements within <code>&lt;hgroup&gt;</code> correctly.</p>

<h2>Summary</h2>
<p>In this article, we&#8217;ve demonstrated how to use the <code>&lt;hgroup&gt;</code> element effectively. To recap:</p>

<ul>
  <li>If you have a simple title with a single heading element (<code>&lt;h1&gt;</code>–<code>&lt;h6&gt;</code>), you do not need an <code>&lt;hgroup&gt;</code>.</li>
  <li>If you have a title with subtitle(s) or tag lines (i.e., more than one consecutive <code>&lt;h1&gt;</code>–<code>&lt;h6&gt;</code>), group them in an <code>&lt;hgroup&gt;</code>.</li>
  <li>If you have a title with subtitle(s) <em>and</em> other metadata associated with the section or article, place both the <code>&lt;hgroup&gt;</code> and the metadata within a single <code>&lt;header&gt;</code> element.</li>
</ul>

<p><a href="/contact/" title="Contact us">Let us know</a> how you&#8217;re using <code>&lt;hgroup&gt;</code> in your <abbr>HTML</abbr>5 projects!</p><div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/the-header-element/" rel="bookmark" class="crp_title">The header element</a></li><li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li><li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li><li><a href="http://html5doctor.com/html-5-reset-stylesheet/" rel="bookmark" class="crp_title">HTML5 Reset Stylesheet</a></li><li><a href="http://html5doctor.com/your-questions-5/" rel="bookmark" class="crp_title">Your Questions Answered #5</a></li></ul></div>


Share and Save:


	<a rel="nofollow"  href="http://twitter.com/home?status=The%20hgroup%20element%20-%20http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;title=The%20hgroup%20element&amp;bodytext=One%20of%20the%20new%20elements%20defined%20in%20HTML5%20is%20%26lt%3Bhgroup%26gt%3B%2C%20used%20for%20grouping%20titles%20with%20their%20associated%20subtitles.%20But%20why%20do%20we%20need%20%26lt%3Bhgroup%26gt%3B%20when%20we%27ve%20already%20got%20the%20%26lt%3Bheader%26gt%3B%20element%3F%20In%20this%20article%2C%20we%27ll%20do%20our%20best%20to%20answer%20that%20question." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;title=The%20hgroup%20element" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;title=The%20hgroup%20element&amp;notes=One%20of%20the%20new%20elements%20defined%20in%20HTML5%20is%20%26lt%3Bhgroup%26gt%3B%2C%20used%20for%20grouping%20titles%20with%20their%20associated%20subtitles.%20But%20why%20do%20we%20need%20%26lt%3Bhgroup%26gt%3B%20when%20we%27ve%20already%20got%20the%20%26lt%3Bheader%26gt%3B%20element%3F%20In%20this%20article%2C%20we%27ll%20do%20our%20best%20to%20answer%20that%20question." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;title=The%20hgroup%20element" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=The%20hgroup%20element&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;t=The%20hgroup%20element" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;title=The%20hgroup%20element&amp;annotation=One%20of%20the%20new%20elements%20defined%20in%20HTML5%20is%20%26lt%3Bhgroup%26gt%3B%2C%20used%20for%20grouping%20titles%20with%20their%20associated%20subtitles.%20But%20why%20do%20we%20need%20%26lt%3Bhgroup%26gt%3B%20when%20we%27ve%20already%20got%20the%20%26lt%3Bheader%26gt%3B%20element%3F%20In%20this%20article%2C%20we%27ll%20do%20our%20best%20to%20answer%20that%20question." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=The%20hgroup%20element&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;t=The%20hgroup%20element" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;title=The%20hgroup%20element&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=One%20of%20the%20new%20elements%20defined%20in%20HTML5%20is%20%26lt%3Bhgroup%26gt%3B%2C%20used%20for%20grouping%20titles%20with%20their%20associated%20subtitles.%20But%20why%20do%20we%20need%20%26lt%3Bhgroup%26gt%3B%20when%20we%27ve%20already%20got%20the%20%26lt%3Bheader%26gt%3B%20element%3F%20In%20this%20article%2C%20we%27ll%20do%20our%20best%20to%20answer%20that%20question." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;h=The%20hgroup%20element" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fthe-hgroup-element%2F&amp;t=The%20hgroup%20element&amp;s=One%20of%20the%20new%20elements%20defined%20in%20HTML5%20is%20%26lt%3Bhgroup%26gt%3B%2C%20used%20for%20grouping%20titles%20with%20their%20associated%20subtitles.%20But%20why%20do%20we%20need%20%26lt%3Bhgroup%26gt%3B%20when%20we%27ve%20already%20got%20the%20%26lt%3Bheader%26gt%3B%20element%3F%20In%20this%20article%2C%20we%27ll%20do%20our%20best%20to%20answer%20that%20question." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>


<br/><br/><p><a href="http://html5doctor.com/the-hgroup-element/" rel="bookmark">The hgroup element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on March 23, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-hgroup-element/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered #5</title>
		<link>http://html5doctor.com/your-questions-5/</link>
		<comments>http://html5doctor.com/your-questions-5/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 14:30:55 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Questions]]></category>
		<category><![CDATA[Structure]]></category>
		<category><![CDATA[aside]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[outline]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[sectioning]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1400</guid>
		<description><![CDATA[We're back with our first round up of your questions for 2010. In this article we'll be covering a range of topics including sections and sectioning, the <code>img</code> element, scaling video and a proposal for a <code>field</code> element. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" /> We&#8217;re back with our first roundup of your questions for 2010. In this article, we&#8217;ll be covering a range of topics including sections and sectioning, the <code>&lt;img&gt;</code> element, scaling video, and a proposal for a <code>&lt;field&gt;</code> element. </p>
<h2>Headers and sidebars</h2>
<p>Ad asked:</p>
<blockquote><p>Hello,</p>
<p>I have 2 questions:</p>
<p>1. If I have my main navigation above the masterhead would best practise be having the nav tag inside of a header tag with the h1 and h2 in a hgroup? Or should the nav and header tag be separate?</p>
<p>2. I am building a blog in HTML5. It has a blog-like sidebar with articles, contact info and about info in it. Would the best tag to wrap this in be section or aside?</p>
<p>Thank you so much for your time,<br />
Ad Taylor</p></blockquote>
<p>Placing your <code>&lt;nav&gt;</code> within your <code>&lt;header&gt;</code> is fine and valid. However, if it makes more sense to leave it outside, then you can do that too. You don&#8217;t need to put the <code>&lt;hgroup&gt;</code> inside the <code>&lt;nav&gt;</code> though.</p>
<p>See our articles on <a href="http://html5doctor.com/the-header-element/"><code>&lt;header&gt;</code></a> and <a href="http://html5doctor.com/nav-element/"><code>&lt;nav&gt;</code></a> for more on this.</p>
<p>Regarding your second question, I would use <code>&lt;aside&gt;</code> (as we&#8217;ve done on the HTML5 doctor site) and then use multiple sections within that. Also see Bruce&#8217;s article on <a href="http://html5doctor.com/designing-a-blog-with-html5/">Designing a blog with HTML5</a>.</p>
<p>Hope that helps.</p>
<p>Cheers, Rich</p>
<h2>HTML5 <code>&lt;img&gt;</code> element</h2>
<p>Martijn asked:</p>
<blockquote><p>As you are, according to the slogan, &#8220;helping [me] implement HTML5 today,&#8221; I thought to bother you people with a spec. related question.</p>
<p>What should an UA do with an image without specified width and height attributes?</p>
<p>The dimension attributes part of the specification keeps stating &#8220;if specified&#8221; for every rule but doesn&#8217;t give any &#8220;if not specified&#8221;.</p>
<p>The part of the specification defining the img element itself does not state anything of importance about the dimension attributes apart from how the attributes in the DOM should be created by the UA.</p>
<p>Interesting is to note that they have omitted these attributes in all their img element examples.</p>
<p>In the dimension attribute section they go state the following.</p>
<p> &#8211; The dimension attributes are not intended to be used to stretch the image.</p>
<p>So we can only use them to make images smaller? This is odd as well so let&#8217;s say by stretch they mean to say both expending and shrinking in size. In this case the attributes can only be used for two cases:</p>
<p>1. To state the exact width and height of the image. Something that seems redundant unless not using those attributes means the UA can display the image at any size (which it might, as nothing about this is defined in the spec.).</p>
<p>2. To give a 0 in both attributes. By this I am telling the UA that the image is not to be seen by the user.</p>
<p>Am I missing something or is the specification missing this?</p>
<p>Looking forward to getting your prescription <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Kind Regards, Martijn</p></blockquote>
<p>If no dimension attributes are specified, the browser will leave no space for the image, and once the image has been loaded (after the rest of the page), it will then need to reflow the entire page, as that&#8217;s the first time it knows the size of the image. This can cause the content you&#8217;re reading scrolling off the page.</p>
<p>If you give the size of the image as attributes in the HTML, the browser will leave space and render the image there once it&#8217;s loaded without reflowing the page. On a mobile phone, reflowing the page unnecessarily drains the battery, and users can get vertigo from the page&#8217;s text jumping around to accommodate images.</p>
<p>Thanks, Bruce</p>
<h2>Section and Sectioning</h2>
<p>Yanoo asked:</p>
<blockquote><p>Hi,</p>
<p>What do you mean when you are talking about &#8220;sectioning&#8221;? And why don&#8217;t header and footer require sectioning?</p>
<p>I think about section and sectioning like about part of something defined. News, comment, page content, sidebar, *header*, and *footer*. Is it bad representation?</p></blockquote>
<p>Sectioning relates to the headings in some block of related content and defining what is related to what in a hierarchy of headings (<code>&lt;h1&gt;</code>&ndash;<code>&lt;h6&gt;</code>). The outlining algorithm can produce a table of contents from the nested <code>&lt;section&gt;</code>, <code>&lt;article&gt;</code>, <code>&lt;nav&gt;</code>, and <code>&lt;aside&gt;</code> elements.</p>
<p>Headers and footers themselves do not change the outline; a header or footer may contain no headings. If a header or footer <em>does</em> contain a heading, then that heading does come into the outline. See our article on <a href="http://html5doctor.com/the-section-element/">the section element</a>.</p>
<p>Thanks, Bruce</p>
<h2>Scaling the Video</h2>
<p>Ian asked:</p>
<blockquote><p>Hi there,</p>
<p>Not sure if this question is an appropriate one, but any help would be really appreciated.</p>
<p>I&#8217;m going about updating my video website, chutney.ie, and would love to implement HTML5. I am interested in replicating the scaling effect/style used on the <a href="http://www.mozilla.com/en-US/firefox/3.5/firstrun/">Mozilla welcome page</a>.</p>
<p>Not being overly knowledgeable in this area, I would love to know how to begin &mdash; is this effect a Flash based animation, or something that can be achieved with HTML alone?</p>
<p>Again, any nudge in the right direction would be great.</p>
<p>Many thanks,</p>
<p>Ian</p></blockquote>
<p>I&#8217;m not sure how Mozilla did it, but you can use some of the Webkit and Mozilla transforms on the <code>&lt;video&gt;</code> element. For example, you can cause the video to grow on hover &mdash; <a href="http://people.opera.com/patrickl/articles/introduction-html5-video/transitions/">see this example in Chrome, Safari, or Opera</a>. You can also use the <code>:target</code> pseudoclass to initiate animations. Alternatively, you can use a JavaScript <code>onClick</code> event to create the same effect. </p>
<p>You can also combine <code>&lt;video&gt;</code> and <code>&lt;canvas&gt;</code> to provide some interesting results (laying the <code>&lt;canvas&gt;</code> over the <code>&lt;video&gt;</code>). For more on the <code>&lt;video&gt;</code> element and what it can do, please read the <a href="http://dev.opera.com/articles/view/introduction-html5-video/">Introduction to <abbr>HTML</abbr>5 Video</a> on dev Opera written by <a href="http://twitter.com/brucel">Bruce Lawson</a> and <a href="http://twitter.com/patrick_h_lauke">Patrick Lauke</a>.</p>
<p>Cheers, Rich</p>
<h2>We need a <code>&lt;field&gt;</code> tag</h2>
<p>John wrote in and proposed a field element:</p>
<blockquote><p>Hey there. First off thanks for the site. I was excited to find it. I spent a little time on the W3C site and honestly couldn&#8217;t figure out how to submit suggestions there. So going to submit mine to you guys and maybe you can pass it on (if it is good) or point me to someone that can help. Ok to the point:</p>
<p>We are getting nice new tags to with HTML5 (nav, footer, etc) to help us create more semantic code. I think what we really need is a <code>field</code> tag &mdash; after all what are fieldsets sets of?</p>
<p>Everyone wraps up their labels and inputs with some element. Some of us do this with UL, some people do it with DT/DD, some with DIVs and some people out there insist that a form is tabular data.</p>
<p>We are all just bastardizing these elements because there is no clear semantic wrapper for field elements of a form.</p>
<p>I think you get the point. I&#8217;m trying to keep this email short. If you think there is anything to this argument, I have a more detailed summary (with example code) at:</p>
<p><a href="http://john.mirick.me/2009/10/what-is-really-set-of-shouldnt-we-have.html">http://john.mirick.me/2009/10/what-is-really-set-of-shouldnt-we-have.html</a></p>
<p>I would love to hear your thoughts on this.</p>
<p>Thanks!<br />
John</p></blockquote>
<p>While a field element would be nice &mdash; it would stop the argument over how best to mark-up forms &mdash; you have to ask yourself whether or not it actually adds any semantic or functional value to an HTML document. Yes, wrapping inputs and their labels in a field would make things easier to read and drop the need for the <code>for</code> attribute on the label (since the relationship can be assumed), but doing so would not be backwards compatible. In theory, we could continue to add <code>for</code> until there is a suitable time to drop it, but again I question the value of such a tag.</p>
<p>The purpose of wrapping form input/label pairs is generally to ease styling. My personal stance is that unless there are case studies showing how such an element can add more value to HTML forms, this proposal won&#8217;t make it very far.</p>
<p>Regards, Mike</p>
<h2>Got a question for us?</h2>
<p>That wraps up this round of questions. If you&#8217;ve got a query about the HTML5 spec or how to implement it, you can <a href="http://html5doctor.com/ask-the-doctor/">get in touch</a> with us and we&#8217;ll do our best to help. </p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark" class="crp_title">Your Questions Answered #8</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark" class="crp_title">Your Questions Answered #10</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Your%20Questions%20Answered%20%235%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;title=Your%20Questions%20Answered%20%235&amp;bodytext=We%27re%20back%20with%20our%20first%20round%20up%20of%20your%20questions%20for%202010.%20In%20this%20article%20we%27ll%20be%20covering%20a%20range%20of%20topics%20including%20sections%20and%20sectioning%2C%20the%20img%20element%2C%20scaling%20video%20and%20a%20proposal%20for%20a%20field%20element.%20" title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;title=Your%20Questions%20Answered%20%235" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;title=Your%20Questions%20Answered%20%235&amp;notes=We%27re%20back%20with%20our%20first%20round%20up%20of%20your%20questions%20for%202010.%20In%20this%20article%20we%27ll%20be%20covering%20a%20range%20of%20topics%20including%20sections%20and%20sectioning%2C%20the%20img%20element%2C%20scaling%20video%20and%20a%20proposal%20for%20a%20field%20element.%20" title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;title=Your%20Questions%20Answered%20%235" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Your%20Questions%20Answered%20%235&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;t=Your%20Questions%20Answered%20%235" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;title=Your%20Questions%20Answered%20%235&amp;annotation=We%27re%20back%20with%20our%20first%20round%20up%20of%20your%20questions%20for%202010.%20In%20this%20article%20we%27ll%20be%20covering%20a%20range%20of%20topics%20including%20sections%20and%20sectioning%2C%20the%20img%20element%2C%20scaling%20video%20and%20a%20proposal%20for%20a%20field%20element.%20" title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Your%20Questions%20Answered%20%235&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;t=Your%20Questions%20Answered%20%235" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;title=Your%20Questions%20Answered%20%235&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=We%27re%20back%20with%20our%20first%20round%20up%20of%20your%20questions%20for%202010.%20In%20this%20article%20we%27ll%20be%20covering%20a%20range%20of%20topics%20including%20sections%20and%20sectioning%2C%20the%20img%20element%2C%20scaling%20video%20and%20a%20proposal%20for%20a%20field%20element.%20" title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;h=Your%20Questions%20Answered%20%235" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-5%2F&amp;t=Your%20Questions%20Answered%20%235&amp;s=We%27re%20back%20with%20our%20first%20round%20up%20of%20your%20questions%20for%202010.%20In%20this%20article%20we%27ll%20be%20covering%20a%20range%20of%20topics%20including%20sections%20and%20sectioning%2C%20the%20img%20element%2C%20scaling%20video%20and%20a%20proposal%20for%20a%20field%20element.%20" title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/your-questions-5/" rel="bookmark">Your Questions Answered #5</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on March 2, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-5/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>September HTML5 spec changes</title>
		<link>http://html5doctor.com/september-html5-spec-changes/</link>
		<comments>http://html5doctor.com/september-html5-spec-changes/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:00:20 +0000</pubDate>
		<dc:creator>Remy Sharp</dc:creator>
				<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[dt]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[legend]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=911</guid>
		<description><![CDATA[
            
                
            
        September being one month before the HTML5 [...]]]></description>
			<content:encoded><![CDATA[<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
            <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F">
                <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
            </a>
        </div>September being one month before the HTML5 spec goes to last call in October, there&#8217;s been a few significant changes to the HTML5 spec that we wanted to briefly share with our patients.</p>

<p><span id="more-911"></span></p>

<h2>Clarification over <code>section</code> and <code>article</code></h2>

<p>The spec has been clarified to help authors correctly choose between when to use <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element">section</a> and when to use <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-article-element">article</a>, and <a href="http://html5doctor.com/the-section-element/">Bruce&#8217;s section post</a> has also been updated.</p>

<h2><code>footer</code> now works like <code>header</code></h2>

<p>This was a big one and causing confusing to people coming to HTML5 for the first time.  Originally you couldn&#8217;t include a <code>nav</code> element inside a footer, or a <code>section</code>. </p>

<p>Now the spec has been <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element">changed to match the <code>header</code> element</a>.</p>

<h2><code>details</code> and <code>figure</code> saved</h2>

<p>Instead of using legend, <a href="http://html5doctor.com/legend-not-such-a-legend-anymore/">which didn&#8217;t work</a>, <a href="http://adactio.com">Jeremy</a> suggested (although slightly tongue in cheek) to use <code>dt</code> for the title and <code>dd</code> for the body.  Ian Hickson agreed, and <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#the-figure-element">it&#8217;s in</a></p>

<p>Example:</p>

<pre><code>&lt;figure&gt;
 &lt;dd&gt;&lt;video src=&quot;ex-b.mov&quot;&gt;&lt;/video&gt;
 &lt;dt&gt;Exhibit B. The &lt;cite&gt;Rough Copy&lt;/cite&gt; trailer.
&lt;/figure&gt;</code></pre>

<h2><code>aside</code> has better examples</h2>

<p>The documentation has been updated to specify <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-aside-element">better examples</a> of how the aside element can be used.</p>

<p>Better examples help us authors understand how it can be used.</p>

<h2>Dropped Elements</h2>

<p>The following elements have been dropped from the HTML5 spec (though <code>bb</code> and <code>datagrid</code> were some time ago, and <code>datagrid</code> has been postponed rather than dropped entirely):</p>

<ul>
<li><a href="http://html5.org/tools/web-apps-tracker?from=3858&#038;to=3859">dialog</a></li>
<li>bb</li>
<li>datagrid</li>
</ul>

<h2>Ch-ch-changes</h2>

<p>We&#8217;ll be posting in more detail about some of these changes, and as further changes come out of the editing process we&#8217;ll no doubt keep you all up to date, either via our <a href="http://twitter.com/html5doctor">Twitter account</a> (which you should follow) or feel free to <a href="http://html5doctor.com/contact/">let us know too</a>!<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/legend-not-such-a-legend-anymore/" rel="bookmark" class="crp_title">Legend not such a legend anymore</a></li><li><a href="http://html5doctor.com/the-section-element/" rel="bookmark" class="crp_title">The section element</a></li><li><a href="http://html5doctor.com/the-figure-figcaption-elements/" rel="bookmark" class="crp_title">The figure &#038; figcaption elements</a></li><li><a href="http://html5doctor.com/small-hr-element/" rel="bookmark" class="crp_title">The small &amp; hr elements</a></li><li><a href="http://html5doctor.com/the-footer-element-update/" rel="bookmark" class="crp_title">The Footer Element Update</a></li></ul></div></p>

<p>Share and Save:</p>

<pre><code>&lt;a rel="nofollow"  href="http://twitter.com/home?status=September%20HTML5%20spec%20changes%20-%20http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F" title="Twitter"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;amp;url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;title=September%20HTML5%20spec%20changes&amp;amp;bodytext=September%20being%20one%20month%20before%20the%20HTML5%20spec%20goes%20to%20last%20call%20in%20October%2C%20there%27s%20been%20a%20few%20significant%20changes%20to%20the%20HTML5%20spec%20that%20we%20wanted%20to%20briefly%20share%20with%20our%20patients.%0D%0A%0D%0A%0D%0A%0D%0A%23%23%20Clarification%20over%20section%20and%20article%0D%0A%0D%0AThe%20spec%20has" title="Digg"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;amp;m=submit&amp;amp;link=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F" title="Sphinn"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;title=September%20HTML5%20spec%20changes" title="Reddit"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;title=September%20HTML5%20spec%20changes&amp;amp;notes=September%20being%20one%20month%20before%20the%20HTML5%20spec%20goes%20to%20last%20call%20in%20October%2C%20there%27s%20been%20a%20few%20significant%20changes%20to%20the%20HTML5%20spec%20that%20we%20wanted%20to%20briefly%20share%20with%20our%20patients.%0D%0A%0D%0A%0D%0A%0D%0A%23%23%20Clarification%20over%20section%20and%20article%0D%0A%0D%0AThe%20spec%20has" title="del.icio.us"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;title=September%20HTML5%20spec%20changes" title="StumbleUpon"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F" title="Technorati"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.netvibes.com/share?title=September%20HTML5%20spec%20changes&amp;amp;url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F" title="Netvibes"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;t=September%20HTML5%20spec%20changes" title="Facebook"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;title=September%20HTML5%20spec%20changes&amp;amp;annotation=September%20being%20one%20month%20before%20the%20HTML5%20spec%20goes%20to%20last%20call%20in%20October%2C%20there%27s%20been%20a%20few%20significant%20changes%20to%20the%20HTML5%20spec%20that%20we%20wanted%20to%20briefly%20share%20with%20our%20patients.%0D%0A%0D%0A%0D%0A%0D%0A%23%23%20Clarification%20over%20section%20and%20article%0D%0A%0D%0AThe%20spec%20has" title="Google Bookmarks"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.friendfeed.com/share?title=September%20HTML5%20spec%20changes&amp;amp;link=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F" title="FriendFeed"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;t=September%20HTML5%20spec%20changes" title="HackerNews"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;amp;url=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;title=September%20HTML5%20spec%20changes&amp;amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;amp;summary=September%20being%20one%20month%20before%20the%20HTML5%20spec%20goes%20to%20last%20call%20in%20October%2C%20there%27s%20been%20a%20few%20significant%20changes%20to%20the%20HTML5%20spec%20that%20we%20wanted%20to%20briefly%20share%20with%20our%20patients.%0D%0A%0D%0A%0D%0A%0D%0A%23%23%20Clarification%20over%20section%20and%20article%0D%0A%0D%0AThe%20spec%20has" title="LinkedIn"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;h=September%20HTML5%20spec%20changes" title="NewsVine"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /&gt;&lt;/a&gt;
&lt;a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;amp;u=http%3A%2F%2Fhtml5doctor.com%2Fseptember-html5-spec-changes%2F&amp;amp;t=September%20HTML5%20spec%20changes&amp;amp;s=September%20being%20one%20month%20before%20the%20HTML5%20spec%20goes%20to%20last%20call%20in%20October%2C%20there%27s%20been%20a%20few%20significant%20changes%20to%20the%20HTML5%20spec%20that%20we%20wanted%20to%20briefly%20share%20with%20our%20patients.%0D%0A%0D%0A%0D%0A%0D%0A%23%23%20Clarification%20over%20section%20and%20article%0D%0A%0D%0AThe%20spec%20has" title="Tumblr"&gt;&lt;img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /&gt;&lt;/a&gt;
</code></pre>

<p>&lt;br/>&lt;br/></p>
<p><a href="http://html5doctor.com/september-html5-spec-changes/" rel="bookmark">September HTML5 spec changes</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on September 17, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/september-html5-spec-changes/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Designing a blog with html5</title>
		<link>http://html5doctor.com/designing-a-blog-with-html5/</link>
		<comments>http://html5doctor.com/designing-a-blog-with-html5/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:00:21 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Structure]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[aside]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=47</guid>
		<description><![CDATA[
			
				
			
		
Much of HTML 5&#8217;s feature set involves JavaScript APIs that make it easier to develop interactive web pages but there are a slew of new elements that allow you extra semantics in your conventional Web 1.0 pages. In order to investigate these, let&#8217;s look at marking up a blog.
Firstly what we&#8217;ll do is use the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>Much of <abbr>HTML</abbr> 5&#8217;s feature set involves JavaScript <abbr>API</abbr>s that make it easier to develop interactive web pages but there are a slew of new elements that allow you extra semantics in your conventional Web 1.0 pages. In order to investigate these, let&#8217;s look at marking up a blog.</p>
<p>Firstly what we&#8217;ll do is use the <code>header</code>, <code>footer</code>, <code>and nav </code>elements to mark up the broad structure of the page. We&#8217;ll make the blog comments form much smarter by using the new data types and built-in validation available in <abbr>HTML</abbr> 5-aware browsers. </p>
<p>Then we&#8217;ll do some work on the guts of the page, using <abbr>HTML</abbr> 5&#8217;s <code>article</code> elements to better mark up blog posts and comments and show how to use the <code>section</code> elements to better structure accessible hierarchical headings on sites that are <abbr>CMS</abbr>-driven. As blogs are chronologically ordered, we&#8217;ll  see what <abbr>HTML 5</abbr> offers us for representing dates and times.</p>
<p>So take the phone of the hook, and make a cup of tea and we&#8217;ll get started.</p>
<p><section></p>
<h2>Setting the DOCTYPE</h2>
<p><abbr>HTML</abbr> 5, when used as plain <abbr>HTML</abbr> rather than its <abbr>XHTML</abbr> 5 sibling doesn&#8217;t need a DOCTYPE. But all browsers do, otherwise they go into <a href="http://en.wikipedia.org/wiki/Quirks_mode">Quirksmode</a>, which you don&#8217;t want: the collision of <abbr>HTML</abbr> 5 and Quirksmode is like matter and anti-matter meeting, and will cause a negative reality inversion that will make your underwear catch fire. </p>
<p>You&#8217;ve been warned, so at the top of your document, you need the line <code>&lt;!DOCTYPE html&gt;</code>.</p>
<p>Some sites &#8220;use&#8221; <abbr>HTML</abbr> 5, when in actual fact all they&#8217;ve done is take their existing code and change the DOCTYPE. That&#8217;s fine and dandy if you&#8217;ve been using valid, semantic code as <abbr>HTML</abbr> 5 is very similar to valid <abbr>HTML</abbr> 4.01. <a href="http://meyerweb.com/eric/thoughts/2009/01/02/an-event-apart-and-html-5/">Eric Meyer mentions small differences</a> like &#8220;not permitting a value attribute on an image submit&#8221;, and there are a few differences between the languages, summarised in the document <a href="http://dev.w3.org/html5/html4-differences/">HTML 5 differences from HTML 4</a>.</p>
<p>However, I don&#8217;t want simply to  rebadge my existing code, but to use some of the new structural elements now.</p>
<p></section><br />
<section></p>
<h2>Using some new structural elements</h2>
<p>My blog &#8211; like millions of others &#8211; has a header denoted by <code>&lt;div id="header"&gt;</code>, a footer <code>&lt;div id="footer"&gt;</code>, some articles (wrapped by an area called &#8220;content&#8221;, <code>&lt;div id="content"&gt;</code>) and some navigation (wrapped up in an area called &#8220;sidebar&#8221; <code>&lt;div id="sidebar"&gt;</code>). Most sites on the Web have similar constructs, although depending on your choice they might be called &quot;branding&quot; or &quot;info&quot; or &quot;menu&quot;, or you might use the equivalent words in your own language. </p>
<p>Although these all have very different functions within the page, they  use  the same generic <code>div</code> in the markup. as <abbr>HTML 4</abbr> has no other way to code them. <abbr>HTML</abbr> 5 has new elements for distinguishing  these logical areas: <code>header</code>, <code>nav</code>, <code>footer</code> and friends. (There&#8217;s  more on this in an artice by Lachlan Hunt on A List Apart: <a href="http://www.alistapart.com/articles/previewofhtml5">A Preview of <abbr>HTML</abbr> 5</a>.)</p>
<p>The overall aim is to replace this structure:</p>
<p><img src="/wp-content/uploads/2009/06/html5-before1.gif" alt="structure chart before redesign"></p>
<p>with this:</p>
<p><img src="/wp-content/uploads/2009/06/html5-after1.gif" alt="structure chart after redesign"></p>
<p>It&#8217;s a simple matter to change the <abbr>HTML</abbr> <code>div</code>s into the new elements. The only difficulty I had was deciding which element to use to mark up my sidebar, as it also includes a search field and &#8220;colophon&#8221; information as well as site-wide navigation. I decided against the <code>aside</code> element,  as <a href="http://dev.w3.org/html5/spec/Overview.html#the-aside-element">the spec says</a> it &#8220;represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content&#8221;, but it&#8217;s nevertheless <em>content</em> rather than navigation. So I decided to go for the <code>nav</code> element as the closest fit.</p>
<p>I&#8217;ve wrapped the main content in a <code>section</code> element (previously I&#8217;d kept it as a <code>div</code>). <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-section-element"><code>section</code> is defined</a> in the spec</p>
<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-section-element"><p>The section element represents a generic document or application section. A section, in this context, is a thematic grouping of content, typically with a heading, possibly with a footer.</p></blockquote>
<p class="warning"><strong>Please note: I no longer recommend wrapping the whole content area in a <code>section</code> element, and suggest that you use a <code>div</code> element. Read more about <a href="/the-section-element">using section appropriately</a>.</strong></p>
<p>In this case, the &#8220;generic document section&#8221; is that of main content. I&#8217;ve retained an <code>id</code> so that a <a href="http://juicystudio.com/article/skip-links.php">skip links</a> feature will work, although I hope that in the future, assistive technology will offer an automatic way for people to go to the first <code>section</code> or <code>article</code>.</p>
<p>My fellow <abbr>HTML</abbr> 5 doctor, Remy Sharp, also notes  that if you retain the <code>div</code>, Internet Explorer without JavaScript would style the div, but none of the other content, making the site  very hard to read.</p>
<p></section><br />
<section></p>
<h2>New form attributes</h2>
<p>As well as the main structural item on the page, I&#8217;ve added some new attributes on <code>input</code> elements in the comments form.</p>
<p><abbr>HTML</abbr> 5 was designed to reflect what developers actually do rather than to reflect a philosophical purity, and that&#8217;s very clearly manifested in the new attributes which mean the browser takes up much of the work currently done by developers re-inventing validation routines in JavaScript. (Extending forms functionality was <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/introduction.html#history-0">how the <abbr>HTML</abbr> 5 spec began</a>).</p>
<p>So I amended the email input field in the comments to be <code>input type="email"</code> which means that when the user submits the form, an <abbr>HTML</abbr> 5-aware browser will use built-in validation routines to check that it&#8217;s in the correct format, without any JavaScript. Check it out in the current version of <a href="http://www.opera.com/">Opera</a>, as that the only full implementation at the time of writing (June 2009), and note that it also adds a &#8220;mail&#8221; icon in the input field as a cue to the user.</p>
<p>There are similar input validation routines triggered by some of the  new <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-type"><code>input</code> types</a>, such as <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#url-state"><code>url</code></a> (which I use on the field that asks for the user&#8217;s web address), <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#number-state"><code>number</code></a> and <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-pattern"><code>pattern</code></a> which compares the input with an arbitrary regular expression.</p>
<p>Another good example is <code>input type="date"</code>, which pops up a calendar widget/ date picker when the user focusses on the input field. You can <a href="http://people.opera.com/brucel/demo/html5-forms-demo.html">test the date picker</a>, or here&#8217;s a screenshot from Opera 9.6:</p>
<p><img src="/wp-content/uploads/2009/06/html5-form-date.gif" alt="date picker pops up next to input field"></p>
<p>A very useful new attribute I used on both <code>input</code> fields for commenter&#8217;s name and email address, and the comment <code>textarea</code> was <code>type="required"</code> which generates a message on submission if the fields are left blank. Each different localisation of a browser would need to have a different message, and it&#8217;s not (so far) customisable by the developer. </p>
<p><img src="/wp-content/uploads/2009/06/html5-required-feedback.gif" alt="red-bordered browser message 'You have to specify a value'" next to unfilled required field"></p>
<p>The good thing with all this new form fabulousness is it&#8217;s all formed around new attributes on an exisiting element, so people using older browsers just see a plain old <code>input</code> field.</p>
<p>    <section></p>
<h3>A note on screenreaders and <abbr>HTML 5</abbr></h3>
<p>I hope screenreaders are ready for these new interactions; I asked the html 5 group to formally <a href="http://lists.w3.org/Archives/Public/public-html/2007Jul/1249.html">invite screenreader vendors to participate</a> in the specification; to my knowledge, <a href="http://lists.w3.org/Archives/Public/public-html/2008Aug/0795.html">none have done so</a>.</p>
<p>    </section><br />
</section><br />
<section></p>
<h2>Laying out the new elements</h2>
<p>It&#8217;s not too hard to layout the new elements. In all the non-<abbr>IE</abbr> browsers, you can lay out anything using <abbr>CSS</abbr> &#8211; even a <a href="http://people.opera.com/brucel/demo/html5-nonsense-element.html">nonsense element</a>. One gotcha  is that that the current crop of browsers have no &#8220;knowledge&#8221; of these elements, although <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)">support is improving all the time</a>.</p>
<p>All browsers have default settings for the elements they &#8220;know about&#8221;&mdash;how much padding, margin they element gets, does it display as a block or inline?. (Here&#8217;s a <a href="http://www.w3.org/TR/CSS2/sample.html">sample default stylesheet</a>.) Unless over-ridden by <abbr>CSS</abbr>, these defaults apply. But the browsers don&#8217;t know about <code>header</code>, <code>nav</code> and the like, so have no defaults to apply to them.</p>
<p>I got terrible rendering oddities until I explicitly told the browsers </p>
<pre><code>header, footer, nav, article {display:block;}</code></pre>
<p>    <section></p>
<h3><abbr>IE</abbr> layout</h3>
<p>There&#8217;s one gotcha about styling <abbr>HTML</abbr> 5 pages in <abbr>IE</abbr>: it doesn&#8217;t work. You can force it to quite easily with a JavaScript hack <code>document.createElement('element name')</code>. (Lachlan Hunt gets to the bottom of <a href="http://blog.whatwg.org/supporting-new-elements-in-ie">why IE needs this</a>.)</p>
<p>For your convenience, Remy Sharp has written an <a href="http://remysharp.com/2009/01/07/html5-enabling-script/"><abbr>HTML</abbr> 5 enabling script</a> which I use in the header to conjure all the missing elements into existence all at once.</p>
<p>But let&#8217;s be clear: <strong>this won&#8217;t work if your <abbr>IE</abbr> user doesn&#8217;t have JavaScript turned on</strong>. How much of that&#8217;s a big deal that is for you to decide. Pragmatically, it seems to me that the sites that will benefit the most from HTML 5’s new “Ajax”-style features, such as drag-and-drop, are the sites that currently have no hope of working without JavaScript. </p>
<p>    </section><br />
    <section></p>
<h3>Firefox 2 and Camino 1 layout</h3>
<p>Firefox 2 and Camino 1 both use Gecko 1.9 which has a bug and so gets grumpy if you don&#8217;t serve the page as <abbr>XHTML</abbr>. (Go figure; that&#8217;s almost enough to trigger a negative reality inversion and you know how bad that can be). However, Firefox and Camino users upgrade frequently so Firefox is in version 3, while Camino 2 beta is out, so the problem will soon cease to exist. (Read more at <a href="/how-to-get-html5-working-in-ie-and-firefox-2/">How to get HTML5 working in IE and Firefox 22</a> by Remy Sharp.)</p>
<p>    </section><br />
</section><br />
<section></p>
<h2>What&#8217;s the point of those new structural elements?</h2>
<p>Well, they add semantics to the page. The browser now knows which area of your site is the header or the footer because there are <code>header</code> and <code>footer</code> elements, whereas <code>div</code> might be called &#8220;branding&#8221; and &#8220;legal&#8221;, or even  &#8220;<span lang="fr">en-tete</span>&#8221; and &#8220;<span lang="fr">pied-de-page</span>&#8221; or &#8220;<span lang="de">kopfzeile</span>&#8221; and &#8220;<span lang="de">fusszeile</span>&#8220;.</p>
<p>But <em>so what</em>?</p>
<p>Robin Berjon expressed it beautifully in a <a href="http://www.alistapart.com/comments/semanticsinhtml5?page=2#12">comment on <cite>A List Apart</cite></a>: </p>
<blockquote cite="http://www.alistapart.com/comments/semanticsinhtml5?page=2#12">
<p>Pretty much everyone in the Web community agrees that “semantics are yummy, and will get you cookies”, and that’s probably true. But once you start digging a little bit further, it becomes clear that very few people can actually articulate a reason why. So before we all go another round on this, I have to ask: what’s it you wanna do with them darn semantics?</p>
<p>The general answer is “to repurpose content”. That’s fine on the surface, but you quickly reach a point where you have to ask “repurpose to what?” &hellip; I think <abbr>HTML</abbr> should add only elements that either expose functionality that would be pretty much meaningless otherwise (e.g. <code>canvas</code>) or that provide semantics that help repurpose for Web browsing uses.</p>
</blockquote>
<p>In my view, there are a couple of things I want to do with those semantics. The first is for search engine use; it&#8217;s easy to imagine Messrs Google or Yahoo! giving lower weighting to content in <code>footer</code> elements, or extra weight to content in the <code>header</code>. The second reason is to make the site navigable for people with disabilities. People with learning difficulties might instruct their browser always to put the articles before the navigation, for example. User agents might very well have a keyboard shortcut which jumped straight to the <code>nav</code> for example, or jumped straight past the navigation, in a programmatic implementation of &#8220;<a href="http://juicystudio.com/article/skip-links.php">skip links</a>&#8220;.</p>
<p>Which brings me to&hellip;</p>
<p></section><br />
<section></p>
<h2>Further refining the <abbr>HTML</abbr> 5 structure</h2>
<p><section></p>
<h3>The blog home page</h3>
<p>An interesting thing about a blog homepage is that there are generally the last 5 or so posts, each with a heading, a &quot;body&quot; and data about the post (time, who wrote it, how many comments etc.) and usually a link to another page that has the full blog post (if the homepage just showed an excerpt) and its comments.</p>
<p><abbr>HTML</abbr> 5 has an <a href="http://dev.w3.org/html5/spec/Overview.html#the-article-element"><code>article</code> element</a> which I use to wrap each story: </p>
<blockquote cite="http://dev.w3.org/html5/spec/Overview.html#the-article-element">
<p>The article element represents a section of a page that consists of a composition that forms an independent part of a document, page, or site. This could be a forum post, a magazine or newspaper article, a Web log entry, a user-submitted comment, or any other independent item of content.</p>
</blockquote>
<p>Let&#8217;s look in more detail at the guts of how I mark up each blogpost.</p>
<h3>Anatomy of a blog post</h3>
<p><img src="/wp-content/uploads/2009/06/html5-article-outline.gif" alt="diagram of article structure; explanation follows"></p>
<p>The wrapper is no longer a generic <code>div</code> but an <code>article</code>. Within that is a <code>header</code>, comprising a heading (the title of the blogpost) and then the time of publication,  marked up using the <code>time</code> element.</p>
<p>Then there are the pearls of wit and wisdom that consitute each of my posts, marked up as paragraphs, blockquotes etc., and is pulled unchanged out of the database. Following that is data about the blog post (category, how many comments) marked up as a footer and, in the case of pages that show a single blogpost, there are comments expressing undying admiration and love. Finally, there may be navigation from one article to the next.</p>
<p>    <section></p>
<h4>Data about the article</h4>
<p>Following the content there is some &#8220;metadata&#8221; about the post: what category it&#8217;s in, how many comments there are. I&#8217;ve marked this up as <code>footer</code>.  I previously used <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-aside-element"><code>aside</code></a> which &#8220;represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content&#8221; but decided that it was too much of a stretch; data <em>about</em> a post is intimately related.</p>
<p><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-footer-element"><code>footer</code></a> is a much better fit: &#8220;A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.&#8221; I was initially thrown off-course by the presentational name of the element; my use here isn&#8217;t at the bottom of the page, or even at the bottom of the article, but it certainly seems to fit the bill &#8211; it&#8217;s information about its section, containing author name, links to related documents (comments) and the like. There&#8217;s no reason that you can&#8217;t have more than one <code>footer</code> on page; the spec&#8217;s description says &quot;the footer element represents a footer for the section it applies to&quot; and a page may have any number of sections. The spec also says &quot;Footers don&#8217;t necessarily have to appear at the end of a section, though they usually do.&quot;</p>
<p>    </section><br />
    <section></p>
<h4>Comments</h4>
<p>I&#8217;ve marked up comments as <code>article</code>s, too, as the spec says that an <code>article</code> could be &#8220;a user-submitted comment&#8221;, but nested these inside the parent <code>article</code>. The spec says</p>
<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-article-element"><p>When article elements are nested, the inner article elements represent articles that are in principle related to the contents of the outer article. For instance, a Web log entry on a site that accepts user-submitted comments could represent the comments as article elements nested within the article element for the Web log entry.</p></blockquote>
<p>These are headed with the  date and the time of the comment and name of its author&mdash;if you want, you can wrap these in a <code>header</code>, too, but to me it seems like markup for the sake of it.</p>
<p>    </section><br />
    <section></p>
<h4>Times and dates</h4>
<p>Most blogs, news sites and the like provide dates of article publication.</p>
<p>Microformats people, the most vocal advocates of marking up dates and times, believe that  computer-formatted dates are best for people: their <a href="http://microformats.org/wiki/index.php?title=date-design-pattern&#038;diff=37974&#038;oldid=34166">wiki  says</a> &#8220;the ISO8601 YYYY-MM-DD format for dates is the best choice that is the most accurately readable for the most people worldwide, and thus the most accessible as well&#8221;. I don&#8217;t agree (and neither do candidates in my vox pop of non-geeks, my wife, brother and parents). </p>
<p>I do agree with the microformats people that <a href="http://microformats.org/wiki/principles">hidden metadata is not as good as visible, human-readable data</a> and therefore elected not to use the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-article-element"><code>pubdate</code> attribute of <code>article</code></a>.</p>
<p>Therefore I&#8217;ve used the <abbr>HTML</abbr> 5 <code>time</code> element to give a  machine parsable date to computers, while giving people a human-readable date. Blog posts get the date, while comments get the date and time.</p>
<p>The spec is quite hard to understand, in my opinion, but the format you use is 2004-02-28T15:19:21+00:00, where T separates the date and the time, and the + (or a -) is the offset from <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time"><abbr>UTC</abbr></a>. Dates on their own don&#8217;t need a timezone; full datetimes do. Oddly, the spec suggests that if you use a time without a date, you don&#8217;t need a timezone either.</p>
<p>There&#8217;s considerable controversy over the time element at the moment. Recently one of the inner circle, <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018687.html">Henri Sivonen, wrote</a> that it&#8217;s for marking up future events only and not for timestamping blogs or news items: &#8220;The expected use cases of hCalendar are mainly transferring <i>future</i> event entries from a Web page into an application like iCal.&quot; This seems very silly to me; if there is a <code>time</code> element, why not allow me to mark up any time or date? </p>
<p>The <a href="http://dev.w3.org/html5/spec/Overview.html#the-time-element">spec for <code>time</code></a> does not mention the future event-only restriction: &quot;The time element represents a precise date and/or a time in the proleptic Gregorian calendar&quot; and gives three examples, two of which are about the past and none of which are &quot;future events&quot;. Although the spec doesn&#8217;t (currently) limit use of the element, it does limit format to precise dates in &quot;the proleptic Gregorian calendar&quot;. This means I can mark up an archive page for &quot;all blog posts today&quot; using time, but not &quot;all July 2008 posts&quot; as that&#8217;s not a full YYYY-MM-DD date. Neither can you mark up precise, but ancient dates, so the date of Julius Ceasar&#8217;s assassination, <a href="http://en.wikipedia.org/wiki/Ides_of_March">15 March 44 <abbr>BC</abbr></a> is not compatible.</p>
<p>I don&#8217;t expect this to be resolved. If you think as I do, feel free to <a href="http://www.whatwg.org/mailing-list#specs">mail the Working Group</a> to express your feeling!</p>
<p>    </section><br />
</section></p>
<p>Hopefully, this brief article (geddit?) has given you a quick overview of how to use some of the new semantic elements. Let me know what you think!</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/aside-revisited/" rel="bookmark" class="crp_title">Aside Revisited</a></li>
<li><a href="http://html5doctor.com/native-drag-and-drop/" rel="bookmark" class="crp_title">Native Drag and Drop</a></li>
<li><a href="http://html5doctor.com/the-time-element/" rel="bookmark" class="crp_title">The time element (and microformats)</a></li>
<li><a href="http://html5doctor.com/the-section-element/" rel="bookmark" class="crp_title">The section element</a></li>
<li><a href="http://html5doctor.com/draw-attention-with-mark/" rel="bookmark" class="crp_title">Draw attention with mark</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Designing%20a%20blog%20with%20html5%20-%20http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;title=Designing%20a%20blog%20with%20html5&amp;bodytext=Much%20of%20HTML%205%27s%20feature%20set%20involves%20JavaScript%20APIs%20that%20make%20it%20easier%20to%20develop%20interactive%20web%20pages%20but%20there%20are%20a%20slew%20of%20new%20elements%20that%20allow%20you%20extra%20semantics%20in%20your%20conventional%20Web%201.0%20pages.%20In%20order%20to%20investigate%20these%2C%20let%27s%20lo" title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;title=Designing%20a%20blog%20with%20html5" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;title=Designing%20a%20blog%20with%20html5&amp;notes=Much%20of%20HTML%205%27s%20feature%20set%20involves%20JavaScript%20APIs%20that%20make%20it%20easier%20to%20develop%20interactive%20web%20pages%20but%20there%20are%20a%20slew%20of%20new%20elements%20that%20allow%20you%20extra%20semantics%20in%20your%20conventional%20Web%201.0%20pages.%20In%20order%20to%20investigate%20these%2C%20let%27s%20lo" title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;title=Designing%20a%20blog%20with%20html5" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Designing%20a%20blog%20with%20html5&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;t=Designing%20a%20blog%20with%20html5" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;title=Designing%20a%20blog%20with%20html5&amp;annotation=Much%20of%20HTML%205%27s%20feature%20set%20involves%20JavaScript%20APIs%20that%20make%20it%20easier%20to%20develop%20interactive%20web%20pages%20but%20there%20are%20a%20slew%20of%20new%20elements%20that%20allow%20you%20extra%20semantics%20in%20your%20conventional%20Web%201.0%20pages.%20In%20order%20to%20investigate%20these%2C%20let%27s%20lo" title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Designing%20a%20blog%20with%20html5&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;t=Designing%20a%20blog%20with%20html5" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;title=Designing%20a%20blog%20with%20html5&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=Much%20of%20HTML%205%27s%20feature%20set%20involves%20JavaScript%20APIs%20that%20make%20it%20easier%20to%20develop%20interactive%20web%20pages%20but%20there%20are%20a%20slew%20of%20new%20elements%20that%20allow%20you%20extra%20semantics%20in%20your%20conventional%20Web%201.0%20pages.%20In%20order%20to%20investigate%20these%2C%20let%27s%20lo" title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;h=Designing%20a%20blog%20with%20html5" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fdesigning-a-blog-with-html5%2F&amp;t=Designing%20a%20blog%20with%20html5&amp;s=Much%20of%20HTML%205%27s%20feature%20set%20involves%20JavaScript%20APIs%20that%20make%20it%20easier%20to%20develop%20interactive%20web%20pages%20but%20there%20are%20a%20slew%20of%20new%20elements%20that%20allow%20you%20extra%20semantics%20in%20your%20conventional%20Web%201.0%20pages.%20In%20order%20to%20investigate%20these%2C%20let%27s%20lo" title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/designing-a-blog-with-html5/" rel="bookmark">Designing a blog with html5</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on June 30, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/designing-a-blog-with-html5/feed/</wfw:commentRss>
		<slash:comments>140</slash:comments>
		</item>
		<item>
		<title>The header element</title>
		<link>http://html5doctor.com/the-header-element/</link>
		<comments>http://html5doctor.com/the-header-element/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 12:20:19 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=62</guid>
		<description><![CDATA[
			
				
			
		
Recently, we have seen a growing interest in HTML 5 and it&#8217;s adoption by web professionals. Within the HTML 5 specfication we can see that there have been a significant number of new tags added, one of these the &#60;header&#62; element is what we&#8217;ll be covering in this post. We&#8217;ll talk about when to use [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently, we have seen a growing interest in <abbr title="Hypertext Mark-up Language">HTML</abbr> 5 and it&#8217;s adoption by web professionals. Within the <a href="http://dev.w3.org/html5/spec/Overview.html">HTML 5 specfication</a> we can see that there have been a significant number of new tags added, one of these the <code>&lt;header&gt;</code> element is what we&#8217;ll be covering in this post. We&#8217;ll talk about when to use it, when not to use it, it&#8217;s must haves and must not haves. Ready? Let&#8217;s dive straight in.<span id="more-62"></span></p>
<p>So you&#8217;re used to seeing</p>
<pre><code>&lt;div id="header"&gt;</code></pre>
<p>on a large majority of sites that you visit, well now with <abbr title="Hypertext Mark-up Language">HTML</abbr> 5 that isn&#8217;t required anymore we can add some more semantic value with the <code>&lt;header&gt;</code> element.</p>
<h2>What does the element represent?</h2>
<p>According to the spec the header element represents</p>
<blockquote><p>a group of introductory or navigational aids. A header element typically contains the section&#8217;s heading (an h1–h6 element or an hgroup element), but can also contain other content, such as a table of contents, a search form, or any relevant logos.</p></blockquote>
<p>It is important to note that the <code>&lt;header&gt;</code> element doesn&#8217;t introduce a new section but is the head of a section. You should also note that the <code>&lt;header&gt;</code> element should not be confused with the <code>&lt;head&gt;</code> element.</p>
<h2>Where would I use the <code>&lt;header&gt;</code> element</h2>
<p>Well the obvious place to start would be at the beginning of your page. We we can start with something like this that includes your primary page heading.</p>
<pre>
<code>&lt;header&gt;
&lt;h1&gt;The most important heading on this page&lt;/h1&gt;
&lt;/header&gt;</code>
</pre>
<p>An important point to note is that you are not restricted to use one <code>&lt;header&gt;</code> element per site, you can use multiple headers, each of which will then become the <code>&lt;header&gt;</code> for that section of the document. You could therefore have&#8230;</p>
<pre>
<code>&lt;header&gt;
    &lt;h1&gt;The most important heading on this page&lt;/h1&gt;
&lt;/header&gt;

&lt;article&gt;
&lt;header&gt;
    &lt;h1&gt;Title of this article&lt;/h1&gt;
&lt;/header&gt;
    &lt;p&gt;...Lorem Ipsum dolor set amet...&lt;/p&gt;
&lt;/article&gt;</code>
</pre>
<p>Also note the use of two <code>&lt;h1&gt;</code>&#8217;s within that piece of html, this is perfectly valid in <abbr title="Hypertext Mark-up Language">HTML</abbr> 5 (and HTML 4) but will cause issues with accessibility, so we advise caution if you have a large number of articles on a page. We will cover this in more detail in another post. </p>
<h3>What is required in the <code>&lt;header&gt;</code> element</h3>
<p>We now know that we can have multiples headers in a page but what are the must have&#8217;s within the element in order for it to validate?</p>
<p>In short, a <code>&lt;header&gt;</code> typically contains at least (but not restricted to) one heading tag (<code>&lt;h1&gt;</code> &#8211; <code>&lt;h6&gt;</code>). You can also include the <code>&lt;hgroup&gt;</code> element but we&#8217;ll discuss that more in another post (<a href="http://dev.w3.org/html5/spec/Overview.html#the-hgroup-element">read more about the hgroup in the spec</a>). The element can also contain other content within the document flow such as a table of contents, logos or a search form. Following a recent change to the spec you can now include the <code>&lt;nav&gt;</code> element within the <code>&lt;header&gt;</code>. </p>
<h3>Styling the <code>&lt;header&gt;</code></h3>
<p>One short point I&#8217;d also like to cover is that in order for the majority of browsers to render the <code>&lt;header&gt;</code> element as a block level element you will need to explicitly declare it as a block in your <abbr title="Cascading Style sheets">CSS</abbr> like so:</p>
<pre><code>header { display:block;}</code></pre>
<p>In fact you will need to do this for the majority of block level elements in <abbr title="Hypertext Mark-up Language">HTML</abbr> 5. Just as soon as broswers make it default we&#8217;ll let you know so you can save those precious bytes from your CSS. In the meantime be sure to keep up with what has or hasn&#8217;t been <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)">implemented in layout engines on this wiki</a>.</p>
<h2>Conclusion</h2>
<p>In summary <code>&lt;header&gt;</code> give us some great added semantic value in order to describe the head of a section.</p>
<h2>Further Reading</h2>
<ul>
<li><a href="http://dev.w3.org/html5/spec/Overview.html#the-header-element">HTML 5 Spec &#8211; The header element</a></li>
<li><a href="http://www.ibm.com/developerworks/library/x-html5/">New Elements in HTML 5</a></li>
</ul>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/the-hgroup-element/" rel="bookmark" class="crp_title">The hgroup element</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark" class="crp_title">Your Questions Answered #8</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark" class="crp_title">Your Questions Answered 9</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=The%20header%20element%20-%20http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;title=The%20header%20element&amp;bodytext=Recently%2C%20we%20have%20seen%20a%20growing%20interest%20in%20HTML%205%20and%20it%27s%20adoption%20by%20web%20professionals.%20Within%20the%20HTML%205%20specfication%20we%20can%20see%20that%20there%20have%20been%20a%20significant%20number%20of%20new%20tags%20added%2C%20one%20of%20these%20the%20%26lt%3Bheader%26gt%3B%20element%20is%20what%20we%27ll%20b" title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;title=The%20header%20element" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;title=The%20header%20element&amp;notes=Recently%2C%20we%20have%20seen%20a%20growing%20interest%20in%20HTML%205%20and%20it%27s%20adoption%20by%20web%20professionals.%20Within%20the%20HTML%205%20specfication%20we%20can%20see%20that%20there%20have%20been%20a%20significant%20number%20of%20new%20tags%20added%2C%20one%20of%20these%20the%20%26lt%3Bheader%26gt%3B%20element%20is%20what%20we%27ll%20b" title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;title=The%20header%20element" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=The%20header%20element&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;t=The%20header%20element" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;title=The%20header%20element&amp;annotation=Recently%2C%20we%20have%20seen%20a%20growing%20interest%20in%20HTML%205%20and%20it%27s%20adoption%20by%20web%20professionals.%20Within%20the%20HTML%205%20specfication%20we%20can%20see%20that%20there%20have%20been%20a%20significant%20number%20of%20new%20tags%20added%2C%20one%20of%20these%20the%20%26lt%3Bheader%26gt%3B%20element%20is%20what%20we%27ll%20b" title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=The%20header%20element&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;t=The%20header%20element" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;title=The%20header%20element&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=Recently%2C%20we%20have%20seen%20a%20growing%20interest%20in%20HTML%205%20and%20it%27s%20adoption%20by%20web%20professionals.%20Within%20the%20HTML%205%20specfication%20we%20can%20see%20that%20there%20have%20been%20a%20significant%20number%20of%20new%20tags%20added%2C%20one%20of%20these%20the%20%26lt%3Bheader%26gt%3B%20element%20is%20what%20we%27ll%20b" title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;h=The%20header%20element" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fthe-header-element%2F&amp;t=The%20header%20element&amp;s=Recently%2C%20we%20have%20seen%20a%20growing%20interest%20in%20HTML%205%20and%20it%27s%20adoption%20by%20web%20professionals.%20Within%20the%20HTML%205%20specfication%20we%20can%20see%20that%20there%20have%20been%20a%20significant%20number%20of%20new%20tags%20added%2C%20one%20of%20these%20the%20%26lt%3Bheader%26gt%3B%20element%20is%20what%20we%27ll%20b" title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/the-header-element/" rel="bookmark">The header element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on June 16, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-header-element/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
	</channel>
</rss>
