<?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; time</title>
	<atom:link href="http://html5doctor.com/tag/time/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 #6</title>
		<link>http://html5doctor.com/your-questions-answered-6/</link>
		<comments>http://html5doctor.com/your-questions-answered-6/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 14:30:59 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[hcard]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1578</guid>
		<description><![CDATA[We're back with another round of patient questions about <abbr>HTML</abbr>5. In this article, we'll discuss using multiple <code>&#60;h1&#62;</code>s, audio codecs, microformats, post bylines, and the <code>&#60;time&#62;</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-answered-6%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-6%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 another round of patient questions about <abbr>HTML</abbr>5. In this article, we&#8217;ll discuss using multiple <code>&lt;h1&gt;</code>s, audio codecs, microformats, post bylines, and the <code>&lt;time&gt;</code> element.</p>
<h2>Using multiple <code>&lt;h1&gt;</code>s</h2>
<p>Bnonn asked:</p>
<blockquote><p>I&#8217;m unsure of how <code>h1</code> is supposed to be used now that pages can be divided into sections and articles. In (X)HTML4, a page was basically a page, and so you only had one <code>h1</code> element: the top level heading for the page. I&#8217;m not even sure if that was a requirement of HTML4, or if it was just a de facto standard, but it made sense.</p>
<p>Now, however, there are any number of possible sections and articles per page; each of which may contain any number of heading elements (and one of those might be inside a <code>header</code> element). Given that <code>h1</code> is a top-level heading, it seems as if each section and/or article should have one, in addition to the page-level <code>h1</code>. However, this contradicts what I know of accepted usage, so I&#8217;m confused about the way in which I should be marking up headings in HTML5. It doesn&#8217;t seem right to start headings in a <code>section</code>, for instance, with <code>h2</code>, because then&#8230;where&#8217;s the top-level heading for that element? But it doesn&#8217;t seem right to start them with <code>h1</code>, because that element in current web usage has more &#8220;power&#8221; than warrants its use there.</p>
<p>There is also SEO to wonder about. Even if using multiple <code>h1</code> elements is right, I wouldn&#8217;t want to be penalized for it by Google. So what&#8217;s the story with that?</p>
<p>Any help is much appreciated.</p>
<p>Regards,</p>
<p>Bnonn</p>
</blockquote>
<p>Basically, you can use multiple <code>&lt;h1&gt;</code>s in order to shape the document outline. So an <code>&lt;h1&gt;</code> within a <code>&lt;section&gt;</code> will be treated like an <code>&lt;h2&gt;</code> (if it is a nested <code>&lt;section&gt;</code>). If that <code>&lt;section&gt;</code> (and only that <code>&lt;section&gt;</code>) is aggregated elsewhere on the web, however, it will fit seamlessly into that external document&#8217;s outline. This means that your original <code>&lt;h1&gt;</code> could be treated as an <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, <code>&lt;h3&gt;</code>, or <code>&lt;h4&gt;</code> as appropriate.</p>
<p>I hope that makes sense! Bruce&#8217;s article on <a href="http://html5doctor.com/the-section-element">the section element</a> touches on this, and we also hope to talk more about document outlines in the future.</p>
<p>Cheers,</p>
<p>Rich</p>
<p>P.S. Multiple <code>&lt;h1&gt;</code>s in <abbr>HTML</abbr>4 are perfectly legal, but seldom used.</p>
<h2>Audio Codecs</h2>
<p>Adam asked:</p>
<blockquote><p>Hello,</p>
<p>I&#8217;ve got a query about the issues regarding what codecs to use for the audio tag. I don&#8217;t quite get why Firefox won&#8217;t support mp3. Surely the browser calls on the codecs present on the operating system, not within the browser, so how are the licensing issues a problem to the browsers if they are simply leaving what is already present (and in theory already licensed)?</p>
<p>I fully admit that I am no lawyer. It just seems very odd the line of argument Mozilla has taken.</p>
<p>Adam Wilcox</p>
</blockquote>
<p>I&#8217;m not sure why they&#8217;ve taken that stance, but I know that Mozilla only plans to support Ogg and Apple are keen to push MP3 and MP4, so we&#8217;re at stalemate. Because of this, discussion of specific codecs has been removed from the spec altogether.</p>
<p>Although not related to audio, see this article I wrote about <a href="http://html5doctor.com/youtube-and-vimeo-support-html5-video/">YouTube and Vimeo supporting <abbr>HTML5</abbr> video</a>. It explains a little about codecs.</p>
<p>Sorry I can&#8217;t be of more help.</p>
<p>Rich</p>
<p><small>Since writing this reply there has been a lot more talk over codecs for both video and audio since Microsoft announced they would be supporting H.264 in <abbr>IE</abbr>9. We&#8217;ll cover this in more detail soon.</small></p>
<h2>hCards</h2>
<p>Ken asked:</p>
<blockquote><p>How does html 5 deal with hCards and microformats in general? Specifically, can you have more than one hCard per page? As I understand it currently, having more than one is problematic. I&#8217;m asking now because of the treatment &#8220;footer&#8221; and &#8220;aside&#8221; has gotten, i.e. they are context sensitive to their &#8220;article&#8221; or &#8220;section&#8221; unless top-level, then applied to the page. Also, the use of scoped on style tags: hCards should be updated in a like manner for html 5.</p>
<p>Thanks for hearing me out. I don&#8217;t know if this is the appropriate place for this question, but as html 5 is much more useful, I thought maybe a post is in order <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Also, &#8220;article&#8221;&#8217;s impact on the hAtom microformat makes for an interesting article, don&#8217;t ya think?</p>
</blockquote>
<p>We touched upon microformats in our articles on the <a href="http://html5doctor.com/the-address-element/"><code>&lt;address&gt;</code></a> and <a href="http://html5doctor.com/the-time-element/"><code>&lt;time&gt;</code></a> elements, but we&#8217;ll try to cover more soon (possibly in an article on the <code>&lt;article&gt;</code> element).</p>
<p>I haven&#8217;t heard that having more than one hCard is problematic. I&#8217;ve certainly never had any issues doing that. If you check out the source code on the homepage of HTML5Doctor, you&#8217;ll see we&#8217;ve used multiple hCards — one for each author&#8217;s name associated with a post.</p>
<p>Hope that helps a little.</p>
<p>Cheers,</p>
<p>Rich</p>
<h2>Article bylines</h2>
<p>Eric asked:</p>
<blockquote><p>I tweeted to you guys a few days ago (@ericdfields), wondering what you recommend for bylines for blog posts. Bylines, borrowing a newspaper term, would be the &#8216;Posted by SoandSo on Nov 1, 2010&#8242; copy you find under the article of your typical blog post.</p>
<p>To me, they seem like something of an &#8216;aside&#8217; for the header of the document.</p>
<p>I don&#8217;t know if its perfectly valid, but here&#8217;s the <a href="http://theeem.com/html5/test.html">test case I whipped up</a>.</p>
<p>Thanks in advance for any insight!</p>
</blockquote>
<p>In my opinion, they&#8217;re header or footer information, so I do:</p>
<pre><code>&lt;header&gt;
  &lt;hgroup&gt;
    &lt;h1&gt;Foo&lt;/h1&gt;
    &lt;h2&gt;Bar&lt;/h2&gt;
  &lt;/hgroup&gt;
  &lt;p&gt;Posted by Bruce on &lt;time datetime="2009-11-01"&gt;1st November&lt;/time>&lt;/p&gt;
&lt;/header&gt;</code></pre>
<p>Thanks, Bruce</p>
<h2>How to use <code>&lt;time&gt;</code> with a date in astrology</h2>
<blockquote><p>Dear HTML5Doctors,</p>
<p>I was confused in how to using the <code>time</code> tag with the Astrology date. For example if I have a chunk of content like this:</p>
<p>ARIES: 13 Apr &#8211; 14 May</p>
<p>how can I use attribute &#8220;datetime&#8221; to explain the format of that date?</p>
<pre><code>&lt;p&gt;ARIES: &lt;time title="start" datetime="???"&gt;13 Apr&lt;/time&gt; - &lt;time title="end" datetime="???"&gt;14 May&lt;/time&gt;&lt;/p&gt;</code></pre>
<p>The year of birth is not fixed, please advice me some solutions about this.</p>
<p>Thank you,</p>
<p>radiz</p>
</blockquote>
<p>Hi Radiz,</p>
<p>The time element is for one specific day, not a range or &#8220;imprecise&#8221; date. So you can&#8217;t use it for &#8220;13 April.&#8221; You need to use it for a specific &#8220;13 April&#8221; and give a year. For more, see our article on <a href="http://html5doctor.com/the-time-element/">the <code>&lt;time&gt;</code> element</a>.</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-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</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-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</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-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%20%236%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-6%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-6%2F&amp;title=Your%20Questions%20Answered%20%236&amp;bodytext=We%27re%20back%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20multiple%20%26lt%3Bh1%26gt%3Bs%2C%20audio%20codecs%2C%20microformats%2C%20post%20bylines%2C%20and%20the%20%26lt%3Btime%26gt%3B%20element." 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-6%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-6%2F&amp;title=Your%20Questions%20Answered%20%236" 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-6%2F&amp;title=Your%20Questions%20Answered%20%236&amp;notes=We%27re%20back%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20multiple%20%26lt%3Bh1%26gt%3Bs%2C%20audio%20codecs%2C%20microformats%2C%20post%20bylines%2C%20and%20the%20%26lt%3Btime%26gt%3B%20element." 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-6%2F&amp;title=Your%20Questions%20Answered%20%236" 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-6%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%236&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-6%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-6%2F&amp;t=Your%20Questions%20Answered%20%236" 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-6%2F&amp;title=Your%20Questions%20Answered%20%236&amp;annotation=We%27re%20back%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20multiple%20%26lt%3Bh1%26gt%3Bs%2C%20audio%20codecs%2C%20microformats%2C%20post%20bylines%2C%20and%20the%20%26lt%3Btime%26gt%3B%20element." 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%236&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-6%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-6%2F&amp;t=Your%20Questions%20Answered%20%236" 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-6%2F&amp;title=Your%20Questions%20Answered%20%236&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=We%27re%20back%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20multiple%20%26lt%3Bh1%26gt%3Bs%2C%20audio%20codecs%2C%20microformats%2C%20post%20bylines%2C%20and%20the%20%26lt%3Btime%26gt%3B%20element." 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-6%2F&amp;h=Your%20Questions%20Answered%20%236" 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-6%2F&amp;t=Your%20Questions%20Answered%20%236&amp;s=We%27re%20back%20with%20another%20round%20of%20patient%20questions%20about%20HTML5.%20In%20this%20article%2C%20we%27ll%20discuss%20using%20multiple%20%26lt%3Bh1%26gt%3Bs%2C%20audio%20codecs%2C%20microformats%2C%20post%20bylines%2C%20and%20the%20%26lt%3Btime%26gt%3B%20element." 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-6/" rel="bookmark">Your Questions Answered #6</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on April 8, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The time element (and microformats)</title>
		<link>http://html5doctor.com/the-time-element/</link>
		<comments>http://html5doctor.com/the-time-element/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 14:49:14 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1293</guid>
		<description><![CDATA[
			
				
			
		
Microformats are a way of adding extra semantic information to a webpage using HTML classes &#8212; information like an event&#8217;s date and time, a person&#8217;s phone number, an organisation&#8217;s email address, etc.
They aren&#8217;t a &#8220;standard&#8221; per se, but they are a widely adopted convention within the geek community. And since they use an agreed-upon set [...]]]></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-time-element%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-time-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.microformats.org/">Microformats</a> are a way of adding extra semantic information to a webpage using <abbr>HTML</abbr> classes &mdash; information like an event&#8217;s date and time, a person&#8217;s phone number, an organisation&#8217;s email address, etc.</p>
<p>They aren&#8217;t a &#8220;standard&#8221; <i>per se</i>, but they are a widely adopted convention within the geek community. And since they use an agreed-upon set of class names, they are as compatible with <abbr>HTML</abbr>5 as they are with <abbr>HTML</abbr>4 or <abbr>XHTML</abbr>.</p>
<p><abbr>HTML</abbr>5 offers one potential addition to the microformats arsenal. Because earlier versions of some microformats presented accessibility problems in the way they encoded dates and times (see an article called <a href="http://www.webstandards.org/2007/04/27/haccessibility/">hAccessibility</a> that I co-wrote with James Craig), <abbr>HTML</abbr>5 offers a new element for unambiguously encoding dates and times for machines while still displaying them in a human-readable way.</p>
<p>The format is very simple: <code>&lt;time datetime="2009-11-13"&gt;13 November 2009&lt;/time&gt;</code>:</p>
<blockquote><p>The time element represents either a time on a 24 hour clock, or a precise date in the proleptic Gregorian calendar, optionally with a time and a time-zone offset.<br />
<footer><cite><a href="http://dev.w3.org/html5/spec/text-level-semantics.html#the-time-element">W3C specfication</a></cite></footer></p></blockquote>
<p>You can have whatever you want between the tags, so:</p>
<pre><code>&lt;time datetime=&quot;2009-11-13&quot;&gt;13 November 2009&lt;/time&gt;
&lt;time datetime=&quot;2009-11-13&quot;&gt;13&lt;sup&gt;th&lt;/sup&gt; November&lt;/time&gt;
&lt;time datetime=&quot;2010-11-13&quot;&gt;Bruce's 21st birthday&lt;/time&gt;
&lt;time datetime=&quot;2010-11-13T20:00&quot;&gt;8PM on my birthday&lt;/time&gt;
&lt;time datetime="2010-11-13T20:00+09:00"&gt;8PM on my birthday—in Tokyo&lt;/time&gt;</code></pre>
<p>are all equally valid.</p>
<p>Note that the last example has an optional timezone offset (+09:00) too (thanks, Oli!). You can also use “Z” (e.g. <code>2010-11-13T20:00<b>Z</b></code>) to represent <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">Universal Coordinated Time (<abbr>UTC</abbr>)</a>, which is the equivalent of the timezone +00:00. Finally if you don’t specify a timezone offset the time is “local time” (in this case England).</p>
<h2>The fly in the ointment</h2>
<p>The only trouble with <code>&lt;time&gt;</code> is that the it must contain positive date on the <a href="http://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar">Proleptic Gregorian calendar</a>, meaning you can&#8217;t encode a date before the Christian Era. Neither can you encode imprecise dates such as &#8220;July 1904&#8243;. Microformats, however, aren&#8217;t subjected to this restriction and are often employed to mark up, for example, very old events on Wikipedia or imprecise dates on museum websites. It&#8217;s likely that authors will continue using the current, more flexible microformat patterns unless the restrictions on the <code>&lt;time&gt;</code> element are lifted. (The <abbr>HTML</abbr>5 working group has been continually petitioned to remove their arbitrary restrictions and widen the scope of time, but with no success).</p>
<p>Perhaps because of this restriction, current microformat clients can&#8217;t consume microformats such as hCalendar if they&#8217;re coded to use <code>&lt;time&gt;</code>. Stefan Schipor wrote to us saying, <q>&#8220;The problem is that I need to parse the site with H2VX or any other similar thing for exporting. Sadly, H2VX doesn&#8217;t seem to read the datetime attribute in the <code>&lt;time&gt;</code> elements. Nor does the FF add-on Tails. I tried the microformats IRC channel and the microformateers twitter account but I didn&#8217;t get any response. Do you know if there is any support for this? It would kill me to add <code>&lt;abbr&gt;</code> elements just for it to work.&#8221;</q></p>
<h2>Incorporating the <code>pubdate</code> attribute</h2>
<p>This doesn&#8217;t mean that <code>&lt;time&gt;</code> is an a waste of time, or that it&#8217;s more trouble than it&#8217;s worth (a white element, as it were). It has a great deal of scope outside microformats, too.</p>
<p>On my personal blog, I use it to mark up publication dates of articles. There is a boolean attribute <code>pubdate</code> specifically for this:</p>
<pre><code>&lt;article&gt;
  &lt;header&gt;
  &lt;h1&gt;My brilliant blogpost&lt;/h1&gt;
  &lt;p&gt;Published on &lt;time datetime=&quot;2010-01-20&quot; pubdate&gt;20 January 2010&lt;/time&gt; in the Sexysocks category.&lt;/p&gt;
  &lt;/header&gt;
  &lt;p&gt;I'm wearing sexy socks! Here's a picture.&lt;/p&gt;
  ...
&lt;/article&gt;</code></pre>
<p>The spec says:</p>
<blockquote><p>The pubdate attribute is a boolean attribute. If specified, it indicates that the date and time given by the element is the publication date and time of the nearest ancestor article element, or, if the element has no ancestor article element, of the document as a whole.</p></blockquote>
<p>You might be wondering why the <code>pubdate</code> attribute is needed at all. Why not just assume that any <code>&lt;time&gt;</code> element in an <code>&lt;article&gt;</code>&#8217;s <code>&lt;header&gt;</code> is its publication date?</p>
<p>Consider this example:</p>
<pre><code>&lt;article&gt;
  &lt;header&gt;
  &lt;h1&gt;Come to my party on &lt;time datetime=&quot;2010-03-01&quot;&gt;1 March&lt;/time&gt;&lt;/h1&gt;
  &lt;p&gt;Published on &lt;time datetime=&quot;2010-01-20&quot; pubdate&gt;20 January 2010&lt;/time&gt; in the Sexysocks category.&lt;/p&gt;
  &lt;/header&gt;
  &lt;p&gt;I'm throwing a sexy socks party at Dr Naughty's Ladyboy Cabaret Roller-disco Bierkeller Pizza-parlour-a-gogo! Do come.&lt;/p&gt;
  ...
&lt;/article&gt;</code></pre>
<p>You&#8217;ll see that there are two dates within the <code>&lt;header&gt;</code>: the date of the actual party and the publication date of the article. The <code>pubdate</code> attribute is required to remove any ambiguity.</p>
<h2>Where could time be used?</h2>
<p>The uses of unambiguous dates in web pages aren&#8217;t hard to imagine. A browser could offer to add events to a user&#8217;s calendar. A Thai-localised browser could offer to transform Gregorian dates into <a href="http://dspace.anu.edu.au/bitstream/1885/41890/3/thai_time.html">Thai Buddhist era dates</a>. Content aggregators can produce visual timelines of events.</p>
<p>Search engines can produce smarter search results. For example, in the recent heavy snow in the UK, I searched for school closures in my town and discovered my kids&#8217; school was closed. After receiving a phone call from the school asking me where my kids were, I re-examined the webpage. In small print at the bottom of the page were the words &quot;Published 5 January 2008&quot;. I expect that operators of search engines would rank more current pages more highly on searches connected with current events.</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/designing-a-blog-with-html5/" rel="bookmark" class="crp_title">Designing a blog with html5</a></li>
<li><a href="http://html5doctor.com/draw-attention-with-mark/" rel="bookmark" class="crp_title">Draw attention with mark</a></li>
<li><a href="http://html5doctor.com/block-level-links-in-html-5/" rel="bookmark" class="crp_title">&#8220;Block-level&#8221; links in HTML5</a></li>
<li><a href="http://html5doctor.com/the-article-element/" rel="bookmark" class="crp_title">The article element</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=The%20time%20element%20%28and%20microformats%29%20-%20http%3A%2F%2Fhtml5doctor.com%2Fthe-time-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-time-element%2F&amp;title=The%20time%20element%20%28and%20microformats%29&amp;bodytext=Microformats%20are%20a%20way%20of%20adding%20extra%20semantic%20information%20to%20a%20webpage%20using%20HTML%20classes%20%26mdash%3B%20information%20like%20an%20event%27s%20date%20and%20time%2C%20a%20person%27s%20phone%20number%2C%20an%20organisation%27s%20email%20address%2C%20etc.%0D%0A%0D%0AThey%20aren%27t%20a%20%22standard%22%20per%20se%2C%20but%20they" 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-time-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-time-element%2F&amp;title=The%20time%20element%20%28and%20microformats%29" 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-time-element%2F&amp;title=The%20time%20element%20%28and%20microformats%29&amp;notes=Microformats%20are%20a%20way%20of%20adding%20extra%20semantic%20information%20to%20a%20webpage%20using%20HTML%20classes%20%26mdash%3B%20information%20like%20an%20event%27s%20date%20and%20time%2C%20a%20person%27s%20phone%20number%2C%20an%20organisation%27s%20email%20address%2C%20etc.%0D%0A%0D%0AThey%20aren%27t%20a%20%22standard%22%20per%20se%2C%20but%20they" 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-time-element%2F&amp;title=The%20time%20element%20%28and%20microformats%29" 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-time-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%20time%20element%20%28and%20microformats%29&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-time-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-time-element%2F&amp;t=The%20time%20element%20%28and%20microformats%29" 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-time-element%2F&amp;title=The%20time%20element%20%28and%20microformats%29&amp;annotation=Microformats%20are%20a%20way%20of%20adding%20extra%20semantic%20information%20to%20a%20webpage%20using%20HTML%20classes%20%26mdash%3B%20information%20like%20an%20event%27s%20date%20and%20time%2C%20a%20person%27s%20phone%20number%2C%20an%20organisation%27s%20email%20address%2C%20etc.%0D%0A%0D%0AThey%20aren%27t%20a%20%22standard%22%20per%20se%2C%20but%20they" 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%20time%20element%20%28and%20microformats%29&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-time-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-time-element%2F&amp;t=The%20time%20element%20%28and%20microformats%29" 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-time-element%2F&amp;title=The%20time%20element%20%28and%20microformats%29&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=Microformats%20are%20a%20way%20of%20adding%20extra%20semantic%20information%20to%20a%20webpage%20using%20HTML%20classes%20%26mdash%3B%20information%20like%20an%20event%27s%20date%20and%20time%2C%20a%20person%27s%20phone%20number%2C%20an%20organisation%27s%20email%20address%2C%20etc.%0D%0A%0D%0AThey%20aren%27t%20a%20%22standard%22%20per%20se%2C%20but%20they" 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-time-element%2F&amp;h=The%20time%20element%20%28and%20microformats%29" 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-time-element%2F&amp;t=The%20time%20element%20%28and%20microformats%29&amp;s=Microformats%20are%20a%20way%20of%20adding%20extra%20semantic%20information%20to%20a%20webpage%20using%20HTML%20classes%20%26mdash%3B%20information%20like%20an%20event%27s%20date%20and%20time%2C%20a%20person%27s%20phone%20number%2C%20an%20organisation%27s%20email%20address%2C%20etc.%0D%0A%0D%0AThey%20aren%27t%20a%20%22standard%22%20per%20se%2C%20but%20they" 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-time-element/" rel="bookmark">The time element (and microformats)</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 9, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-time-element/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered #4</title>
		<link>http://html5doctor.com/your-questions-answered-4/</link>
		<comments>http://html5doctor.com/your-questions-answered-4/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 08:52:14 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Browser Compatibility]]></category>
		<category><![CDATA[WAI-ARIA]]></category>
		<category><![CDATA[aria]]></category>
		<category><![CDATA[details]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[xhtml5]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1242</guid>
		<description><![CDATA[
			
				
			
		
 Here we go with another post rounding up your HTML5 questions and sharing the answers with the world. We cover a wide range of topics this time, inlcluding ARIA, storage, offline capabilities, and document outlines, so read on to find the answers.
We also want to know what areas of HTML5 you&#8217;d like us to [...]]]></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-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-4%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="Illustration of a doctor treating a patient" class="alignright size-full wp-image-424" /> Here we go with another post rounding up your <abbr>HTML</abbr>5 questions and sharing the answers with the world. We cover a wide range of topics this time, inlcluding <abbr>ARIA</abbr>, storage, offline capabilities, and document outlines, so read on to find the answers.</p>
<p>We also want to know what areas of <abbr>HTML</abbr>5 you&#8217;d like us to cover in future articles, so <a href="/contact/">let us know</a>!</p>
<h2>Older browsers and <abbr>XHTML</abbr></h2>
<p>Brett Prichard asked:</p>
<blockquote><p>If I were to use one of the new tags in <abbr>HTML</abbr>5, (i.e., <code>&lt;video&gt;</code> or <code>&lt;header&gt;</code>) what would happen when the page is rendered by an older browser?</p>
<p>The other question I have is will there be an <abbr>XHTML</abbr> equivalent? <abbr>XHTML</abbr> 2.0 breaks off compatibility with <abbr>HTML</abbr>s 1-4, but will it be compatible with <abbr>HTML</abbr>5? I prefer to code in <abbr>XHTML</abbr>.</p>
<p>Thank you for reading.</p></blockquote>
<p>To answer your first question: nothing special. The content nested within the element is displayed. (In the case of video, the fallback content is shown.)</p>
<p>Regarding your second question, I wrote about the <a href="/html-5-xml-xhtml-5/"><abbr>XHTML</abbr> serialisation of <abbr>HTML</abbr>5 a while ago</a>.</p>
<p>&mdash; Thanks, Bruce</p>
<h2><abbr>ARIA</abbr></h2>
<p>Joseph Chapman asked:</p>
<blockquote><p>My colleagues and I wish to switch our doctype to the streamlined <code>&lt;!doctype html&gt;</code> and implement several things we learnt from Jeremy Keith last Wednesday, primarily <abbr title="Accessible Rich Internet Applications">ARIA</abbr>. </p>
<p>We know that support is good as long as we add an extra DTD, but we can&#8217;t find the appropriate doctype declaration to stick on the end of <code>...html&gt;</code> Any ideas? We are really keen to kick this off and use a new piece of technology that will help springboard our site to a new level of accessibility. </p>
<p>Any answers appreciated.</p>
<p>Thanks for your help.</p></blockquote>
<p>It&#8217;s okay to add <abbr>ARIA</abbr> to <abbr>HTML</abbr>5 now without using a different doctype. I suggest you give <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html#annotations-for-assistive-technology-products-(aria)">this part of the spec</a> a read.</p>
<p>I believe a task force has been created to more closely align <abbr>ARIA</abbr> to <abbr>HTML</abbr>5. We plan to cover <abbr>ARIA</abbr> more in a future post.</p>
<p>Hope this helps</p>
<p>&mdash; Rich </p>
<h2>Attribute Minification</h2>
<p>Nick Leon asked:</p>
<blockquote><p>Hey there HTML5Doctor,</p>
<p>I consider myself a strong <abbr title="Plain Old Semantic HTML">POSH</abbr> developer. One of the requirements for valid <abbr>XHTML</abbr> is that &#8220;attribute minimization&#8221; is not allowed. <abbr>HTML</abbr> permits &#8220;attribute minimization&#8221;, where boolean attributes can have their value omitted entirely, e.g., <code>&lt;option selected&gt;</code>. All XML attributes must have explicit quoted values, so in XML this would be written as <code>&lt;option selected="selected"&gt;</code>.</p>
<p>I was wondering where <abbr>HTML</abbr>5 stands with attribute minimization. I noticed in some of your example code, you provided the minimized form of the attribute, e.g., <code>&lt;audio src="elvis.ogg" controls autobuffer&gt;&lt;/audio&gt;</code>. Is this valid in <abbr>HTML</abbr>5? Would this be the valid version for <abbr>XHTML</abbr>5:</p>
<p><code>&lt;audio src="elvis.ogg" controls="1" autobuffer="0"&gt;&lt;/audio&gt;</code>?</p></blockquote>
<p>Those are both valid <abbr>HTML</abbr>5 structures (however,  controls=&#8221;1&#8243; isn&#8217;t legal; you need to say controls=&#8221;controls&#8221;).</p>
<p>In <abbr>HTML</abbr>5, you can format attributes as you please. In <a href="/html-5-xml-xhtml-5/"><abbr>XHTML</abbr>5 (the <abbr>XML</abbr> serialisation)</a>, you need to obey the <abbr>XML</abbr> rules.</p>
<p>&mdash; Cheers, Bruce</p>
<h2>Offline storage</h2>
<p>Kevin Searle asked:</p>
<blockquote><p>I&#8217;m having a hard time wrapping my head around the offline storage capabilities of the <abbr>HTML</abbr> 5 spec. Can you consider an &#8220;<abbr>HTML</abbr> 5 Offline Storage 101&#8243; article?</p></blockquote>
<p>Just to clarify, do you mean &#8220;storage&#8221; or &#8220;offline&#8221;? They&#8217;re two very different things.</p>
<p>Storage relates to variables, like cookie jars but a lot bigger.</p>
<p>Offline applications are about detecting connectivity and possibly running your app without a connection to the Web.</p>
<p>We (i.e., Remy) will be writing about both of these topics, but it&#8217;s useful to know which is more in demand than the other.</p>
<p>In the meantime, feel free to check out the demos I&#8217;ve written at <a href="http://html5demos.com"><abbr>HTML</abbr>5 Demos</a> (covering offline, storage, and web databases).</p>
<p>&mdash; Remy</p>
<h2>Nav Title (in the document outline)</h2>
<p>D Ross asked:</p>
<blockquote><p>Working on my new site and checked it with the <a href="http://gsnedders.html5.org/outliner/">outliner</a>. I&#8217;m getting an &#8220;untitled section&#8221; showing up because I don&#8217;t have a headline inside my &#8220;nav&#8221; element.</p>
<p>Is this correct? Do I really need to title my main nav?</p>
<p>If so, is adding an <code>&lt;h5&gt;</code> or something similar with the words &#8220;main navigation&#8221; good enough? If so, is hiding it with <code>display: none</code> okay?</p>
<p>Thanks,</p>
<p>DRoss</p></blockquote>
<p>Yes, &#8220;untitled section&#8221; is fine. I know it&#8217;s been suggested to the developer of the outliner that it should say &#8220;navigation&#8221; or something similar, but I&#8217;m not sure when or whether that will happen. (You&#8217;ll see the same thing with <code>&lt;aside&gt;</code> too if there&#8217;s no heading nested directly beneath the element).</p>
<p>Thanks,</p>
<p>&mdash; Rich</p>
<h2>The details element</h2>
<p>Bart asked:</p>
<blockquote><p>Hello Doctors!</p>
<p>I&#8217;d like to ask you a little help with understanding the &#8220;details&#8221; element.</p>
<p>As the W3 spec says: &#8220;The details element represents a disclosure widget from which the user can obtain additional information or controls&#8221;.</p>
<p>I&#8217;m not sure if I get it right, but I think I can use this element to put details about a post (such as date and time) and controls, including &#8220;answer&#8221;, &#8220;save&#8221; and &#8220;repost&#8221;.</p>
<p>Please tell me if I&#8217;m wrong.</p>
<p>Regards, Bart</p>
<p>PS. I love the HTML5doctor blog, it&#8217;s so important to explain how to use <abbr>HTML</abbr>5. Keep up the great work!</p></blockquote>
<p>This question triggered a flurry of responses from several of us doctors, so we&#8217;ve added them all here for you.</p>
<h3>Answer 1</h3>
<p>The spec says <code>&lt;details&gt;</code> is not appropriate for footnotes, and you could argue that post details are footnotes. Also, the <code>&lt;details&gt;</code> element has the option to show or hide its content, which suggests to me that it&#8217;s not appropriate for the post details.</p>
<p>You could possibly use a <code>&lt;section&gt;</code> or a <code>&lt;footer&gt;</code> for the post details, but I&#8217;m not clear on what you mean by &#8220;controls&#8221;. </p>
<p>For the date/time, you can use the <code>&lt;time&gt;</code> element:</p>
<pre><code>&lt;time class="published updated" datetime="2009-09-23"&gt;September 23rd, 2009&lt;/time&gt;</code></pre>
<p>Other doctors might have other opinions, but I hope this helps.</p>
<p>&mdash; Tom</p>
<h3>Answer 2</h3>
<p>Just to follow up on Tom&#8217;s reply: the user viewing your content can <em>control</em> whether or not they see the details.</p>
<p>The <code>&lt;details&gt;</code> element is an interactive element that is collapsed by default, so that only the heading is visible. The heading should be marked up in a <code>&lt;dt&gt;</code> element (if absent, it will read &#8220;Details&#8221;).</p>
<p>The control that the user agent should render (when fully supporting the <code>&lt;details&gt;</code> element) is a small triangular button to the left that, when clicked, toggles the visibility of the element&#8217;s contents.</p>
<p>If the <code>&lt;details&gt;</code> element should be open by default, it should have its <code>open</code> attribute set.</p>
<p>I would use <code>&lt;details&gt;</code> for any content that still allows the surrounding content to make sense while not necessarily needing to be seen. So in your example, I would put the metadata in the <code>&lt;details&gt;</code>, but not the &#8220;user controls&#8221; to reply, save, etc., since the user should always be able to see that they can perform these actions.</p>
<p>While the browser vendors haven&#8217;t implemented the interactive aspect of details, I, for one, will be emulating this using JavaScript.</p>
<p>I hope that helps (too!).</p>
<p>&mdash; Remy</p>
<h3>Answer 3</h3>
<p>You can also use <code>pubdate</code> as an attribute of <code>&lt;time&gt;</code>:</p>
<pre><code>&lt;time pubdate datetime="2009-09-23"&gt;September 23rd, 2009&lt;/time&gt;</code></pre>
<p><code>pubdate</code> is useful when you have two different times in the post. For example, for a future event:</p>
<pre><code>&lt;article&gt;
&lt;header&gt;
&lt;h1&gt;Gig: Hixie and the Pixies, &lt;time datetime="2010-01-01"&gt;Jan 1st 2010&lt;/time&gt;, Royal Albert Hall&lt;/h1&gt;
&lt;p>Published &lt;time datetime="2009-09-21" pubdate&gt;Sept 21, 2009&lt;/time&gt;&lt;/p&gt;
&lt;/header&gt;
&lt;p&gt;With Lachy on kazoo, Henri on Sousaphone, Pilgers on the triangle, and Hixie conducting&lt;/p&gt;
&lt;/article&gt;</code></pre>
<p>I feel a post about the <code>&lt;time&gt;</code> element coming on&hellip;</p>
<p>&mdash; Bruce</p>
<h2>More to come</h2>
<p>That wraps up this round of questions! We&#8217;d like to know what areas of <abbr>HTML</abbr>5 you&#8217;d like us to cover in future articles, so leave a comment below or <a href="http://html5doctor/contact/">send us an e-mail</a>.
<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-3/" rel="bookmark" class="crp_title">Your Questions Answered #3</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>
<li><a href="http://html5doctor.com/absent-elements-and-validation/" rel="bookmark" class="crp_title">Absent Elements and Validation</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Your%20Questions%20Answered%20%234%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-4%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-4%2F&amp;title=Your%20Questions%20Answered%20%234&amp;bodytext=%20Here%20we%20go%20with%20another%20post%20rounding%20up%20your%20HTML5%20questions%20and%20sharing%20the%20answers%20with%20the%20world.%20We%20cover%20a%20wide%20range%20of%20topics%20this%20time%2C%20inlcluding%20ARIA%2C%20storage%2C%20offline%20capabilities%2C%20and%20document%20outlines%2C%20so%20read%20on%20to%20find%20the%20answers.%0D%0A" 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-4%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-4%2F&amp;title=Your%20Questions%20Answered%20%234" 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-4%2F&amp;title=Your%20Questions%20Answered%20%234&amp;notes=%20Here%20we%20go%20with%20another%20post%20rounding%20up%20your%20HTML5%20questions%20and%20sharing%20the%20answers%20with%20the%20world.%20We%20cover%20a%20wide%20range%20of%20topics%20this%20time%2C%20inlcluding%20ARIA%2C%20storage%2C%20offline%20capabilities%2C%20and%20document%20outlines%2C%20so%20read%20on%20to%20find%20the%20answers.%0D%0A" 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-4%2F&amp;title=Your%20Questions%20Answered%20%234" 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-4%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%234&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-4%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-4%2F&amp;t=Your%20Questions%20Answered%20%234" 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-4%2F&amp;title=Your%20Questions%20Answered%20%234&amp;annotation=%20Here%20we%20go%20with%20another%20post%20rounding%20up%20your%20HTML5%20questions%20and%20sharing%20the%20answers%20with%20the%20world.%20We%20cover%20a%20wide%20range%20of%20topics%20this%20time%2C%20inlcluding%20ARIA%2C%20storage%2C%20offline%20capabilities%2C%20and%20document%20outlines%2C%20so%20read%20on%20to%20find%20the%20answers.%0D%0A" 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%234&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-4%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-4%2F&amp;t=Your%20Questions%20Answered%20%234" 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-4%2F&amp;title=Your%20Questions%20Answered%20%234&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=%20Here%20we%20go%20with%20another%20post%20rounding%20up%20your%20HTML5%20questions%20and%20sharing%20the%20answers%20with%20the%20world.%20We%20cover%20a%20wide%20range%20of%20topics%20this%20time%2C%20inlcluding%20ARIA%2C%20storage%2C%20offline%20capabilities%2C%20and%20document%20outlines%2C%20so%20read%20on%20to%20find%20the%20answers.%0D%0A" 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-4%2F&amp;h=Your%20Questions%20Answered%20%234" 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-4%2F&amp;t=Your%20Questions%20Answered%20%234&amp;s=%20Here%20we%20go%20with%20another%20post%20rounding%20up%20your%20HTML5%20questions%20and%20sharing%20the%20answers%20with%20the%20world.%20We%20cover%20a%20wide%20range%20of%20topics%20this%20time%2C%20inlcluding%20ARIA%2C%20storage%2C%20offline%20capabilities%2C%20and%20document%20outlines%2C%20so%20read%20on%20to%20find%20the%20answers.%0D%0A" 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-4/" rel="bookmark">Your Questions Answered #4</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on December 9, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-4/feed/</wfw:commentRss>
		<slash:comments>5</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>
	</channel>
</rss>
