<?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; Specification Changes</title>
	<atom:link href="http://html5doctor.com/category/specification-changes/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Wed, 16 May 2012 11:31:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>HTML5 adaptive images: end of round one</title>
		<link>http://html5doctor.com/html5-adaptive-images-end-of-round-one/</link>
		<comments>http://html5doctor.com/html5-adaptive-images-end-of-round-one/#comments</comments>
		<pubDate>Wed, 16 May 2012 10:36:45 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4645</guid>
		<description><![CDATA[<p>After The Great Vendor Prefix Hullaballoo of April 2012 comes The Great Responsive Images Brouhaha of May 2012. We look at the main competing formats for adding adaptive images to HTML - the <code>&#60;picture&#62;</code> element, and the <code>&#60;img srcset=""&#62;</code> attribute.</p>]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://dev.opera.com/articles/view/opera-mobile-emulator-experimental-webkit-prefix-support/">The Great Vendor Prefix Hullaballoo of April 2012</a> comes The Great Responsive Images Brouhaha of May 2012. </p>
<p>Adaptive images are the next unsolved mystery of Responsive Web Design. Do you send large high-res images suitable for retina dispays, which are scaled down on smaller, lower res devices and which therefore waste bandwidth? Or do you send low-res images, whch look grotty when scaled up to large screens or high-res displays? Authors have had to rely on <a href="http://css-tricks.com/which-responsive-images-solution-should-you-use/">elaborate hacks</a> to send different content images (that is <code>&lt;img&gt;</code> in HTML rather than CSS background images) to different types of devices.</p>
<p>By November 2011, I was so frustrated that no specification body was considering the problem that <a href="http://www.brucelawson.co.uk/2011/notes-on-adaptive-images-yet-again/">I proposed a strawman &lt;picture&gt; element</a> that re-used the mechanism of HTML5 &lt;video&gt; with its media queries to swap in different source files:</p>
<pre><code>
&lt;picture alt=&quot;angry pirate&quot;&gt;
   &lt;source src=hires.png media=&quot;min-width:800px&quot;&gt;
   &lt;source src=midres.png media=&quot;min-width:480px&quot;&gt;
   &lt;source src=lores.png&gt;
      &lt;!-- fallback for browsers without support --&gt;
      &lt;img src=midres.png alt=&quot;angry pirate&quot;&gt;
&lt;/picture&gt;</code>
</pre>
<p>Around the same time, others <a href="http://www.w3.org/community/respimg/2012/02/23/picture-for-existing-browsers/">independently came to the same idea</a> and were advised to set up a <a href="http://www.w3.org/community/respimg/">W3C community group</a> to discuss it which they did. However, in January, the HTML5 editor, <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-January/034490.html">Ian Hickson, had said</a></p>
<blockquote>What&#8217;s the use case for doing it for images in &lt;img&gt; elements? Typically &lt;img&gt; elements are for content images, where you don&#8217;t usually want to adapt anything.</blockquote>
<p>Those web authors in the W3C Resposive Images Community Group  soldiered on in frustration that they were they being ignored  because the problem itself wasn&#8217;t seen as a problem. Then this week, Edward O&#8217;Connor of Apple suggested another method, using a <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/035746.html">new <code>srcset</code> attribute</a> on the &lt;img&gt; element. This complemented a similar suggestion of his from February for <a href="http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html">img-set in CSS</a> that is already being added to WebKit:</p>
<pre><code>&lt;img src="foo-lores.jpg"
     srcset="foo-hires.jpg 2x, foo-superduperhires.jpg 6.5x"
     alt="decent alt text for foo."&gt;</code></pre>
     <p>The numbers &#8220;2&#8243; and &#8220;6.5x&#8221; tell the browser the relative resolutions; foo-hires.jpg is 2x the resolution of foo-lores.jpg.</p>
<p>Only a few days later, a variant of Apple&#8217;s suggestion was <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/035855.html">added to the spec</a>.</p>
<p>There are two major differences between &lt;picture&gt; and srcset. The most obvious is that srcset uses the &lt;img&gt; element, which is great because that&#8217;s the natural place for images, adaptive or not. (You can&#8217;t re-use the &lt;video&gt; + &lt;source&gt; pattern with &lt;img&gt; because it is an empty element so can&#8217;t have child elements. O&#8217;Connor&#8217;s solution uses attributes, which are fine.)</p>
<p>The other major difference is that it doesn&#8217;t use Media Queries. With Media Queries, the author is reponsible for thinking up every permuations of viewport size, orientation, dpi, colour depth, aspect ratio and the like, deciding how to cater for them (if at all), identifing the breakpoints and coding them up. This requires a lot of consideration by the author, and makes for verbose code; a page with 20 pictures, each with 5 Media Queries on 5 &lt;source&gt; elements quickly becomes a lot of code.</p><p>O&#8217;Connor wrote</p>
<blockquote>
<p>Why provide a scale factor and not a media query? Well, media queries are claims about UA state, whereas here we&#8217;re asserting something about the relationship between the image assets. Also, User Agents should be free to use whichever asset they deem best suited to their current situation, taking into account not just &#8220;media-queriable things&#8221; like device resolution but also any scaling applied to the &lt;img&gt; with CSS, its width=&#8221;" and height=&#8221;" attributes, or even things like the current page zoom level.</p>

</blockquote>
<p>I have a lot of sympathy with allowing the browser to make decisions about what it knows of the environment (network speed, latency, pixel density, orientation) to choose the best image for the job. The idea is that the author shouldn&#8217;t be expected to anticipate and cater for all those variables. What she can do is describe the things she knows about -the images, their size and pixel density- and the browser will make its choice.</p><p>That way, when we&#8217;re all living in space and looking a 3D holograms, the proximity to a black hole can be detected by the iDroid3000 device (black holes notoriously cause Web hologram negative timespace inversions) and the right image chosen; we don&#8217;t need to invent new media queries for event horizon proximity and retrospectively add it to our websites.</p>
<p>There are two problems with the srcset suggestion. The first is highly subjective, but many feel the same: as it exists in the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-srcset">current, first draft of the spec</a>, the syntax is revolting:</p>
<pre><code>&lt;img src="face-600-200-at-1.jpeg" alt=""
srcset="face-600-200-at-1.jpeg 600w 200h 1x,
face-600-200-at-2.jpeg 600w 200h 2x,
face-icon.png 200w 200h"&gt;</code></pre>
<p>Of course, this can be improved, and must be. This isn&#8217;t just about aesthetics. If the syntax is too weird, it will be used wrongly. As <a href="https://twitter.com/#!/rem/status/202306584880234496">Dr Remy wrote</a>, &#8220;Good to see authors have <em>another</em> microsyntax to learn. It&#8217;s not like they had any trouble with vendor-prefixes.&#8221;</p>
	
<p>The second problem is that authors don&#8217;t want to relinquish control. There are questions of art direction (see the section headed <a href="http://css-tricks.com/which-responsive-images-solution-should-you-use/">Do I care about art direction?</a>), and many remain unconvinced that the Apple suggestion addresses that; proponents of srcset are convinced that <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/035907.html">it does address those use cases</a>. </p> 
<p>Debate continues, with a <a href="http://www.cartoonstock.com/directory/e/exchange_of_views.asp">full and frank exchange of views</a>. There are understandably <a href="http://timkadlec.com/2012/05/wtfwg/">hurt feelings</a>, too, because some of those who laboured in the Community Group feel that <a href="http://www.alistapart.com/articles/responsive-images-and-web-standards-at-the-turning-point/">their wishes and work have been ignored</a>.</p> 
<p>As one of those who proposed &lt;picture&gt;, I have a degree of attachment to it. That&#8217;s ego. (In fact, I&#8217;d be delighted if it were called the &lt;yayBruce&gt; element, but I&#8217;m resigned to the unfairness of life.) But I don&#8217;t really care which syntax makes the spec, as long as it addresses the majority of use cases and it is usable by authors. I&#8217;m just glad we&#8217;re discussing the adaptive image problem at all.</p>
<p>So, get involved. Read the discussions and say your piece. And once the dust has settled and the specification is looking stable, we Doctors will write up our diagnosis.</p> <div id="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/html5-briefing-notes-journalists-analysts/" rel="bookmark" class="crp_title">HTML5: briefing notes for journalists and analysts</a></li><li><a href="http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/" rel="bookmark" class="crp_title">HTML5 Simplequiz 6: Zeldman&#8217;s fat footer</a></li><li><a href="http://html5doctor.com/getusermedia/" rel="bookmark" class="crp_title">It&#8217;s Curtains for Marital Strife Thanks to getUserMedia</a></li><li><a href="http://html5doctor.com/why-designers-should-care-about-html5/" rel="bookmark" class="crp_title">Why designers should care about HTML5</a></li><li><a href="http://html5doctor.com/html5-simplequiz-4-figures-captions-and-alt-text/" rel="bookmark" class="crp_title">HTML5 Simplequiz #4: figures, captions and alt text</a></li></ul></div><p><a href="http://html5doctor.com/html5-adaptive-images-end-of-round-one/" rel="bookmark">HTML5 adaptive images: end of round one</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 16, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-adaptive-images-end-of-round-one/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Goodbye time, datetime, and pubdate. Hello data and value.</title>
		<link>http://html5doctor.com/time-and-data-element/</link>
		<comments>http://html5doctor.com/time-and-data-element/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 16:53:08 +0000</pubDate>
		<dc:creator>Oli Studholme</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4071</guid>
		<description><![CDATA[<p>While HTML5 is stable and being implemented we’re still not past losing (or gaining) an element, as demonstrated by the removal of <code>&#60;time&#62;</code> and the addition of <code>&#60;data&#62;</code>. Rather than jumping into the ensuing brouhaha, we’ve spent some time figuring out what this really means. In short? Well… it’s complicated.</p>]]></description>
			<content:encoded><![CDATA[<p class=disclaimer>Please note that since this was written, <code>&lt;time&gt;</code>, <code>datetime</code> and (possibly) <code>pubdate</code> have been reinstated, and made more powerful. Doctor Bruce has the low-down in his blogpost <a href="http://www.brucelawson.co.uk/2012/best-of-time/">The best of &lt;time&gt;s</a>. We preserve this merely to show our grandchildren that we played a role in the Time Wars.</p>
<p>We’ve come a long way in the HTML5 specification’s steady march towards ratification and implementation. The WHATWG’s energy has recently been more on <em>post</em>-HTML5 features that are being added to “<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/" title="HTML Standard">HTML The Living Standard</a>”, plus tidying up HTML5 for Last Call. However we’re still not past losing (or gaining) an element, with last week seeing <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=13240" title="Bug 13240 &ndash; Consider replacing &lt;time&gt; with &lt;data&gt;">the removal of <code>&lt;time&gt;</code> and the addition of <code>&lt;data&gt;</code></a>.</p>

<div id="2011-11-13" class="callout changed-block">
<p><em><time datetime="2011-11-13T23:36:24+09:00">2011-11-13</time>:</em> As per the <a href="http://lists.w3.org/Archives/Public/public-html/2011Nov/0098.html" title="HTML5 spec reverted to cvs r1.5431, svn r6782 [was: Revert request  for r6783] from Michael[tm] Smith on 2011-11-10 (public-html@w3.org from November 2011)">HTML Working Group Chairs request</a>, the <a href="http://dev.w3.org/html5/spec/text-level-semantics.html#the-time-element" title="4.6 Text-level semantics &#8212; HTML5">W3 HTML5 Editor’s Draft spec</a> has been reverted to include <code>&lt;time&gt;</code>. Note this means it no longer includes <code>&lt;data&gt;</code>. The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element" title="4.6 Text-level semantics &#8212; HTML Standard">WHATWG HTML: Living Standard spec</a> is currently the opposite, still retaining <code>&lt;data&gt;</code> but with no <code>&lt;time&gt;</code>. According to <a href="http://blog.whatwg.org/weekly-tpac-2011" title="The WHATWG Blog  — WHATWG Weekly: TPAC 2011">Anne Van Kesteren’s post on the WHATWG Weblog</a>, <code>&lt;time&gt;</code> will return to the WHATWG spec taking into account <a href="http://wiki.whatwg.org/wiki/Time_element" title="Time element - WHATWG Wiki">new use cases on the WHATWG Wiki</a>.</p>
<p>TL;DR — it looks like <code>&lt;time&gt;</code> will remain, probably with more permissive <code>datetime</code>s, and <code>&lt;data&gt;</code> will also remain, but it’ll take a little while before the dust settles.</p>
</div>

<p><code>&lt;time&gt;</code> was originally added to allow dates and times to be machine readable, via the <code>datetime</code> attribute. This gives us human-readable content (“yesterday”) plus hidden machine-readable content (“2011-11-02”) with no accessibility problems. It allows for e.g. browsers to offer to localise dates. The <code>pubdate</code> attribute indicating an article’s date of publication was added for HTML to Atom conversion (also removed from HTML5 in this change), and would make it easy for search engines to sort by date. Having <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#dates-and-times">permitted dates and times specified in HTML5</a> (a subset of ISO 8601) allows a validator to check a <code>datetime</code> value is valid.</p>

<p><code>&lt;time&gt;</code> has been one of the easier elements to understand for authors, as it’s semantically obvious. By comparison the <a href="http://microformats.org/wiki/value-class-pattern">microformats Class-Value pattern</a> for datetimes is clunky.</p>

<p>HTML5 <code>&lt;time&gt;</code> element:</p>
<pre class="callout"><code>&lt;time class="dtstart" datetime="2011-10-05T09:00Z"&gt;9am on October 5&lt;/time&gt;</code></pre>

<p>Microformats Value-Class pattern:</p>
<pre class="callout"><code>&lt;span class="dtstart"&gt;&lt;abbr class="value" title="09:00"&gt;9am&lt;/abbr&gt; on &lt;abbr class="value" title="2011-10-05"&gt;October 5&lt;/abbr&gt;&lt;/span&gt;</code></pre>

<p><code>&lt;time&gt;</code> has been pretty widely used for weblog article publication dates, and has made it into WordPress and Drupal <del title="Removing due to lack of evidence, as the example I found can also be explained by Google just munging text for patterns.">plus being used by Google for search results</del>.</p>

<p><a href="http://wiki.whatwg.org/wiki/Time">The issues raised about <code>&lt;time&gt;</code></a> by authors were mainly that it didn’t do <em>everything</em>: it didn’t cover ancient and vague times, time durations, and there was no “last updated” attribute equivalent to <code>pubdate</code>. The other problem is there are a bunch of other less common but similar kinds of data that would also benefit from being machine readable and validatable, such as weights and prices. Minting a new element for each one would (arguably) be a lot of work, so Ian Hickson has added a generic element for these use cases instead — the <code>&lt;data&gt;</code> element, with a required <code>value</code> attribute.</p>

<blockquote>
<p>The data element represents its contents, along with a machine-readable form of those contents in the value attribute.</p>
<footer>— <cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element" title="4.6 Text-level semantics &#8212; HTML Standard">WHATWG HTML Living Standard specification</a></cite> </footer>
</blockquote>

<p>The <code>value</code> attribute contains the machine-readable equivalent of the element’s content. The <code>&lt;data&gt;</code> element can be used as-is as an element equivalent of <code>data-*</code> for marking up private data for scripts (although without the dataset <abbr>API</abbr>). It can also be used in conjunction with <a href="http://html5doctor.com/microdata/" title="Extending HTML5 — Microdata | HTML5 Doctor">microdata vocabularies</a> (and potentially <a href="http://html5doctor.com/microformats/" title="Extending HTML5 — Microformats | HTML5 Doctor">microformats</a>), in which case the format of the <code>value</code> attribute is specified by the vocabulary.</p>

<p>This is a welcome addition as it gives us an easy way to duplicate microformats’ Value-Class pattern for more than just the datetimes <code>&lt;time&gt;</code> allowed. However as part of introducing <code>&lt;data&gt;</code>, <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=13240"><code>&lt;time&gt;</code> together with <code>datetime</code> and <code>pubdate</code> have been dropped</a>.</p>

<p>This is controversial, with <a href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/">our own Dr Bruce writing</a>:</p>

<blockquote>
<p>I think this is a bad decision</p>
</blockquote>

<p><a href="http://lists.w3.org/Archives/Public/public-html/2011Oct/0163.html">Steve Faulkner has requested this change be reverted</a>, and <a href="https://twitter.com/#!/search/occupyhtml5">comments on the Twitters</a> and blogs (<a href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/#comments">Bruce</a>, <a href="http://www.webmonkey.com/2011/10/html5-drops-the-time-element/#comments">WebMonkey</a>, <a href="http://www.zeldman.com/2011/10/31/goodbye-html5-element/#comments">Zeldman</a>) have been mostly ranging from shock to outrage.</p>

<p>This is because while <code>&lt;time&gt;</code> is semantically obvious, <code>&lt;data&gt;</code> is seen as an equivalent to <code>&lt;div&gt;</code> or <code>&lt;span&gt;</code>. However, “semantics for the sake of it” isn’t enough to justify being in the spec, despite the benefits. Another reason for the dismay is many people have had trouble pushing to use HTML5, and having an element removed gives fuel to anyone arguing HTML5 isn’t suitable for production.</p>

<section id="problems">
<h2>What’s wrong with this picture <a class="permalink" href="#problems">#</a></h2>

<p>In <a href="http://meiert.com/en/blog/20111026/on-semantics-in-html/">On Semantics in HTML</a>, <a href="https://twitter.com/j9t">Jens Meiert</a> lists five types of semantics in HTML markup, ordered from most to least meaningful:</p>

<ul>
<li>Standards bodies: elements, attributes</li>
<li>Communities: microdata and microformats vocabularies, <abbr title="plain old semantic HTML">POSH</abbr> formats</li>
<li>Common sense: functional ID and class names</li>
<li>Generic names</li>
<li>Obfuscated, random, or presentational names</li>
</ul>

<p>Demoting datetimes from spec-specified to vocabulary-specified has several effects. For one, it’s more complex. Compare these two examples using <code>&lt;time&gt;</code> and <code>&lt;data&gt;</code> respectively:</p>

<p>Using <code>&lt;time&gt;</code>:</p>
<pre class="callout"><code>&lt;article&gt;
 …
 &lt;footer&gt;Published <mark>&lt;time pubdate datetime="2011-11-03"&gt;</mark>today<mark>&lt;/time&gt;</mark>.&lt;/footer&gt;
&lt;/article&gt;
</code></pre>

<p>Using <code>&lt;data&gt;</code> plus the <a href="http://schema.org/BlogPosting" title="BlogPosting  - schema.org">BlogPosting schema.org microdata vocabulary</a>:</p>
<pre class="callout"><code>&lt;article <mark>itemscope itemtype="http://schema.org/BlogPosting"</mark>&gt;
 …
 &lt;footer&gt;Published <mark>&lt;data itemprop="datePublished" value="2011-11-03"&gt;</mark>today<mark>&lt;/data&gt;</mark>.&lt;/footer&gt;
&lt;/article&gt;
</code></pre>

<p>While Google would no doubt love everyone to start using schema.org vocabularies, it’s a big increase in complexity. Adding <code>&lt;time datetime="…" pubdate&gt;</code> is fairly straightforward — learning and implementing microdata plus an appropriate schema.org vocabulary … not so much. Because of this fewer people will implement machine-readable article published dates.</p>

<p>To make matters worse, Google’s Rich Snippets Testing Tool (so presumably Google Search too) understandably <a href="http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Foli.jp%2Ftest%2Fmicrodata%2Fblogposting.html&amp;view=" title="Webmaster Tools - Rich Snippets Testing Tool">does not yet know about <code>&lt;data&gt;</code></a>. This means if you use <code>&lt;data&gt;</code> to replace <code>&lt;time&gt;</code> now, Google will only see the <em>human</em>-readable text. <code>&lt;data itemprop="datePublished" value="2011-11-03"&gt;today&lt;/data&gt;</code> is interpreted as <code>datePublished = <mark>today</mark></code>, not <code>datePublished = 2011-11-03</code>.</p>

<p>Also, now that specifying a datetime is not part of HTML5 we (presumably) can no longer validate datetime values using the HTML5 validator. Instead our only option is currently doing the two-step with Google’s Rich Snippets Testing Tool. Ironically as <a href="http://schema.org/Date" title="Date  - schema.org">schema.org defined dates using ISO 8601</a>, the imprecise dates and durations requested for <code>&lt;time&gt;</code> are now valid for <code>datePublished</code>, even though <code>pubdate</code> is the one usage of <code>datetime</code> everyone agreed on.</p>

<!-- /#problems --></section>

<section id="swings-roundabouts">
<h2>Pros &amp; Cons <a class="permalink" href="#swings-roundabouts">#</a></h2>

<p>Ian Hickson and, it seems, browser makers in general are for this change, whereas authors are in general against it (ahem, <a href="http://www.w3.org/TR/html-design-principles/#priority-of-constituencies" title="HTML Design Principles">priority of constituencies</a>). A couple of options would be:</p>

<ol>
<li>Scrap <code>&lt;data&gt;</code> and allow the <code>value</code> attribute on any element</li>
<li>Add a <code>type</code> attribute to <code>&lt;data&gt;</code> to make it more semantic</li>
<li>Bring back <code>&lt;time&gt;</code></li>
</ol>

<p>Unfortunately there are pros and cons for each of these options:</p>

<section id="value-everywhere">
<h3>Allow <code>value</code> on any element <a class="permalink" href="#value-everywhere">#</a></h3>

<p>This conflicts with microdata, where the values of some elements are their URLs rather than their content. For example, currently <code>&lt;img itemprop="photo" src="http://oli.jp/photo.jpg"&gt;</code> gives the microdata output of <code>photo = "http://oli.jp/photo.jpg"</code>. Adding <code>value</code> to the mix means there’d be two machine-readable values, so authors would need to know <a href="http://html5doctor.com/microdata/#itemprop-value" title="Extending HTML5 — Microdata | HTML5 Doctor">which elements couldn’t accept <code>value</code></a>.</p>

<!-- /#value-everywhere --></section>

<section id="type-attribute">
<h3>Add a <code>type</code> attribute to <code>&lt;data&gt;</code> <a class="permalink" href="#type-attribute">#</a></h3>

<p>This means the HTML5 specification has to specify each approved <code>type</code> value. While not as much work for implementers as a new element for each type of data, it’s still a bunch of work if the browsers actually do anything with that knowledge (like auto-converting <code>type="money"</code> into your currency). If <code>type</code> is required it also limits <code>&lt;data&gt;</code> to the types that are defined.</p>

<!-- /#type-attribute --></section>

<section id="more-time">
<h3>Bring back <code>&lt;time&gt;</code> <a class="permalink" href="#more-time">#</a></h3>

<p>The easiest way to make everyone happy is to keep <code>&lt;time&gt;</code> <em>in addition to</em> adding <code>&lt;data&gt;</code>. However the cons for this are we’d have two confusingly similar but not always interchangeable ways to mark up datetimes, potentially with different rules on what’s a valid datetime. For example, we’d need to mark up an article’s published date and updated date using different syntax. Special cases and exceptions make things harder to teach and learn.</p>

<!-- /#more-time --></section>

<!-- /#swings-roundabouts --></section>


<section id="conclusion">
<h2>Conclusion <a class="permalink" href="#conclusion">#</a></h2>

<p>While our private conversation between doctors about this has tended towards the <abbr>WTF</abbr> end of the spectrum, I’m personally up in the air about it. Despite the easy response (“bring back <code>&lt;time&gt;</code>!”), this is one of those thorny problems where there’s no simple right answer. <abbr>WHATWG</abbr> is performing a delicate balancing act: pragmatically adding only features that have a lot of value, and <a href="http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_removing_bad_ideas_from_a_specification.3F" title="FAQ - WHATWG Wiki">removing any that don’t make the grade</a>. In this case Hixie decided the cons of <code>&lt;time&gt;</code> (and of removing it from HTML5) outweighed the pros, and <code>&lt;data&gt;</code> is the result.</p>

<p>The one thing that bothers me about Hixie’s argument is that while datetimes are similar to other types of data that <code>&lt;data&gt;</code> now lets us mark up, they’re orders of magnitude more common on the web. Regardless of how it’s marked up, almost all weblog posts have the published date, and the majority of sites have a copyright date in the footer. In these use cases <code>&lt;time&gt;</code> was perfect, and definitely covered the 80%.</p>

<p>In my ideal world I’d like <code>&lt;time&gt;</code> to return, with the addition of a “<code>pubupdate</code>” attribute, and for all <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#dates-and-times" title="2.5 Common microsyntaxes &#8212; HTML Standard">dates and times that fall inside HTML5’s definition</a> to use <code>&lt;time&gt;</code>. For datetimes that <code>&lt;time&gt;</code> currently doesn’t cover, and for general use, we’d have <code>&lt;data&gt;</code>. Then again, I’m not sure I’d want to try teaching such intricacies to someone.</p>

<p>What do you think about this? While you’re welcome to just jump on the hogpile, I’d be interested to hear people consider all the pros and cons, and try to come up with a better (or less problematic) solution.</p>

<!-- /#conclusion --></section>

<footer><small>(Thanks to <a href="https://twitter.com/estellevw">Estelle Weyl</a>, <a href="https://twitter.com/annevk">Anne van Kesteren</a> and <a href="https://twitter.com/foolip">Philip Jägenstedt</a> for their feedback.)</small></footer><div id="crp_related"><h3>Related Posts:</h3><ul class="related"><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/microdata/" rel="bookmark" class="crp_title">Extending HTML5 — Microdata</a></li><li><a href="http://html5doctor.com/microformats/" rel="bookmark" class="crp_title">Extending HTML5 — Microformats</a></li><li><a href="http://html5doctor.com/html5-seo-search-engine-optimisation/" rel="bookmark" class="crp_title">HTML5 and Search Engine Optimisation (SEO)</a></li><li><a href="http://html5doctor.com/lets-talk-about-semantics/" rel="bookmark" class="crp_title">Let&#8217;s Talk about Semantics</a></li></ul></div><p><a href="http://html5doctor.com/time-and-data-element/" rel="bookmark">Goodbye time, datetime, and pubdate. Hello data and value.</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on November 2, 2011.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/time-and-data-element/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>The return of the u element</title>
		<link>http://html5doctor.com/u-element/</link>
		<comments>http://html5doctor.com/u-element/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 14:00:37 +0000</pubDate>
		<dc:creator>Oli Studholme</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[u]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=3862</guid>
		<description><![CDATA[<p>The <code>&#60;u&#62;</code> element was deprecated in HTML 4 and non-conforming in HTML5, but a couple of use cases have seen it return from the dead. Are the use cases enough to persuade you that it’s a phoenix not a zombie?</p>]]></description>
			<content:encoded><![CDATA[<p>Presentational elements like <a href="http://html5doctor.com/i-b-em-strong-element/" title="The i, b, em, &amp; strong elements | HTML5 Doctor"><code>&lt;i&gt;</code>, <code>&lt;b&gt;</code></a>, <a href="http://html5doctor.com/small-hr-element/" title="The small &amp; hr elements | HTML5 Doctor"><code>&lt;small&gt;</code> and <code>&lt;hr&gt;</code></a> have been redefined in HTML5 with semantic meanings, or, in a couple of cases, made non-conforming. The <code>&lt;u&gt;</code> element had been in the non-conforming camp, but a couple of semantic use cases led it back into the fold. While most of us will never need it (and some will jeer), on the odd occasion, it might be just the element you need.</p>

<p>Before HTML5, <code>&lt;u&gt;</code> was solely for applying a presentational style of <em>underlining</em> to text. <a href="http://www.w3.org/TR/html401/present/graphics.html#h-15.2" title="Alignment, font styles, and horizontal rules in HTML documents">HTML 4 discouraged “font-style” or presentational elements</a>, and even <a href="http://www.w3.org/TR/html401/appendix/changes.html#idx-deprecated" title="HTML 4 Changes">deprecated <code>&lt;u&gt;</code></a>, advising us to use CSS instead. Even before this, <code>&lt;u&gt;</code> was frowned upon as underlines are the browser default for links, and making normal text look like links gives users a bad case of clicky-clicky frustration. <code>&lt;u&gt;</code> was initially non-conforming in HTML5.</p>

<p>There are, however, a couple of non-link places where text <em>is</em> traditionally underlined to convey meaning, as the HTML5 specification’s definition mentions:</p>

<blockquote>
<p>The <code>u</code> element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt.</p>
<footer>— <cite><a href="http://www.whatwg.org/specs/web-apps/current-work/complete/text-level-semantics.html#the-u-element" title="4.6 Text-level semantics &#8212; Web Applications 1.0"><abbr title="">WHATWG</abbr> HTML5 specification</a></cite></footer>
</blockquote>

<p>Before we get to them, let’s quickly cover <em>an unarticulated, though explicitly rendered, non-textual annotation</em>. This means <q><code>&lt;u&gt;</code> is for when you are annotating something, but not explicitly saying what it is</q> (<cite><a href="http://krijnhoetmer.nl/irc-logs/whatwg/20110930#l-916" title="IRC logs: freenode / #whatwg / 20110930">WHATWG IRC</a></cite>, Ian Hickson) — the annotation’s meaning is implied by context.</p>

<section id="proper-name-mark">
<h2>Chinese proper name marks <a class="permalink" href="#proper-name-mark">#</a></h2>

<p>And what exactly are those you ask? I had to ask Wikipedia myself:</p>

<blockquote>
<p>In Chinese writing, a proper name mark (Simplified Chinese: <span lang="Hans">专名号</span>, <span lang="zh-Latn">zhuānmínghào</span>; Traditional Chinese: <span lang="Hant">專名號</span>) is an underline used to mark proper names, such as the names of people, places, dynasties, organizations. … This method of recognizing proper names in text is similar to the English use of a capital letter.</p>
<footer>— <cite><a href="http://en.wikipedia.org/wiki/Proper_name_mark" title="Proper name mark - Wikipedia, the free encyclopedia">Proper name mark</a></cite>, Wikipedia</footer>
</blockquote>

<p>Wikipedia gives the following example, which I’ve formatted using <code>&lt;u&gt;</code>:</p>

<figure id="pnm">
<style scoped>#pnm .pnm, #pnm .bnm {text-decoration: underline;}
#pnm .bnm {
  -moz-text-decoration-style: wavy;
  text-decoration-style: wavy;
}
#pnm p[lang="zh"] cite {font-style: normal;}</style>
<pre><code lang="zh">&lt;u class="pnm"&gt;屈原&lt;/u&gt;放逐，乃賦&lt;cite class="bnm"&gt;離騒&lt;/cite&gt;。&lt;u class="pnm"&gt;左丘&lt;/u&gt;失明，厥有&lt;cite class="bnm"&gt;國語&lt;/cite&gt;。（司馬遷 《&lt;cite&gt;報任安書&lt;/cite&gt;》）</code></pre>
<p lang="zh"><u class="pnm">屈原</u>放逐，乃賦<cite class="bnm">離騒</cite>。<u class="pnm">左丘</u>失明，厥有<cite class="bnm">國語</cite>。（司馬遷 《<cite>報任安書</cite>》）</p>
<!-- The source doesn’t use proper and book name marks for the citation because modern usage is only to use guillemets for the title — only the quoted text is classical -->
<p><mark lang="zh">Qu Yuan</mark> was exiled, and thus composed the <mark lang="zh"><cite>Li Sao</cite></mark>. <mark lang="zh">Zuo Qiu</mark> lost his sight, hence there is the <mark lang="zh"><cite>Guo Yu</cite></mark>. (<span lang="zh">Sima Qian</span>, “<cite>Letter to <span lang="zh">Ren'an</span></cite>”)</p>
<figcaption>Using <code>&lt;u&gt;</code> for Chinese proper name marks where appropriate</figcaption>
</figure>

<p>If you’re using Firefox 6+ you’ll also see the appropriate wavy underline for a Chinese book name mark on the quote’s source, courtesy of CSS3’s <code>text-decoration-style: wavy;</code>. I’ve used <code>&lt;cite&gt;</code> for book name marks as it’s more appropriate than <code>&lt;u&gt;</code>. You can find out more about <code>wavy</code> in <a href="http://dev.w3.org/csswg/css3-text/Overview.html#decoration" title="CSS Text Level 3">CSS Text Level 3</a>.</p>

<!-- /#proper-name-mark --></section>

<section id="spell-check">
<h2>Using <code>&lt;u&gt;</code> for spell-checking feedback <a class="permalink" href="#spell-check">#</a></h2>

<p>While you’re probably not marking up classical Chinese prose, a more familiar use case is for a spell-checker to indicate incorrect text. The default formatting in word processors is typically a red underline for spelling errors, and a green underline for grammatical errors:</p>

<figure id="spelling">
<style scoped>#spelling .spelling-error {
  text-decoration: none;
  border-bottom: 1px dashed red;
}
#spelling .grammatical-error {
  text-decoration: none;
  border-bottom: 1px dashed green;
}</style>
<pre><code>.spelling-error {
  text-decoration: none;
  border-bottom: 1px dashed red;
}
.grammatical-error {
  text-decoration: none;
  border-bottom: 1px dashed green;
}
&lt;p&gt;hello doctor i am having a huge body &lt;u class="spelling-error"&gt;oder&lt;/u&gt; &lt;u class="grammatical-error"&gt;it is smell really bad&lt;/u&gt;&lt;/p&gt;</code></pre>
<p>hello doctor i am having a huge body <u class="spelling-error">oder</u> <u class="grammatical-error">it is smell really bad</u></p>
<figcaption>Using <code>&lt;u&gt;</code> for annotating spell checker feedback</figcaption>
</figure>

<p>While we’ve turned off the default <code>text-decoration</code> style, <code>&lt;u&gt;</code> will back us up if CSS is disabled, and potentially provide more information for assistive technology. After all, if it’s semantic it should be in HTML, not CSS.</p>

<p>Some word processors use wavy underlines. This CSS would have the same effect in a supporting browser:</p>

<pre><code>.spelling-error {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: red;
}
.grammatical-error {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: green;
}</code></pre>

<p>Or, using <code>text-decoration</code> as a shorthand property, and adding a default declaration for non-supporting browsers:</p>

<pre><code>.spelling-error {
  text-decoration: underline; /* for backwards compatibility */
  text-decoration: underline wavy red;
}
.grammatical-error {
  text-decoration: underline; /* for backwards compatibility */
  text-decoration: underline wavy green;
}</code></pre>

<p>Again, you can read more about the upgraded <code>text-decoration</code> properties in <a href="http://dev.w3.org/csswg/css3-text/Overview.html#decoration" title="CSS Text Level 3">CSS Text Level 3</a>.</p>

<!-- /#spell-check --></section>

<section id="family-names">
<h2>Using <code>&lt;u&gt;</code> for indicating family names <a class="permalink" href="#family-names">#</a></h2>

<p>Another use for <code>&lt;u&gt;</code> is to annotate a family name when this might be confusing — Chinese, Japanese, Korean and Vietnamese (among others) all traditionally write names in a different order than the western-centric “given-name family-name”. While applying a blanket western ordering is fairly common (especially when publishing in English), it’s good form to use culturally appropriate ordering. If the audience might misunderstand, the family name can be underlined, capitalised, or otherwise annotated to make the name order explicit. For example, the <abbr title="Central Intelligence Agency">CIA</abbr>’s World Fact Book capitalises the family name:</p>

<blockquote>
<p>After World War II, the Communists under <mark>MAO Zedong</mark> established an autocratic socialist system …</p>
<footer>— <cite><a href="https://www.cia.gov/library/publications/the-world-factbook/geos/ch.html">The World Factbook</a></cite>, <abbr title="Central Intelligence Agency">CIA</abbr></footer>
</blockquote>

<p>This ties in nicely with <a href="http://html5doctor.com/microformats/#hcard" title="Extending HTML5 — Microformats | HTML5 Doctor">the hCard microformat</a>, as the “implied <code>n</code> optimisation” doesn’t work with these non-western ordered names, and we need a wrapper element to indicate each part of the name anyhow.</p>

<figure id="family-name1">
<style scoped>#family-name1 .family-name {text-decoration: underline;}</style>
<pre><code>&lt;style&gt;
  .family-name {text-decoration: underline;}
&lt;/style&gt;
&lt;p&gt;
  &lt;span class="vcard" lang="ja-latn"&gt;
    &lt;span class="fn n"&gt;
      &lt;u class="family-name"&gt;Son&lt;/u&gt; &lt;span class="given-name"&gt;Goku&lt;/span&gt;
    &lt;/span&gt;
  &lt;/span&gt;
   is the main protagonist in 
  &lt;span class="vcard" lang="ja-latn"&gt;
    &lt;span class="fn n"&gt;
      &lt;span class="given-name"&gt;Akira&lt;/span&gt; &lt;u class="family-name"&gt;Toriyama&lt;/u&gt;
    &lt;/span&gt;
  &lt;/span&gt;’s &lt;i lang="ja-latn"&gt;manga&lt;/i&gt; “Dragon Ball”.
&lt;/p&gt;</code></pre>
<p><span class="vcard" lang="ja-latn"><span class="fn n"><u class="family-name">Son</u> <span class="given-name">Goku</span></span></span> is the main protagonist in <span class="vcard" lang="ja-latn"><span class="fn n"><span class="given-name">Akira</span> <u class="family-name">Toriyama</u></span></span>’s <i lang="ja-latn">manga</i> “Dragon Ball”.</p>
<figcaption>Using <code>&lt;u&gt;</code> to indicate the family name in non-western names via underlining</figcaption>
</figure>

<p>Of course you can then change the style via CSS, for example</p>

<figure id="family-name2">
<style scoped>#family-name2 .family-name {
  text-decoration: none;
  text-transform: uppercase;
}</style>
<pre><code>.family-name {
  text-decoration: none;
  text-transform: uppercase;
}
</code></pre>
<p><span class="vcard" lang="ja-latn"><span class="fn n"><u class="family-name">Son</u> <span class="given-name">Goku</span></span></span> is the main protagonist in <span class="vcard" lang="ja-latn"><span class="fn n"><span class="given-name">Akira</span> <u class="family-name">Toriyama</u></span></span>’s <i lang="ja-latn">manga</i> “Dragon Ball”.</p>
<figcaption>Using <code>&lt;u&gt;</code> to indicate the family name in non-western names via capitalisation</figcaption>
</figure>

<p>The benefit of using <code>&lt;u&gt;</code> for this is the family name will be indicated even when CSS is disabled, ensuring the annotation isn’t lost. Assistive technology may also be able to inform the user of this in the future.</p>

<!-- /#family-names --></section>

<section id="do-we-need-u">
<h2>But do we need <code>&lt;u&gt;</code>? <a class="permalink" href="#do-we-need-u">#</a></h2>

<p>A lot of people bitten by the web standardista bug have somewhat of an allergic reaction to ex-presentational elements in HTML5, after influential articles like Tantek Çelik’s “<a href="http://tantek.com/log/2002/10.html#L20021022t1432" title="tantek/log/2002/10"><code>&lt;b&gt;</code>ed and <code>&lt;br&gt;</code>eakfast markup</a>”. Given <code>&lt;u&gt;</code>’s ignoble past, I expect the reaction to its return will also lead to some poo-pooing. As we already mentioned, however, <em>if it imparts meaning, it should be in HTML</em>. These use cases involve semantic meaning, and even without assistive technology support, <code>&lt;u&gt;</code> conveys some meaning to sighted users via the browser-default style <code>text-decoration: underline;</code>.</p>

<p>Regardless of whether an element is deprecated (HTML 4, XHTML 1)  or non-conforming (HTML5) or just plain uncool, browser makers still have to support it for backward compatibility with all those awesome web pages from the days when <code>&lt;blink&gt;</code> was hawt. Because of this, if there’s a semantic use case for an ex-presentational element, it’s definitely better to reform it rather than minting a new element with no backward compatibility. You might think <code>&lt;mark&gt;</code> sounds pretty similar, but the default browser styling would be completely wrong for proper name marks, and <a href="http://krijnhoetmer.nl/irc-logs/whatwg/20110930#l-890" title="IRC logs: freenode / #whatwg / 20110930">semantically less appropriate for spelling errors</a> too.</p>

<p>As Ian Hickson explains:</p>

<blockquote>
<p>The presentational markup that was <code>&lt;u&gt;</code>, <code>&lt;i&gt;</code>, <code>&lt;b&gt;</code>, <code>&lt;font&gt;</code>, <code>&lt;small&gt;</code>, etc, is gone. However, there are certain use cases that did not yet have elements yet were important enough to warrant us supporting them. By reusing existing elements, we are able to support them without having to wait for new elements to be implemented. By doing so in a way that closely matches how those elements were actually used in practice (at least to the same extent as other elements have been correctly used in practice) we can not only have older UAs support these new elements automatically, but we can do so in a way that does not introduce an undue volume of invalid pages.</p>
<footer>— <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-July/032715.html" title="[whatwg] sic element">WHATWG email list</a>, Ian Hickson</footer>
</blockquote>

<!-- /#do-we-need-u --></section>

<section id="conclusion">
<h2>Conclusion</h2>

<p>Given the potential to confuse underlined text with links, using <code>text-decoration: underline;</code> on anything other than <code>&lt;a&gt;</code> is bad pretty much all the time. <strong>Generally <code>&lt;u&gt;</code> is not the element you’re looking for</strong>, even for Chinese book name marks (<code>&lt;cite&gt;</code> would be more appropriate). <em>However</em>, for at least these three use cases, it’s good to have a semantic option, something better than <code>&lt;span&gt;</code>.</p>

<p>So…in a hypothetical world where you did need to code for one of these situations, would you use <code>&lt;u&gt;</code> or something else like <code>&lt;span&gt;</code>? Let us know in the comments!</p>

<!-- /#conclusion --></section>
<div id="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/ruby-rt-rp-element/" rel="bookmark" class="crp_title">The ruby element and her hawt friends, rt and rp</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/i-b-em-strong-element/" rel="bookmark" class="crp_title">The i, b, em, &amp; strong elements</a></li><li><a href="http://html5doctor.com/blockquote-q-cite/" rel="bookmark" class="crp_title">Quoting and citing with <code>&lt;blockquote&gt;</code>, <code>&lt;q&gt;</code>, <code>&lt;cite&gt;</code>, and the cite attribute</a></li><li><a href="http://html5doctor.com/ol-element-attributes/" rel="bookmark" class="crp_title">The <code>ol</code> Element and Related Attributes: <code>type</code>, <code>start</code>, <code>value</code>, and <code>reversed</code></a></li></ul></div><p><a href="http://html5doctor.com/u-element/" rel="bookmark">The return of the u element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on October 25, 2011.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/u-element/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>The hgroup hokey cokey</title>
		<link>http://html5doctor.com/the-hgroup-hokey-cokey/</link>
		<comments>http://html5doctor.com/the-hgroup-hokey-cokey/#comments</comments>
		<pubDate>Fri, 06 May 2011 11:34:49 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[hgroup]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=3208</guid>
		<description><![CDATA[<p>As you may well have heard this week, hgroup has been in, out and in the spec again, while members of the W3C and others have truly been shaking it all about. If you've missed this latest merry dance then please head on over to the W3 bug report page to help get a clearer indication.</p>]]></description>
			<content:encoded><![CDATA[<p>As you may well have heard this week, <code>hgroup</code> has been in, out and in the spec again, while members of the W3C and others have truly been shaking it all about. If you&#8217;ve missed this latest merry dance then please head on over to the <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11828" title="removal of hgroup from the specification">W3 bug report page</a> to help get a clearer indication.</p>

<p>To offer a quick recap, <code>hgroup</code> was <a href="http://html5.org/tools/web-apps-tracker?from=6051&#038;to=6052">removed from the W3C specification</a> only (not the WHATWG spec) by Hixie at the request of <a href="http://twitter.com/stevefaulkner">Steve Faulkner</a>. <a href="http://lists.w3.org/Archives/Public/public-html/2011May/0061.html">The co-chairs requested the issue be reverted</a> following multiple requests from the likes of <a href="http://twitter.com/tabatkins">Tab</a> and <a href="http://twitter.com/t">Tantek</a>. The current status at the time of writing is that <code>hgroup</code> is in the spec.</p>

<p>It seems that the future of <code>hgroup</code> will be decided during the HTML5 spec last call review which is expected to start on or around May 22nd 2011.</p>

<p>One of the main reasons for this element being removed was because some people felt that it was only in the spec was to keep the outline algorithm happy and that it didn&#8217;t really offer much else in the way of semantics. It has also been suggested that people were still struggling to understand how to implement it correctly. If, however, you need your memory jogging then we suggest <a href="http://html5doctor.com/the-hgroup-element/"> reading our post on <code>hgroup</code> from last year</a>.</p>

<p>Far be it from us to get involved in the political wrangling (<a href="http://twitter.com/#!/brucel/status/65757483955781632">and knob waving</a>) of the W3C, therefore when news of this broke we doctors fired a few emails between each other discussing what was going on and what <em>we</em> thought should be the next logical step. The outcome from these emails showed that there was no clear majority. Some of the doctors, myself included, thought that the element was a handy addition to the spec and should be something that we fought to keep. Others, like Bruce, have made no qualms about <a href="http://www.brucelawson.co.uk/2010/on-the-hgroup-element/">their dislike for this particular element</a>.</p>

<p>Regardless, we decided to see if we could solve this issue by offering up alternative solutions. Below are a few of the suggestions (and issues) that came out of the conversation. We understand that some of these suggestions come with their own issues and the consequences maybe haven&#8217;t been fully thought through, but the aim of this is to start a conversion, not provide a final answer.</p>

<figure>
<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=&quot;2010-03-20&quot;&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>
<figcaption>How hgroup currently works, for comparison</figcaption>
</figure>

<h2>Subtitle within header</h2>
<pre><code>&#60;article&#62;
  &#60;header&#62;
    &#60;h1&#62;Title&#60;/h1&#62;
    <mark>&#60;p&#62;subtitle&#60;/p&#62;</mark>
  &#60;/header&#62;
  &#60;p&#62;Lorem Ipsum dolor set amet...&#60;/p&#62;
&#60;/article&#62;
</code></pre>

<p>The method suggested above is probably the closest example to what we currently have with regards to <code>hgroup</code>. Within this code example we have an heading level and p tag within the header element.</p>
<p>Although this might seem fairly straight forward, it does become more complicated if we have further elements within the header; additional p tags, spans etc.</p>

<h2>Highest ranking heading takes precedence</h2>
<pre><code>&lt;article&gt;
  &lt;header&gt;
    <mark>&lt;h4&gt;Intro subtitle&lt;/h1&gt;
    &lt;h1&gt;Title goes here&lt;/h1&gt;
    &lt;h3&gt;by John Smith&lt;/h3&gt;</mark>
    &lt;p&gt;&lt;time datetime=&quot;2010-03-20&quot;&gt;20th March, 2010&lt;/time&gt;&lt;/p&gt;
    &lt;nav&gt;
      &lt;h2&gt;Chapters&lt;/h2&gt;
      &lt;ul&gt;...&lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/header&gt;                
  &lt;p&gt;Lorem Ipsum dolor set amet...&lt;/p&gt;
&lt;/article&gt;
</code></pre>

<p>Taking the previous example a bit further, here we have multiple headings within <code>header</code> and the machine could recognise that the <code>h1</code> is the highest ranking and should be used in the outline. Other headings are excluded, with the exception of the <code>h2</code> within <code>nav</code> as it is a sectioning content element and therefore still affects outline.</p>

<p>This allows the developer to have multiple subtitles of varying importance without affecting the outline. The drawback of this is the use of headings isn&#8217;t very intuitive when lower ranking headings can appear anywhere within <code>header</code>. Thankfully we still have ideas for other alternatives.</p> 

<h2>Span subtitle within header</h2>
<pre><code>&#60;article&#62;
  &#60;header&#62;
    &#60;h1&#62;Title <mark>&#60;span&#62;<mark>Subtitle</mark>&#60;/span&#62;</mark>&#60;/h1&#62;
  &#60;/header&#62;
  &#60;p&#62;Lorem Ipsum dolor set amet...&#60;/p&#62;
&#60;/article&#62;
</code></pre>

<p>This next technique is probably similar to something that you might have used before when coding up a page in <code>HTML4</code>, providing something of a natural progression, <a href="http://www.w3.org/TR/html-design-principles/#pave-the-cowpaths">paving the cowpaths</a> if you will. As the span is within the heading element it makes it clear that it is associated with the heading.</p>

<p>Some of the doctors are not convinced this is the correct way to progress and therefore looked for another alternative.</p>

<h2>Introducing the subtitle</h2>
<pre><code>&#60;article&#62;
  &#60;header&#62;
    &#60;h1&#62;Title <mark>&#60;span subtitle&#62;Subtitle&#60;/span&#62;</mark>&#60;/h1&#62;
  &#60;/header&#62;
  &#60;p&#62;Lorem Ipsum dolor set amet...&#60;/p&#62;
&#60;/article&#62;
</code></pre>

<p>This example is almost identical to the example provided above. The only difference here is that we&#8217;ve added a subtitle attribute to help assistive software make the connection between heading and subtitle. Again, some Doctors are not completely comfortable with nesting a subtitle within a heading element.</p>

<p>It was also suggested combining this example and the first to come up with a better outcome. Whereby a developer would include a heading and p tag, marked up with the subtitle attribute, within the header element.</p>

<h2>For attribute within header</h2>
<pre><code>&#60;article&#62;
  &#60;header&#62;
    &#60;h1 id="title"&#62;Title&#60;/h1&#62;
    <mark>&#60;p for="title"&#62;Subtitle&#60;/p&#62;</mark>
  &#60;/header&#62;
  &#60;p&#62;Lorem Ipsum dolor set amet...&#60;/p&#62;
&#60;/article&#62;
</code></pre>

<p>Now for something totally different. The above example borrows an idea from forms using the <code>for</code> attribute. in HTML5, a number of elements which were previously required to be within a form element can now be located anywhere on the page and associated with a form using a <code>form</code> attribute pointing at the <code>id</code> of its form owner. This example extends borrows the idea an applying it to use with another attribute and element.</p>

<p>In our example the p tag is owned by the heading element. The interesting thing with this method, along with the forms, is that the subtitle wouldn&#8217;t necessarily have to be nested within the header, as assistive technology would still be able to associated which heading it belonged too.</p>

<h2>What&#8217;s next and your suggestions</h2>
<p><a href="http://www.w3.org/html/wg/tracker/issues/164">Issue 164 on the W3C tracker</a> offers some further suggestions to how <code>hgroup</code> could be removed, modified or otherwise changed. Some of those are similar or the same as those we&#8217;ve mentioned above but now you&#8217;ve seen our suggestions and perhaps perused those in issue 164, so why not let us know your suggestions below in the comments.</p> 

<p>This is a fairly big issue and one that a lot of people are still obviously undecided about, so here is your chance to seize an opportunity because, you never know, your suggestion could become standard practice.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul class="related"><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/outlines/" rel="bookmark" class="crp_title">Document Outlines</a></li><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-18/" rel="bookmark" class="crp_title">Your Questions 18</a></li><li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li></ul></div><p><a href="http://html5doctor.com/the-hgroup-hokey-cokey/" rel="bookmark">The hgroup hokey cokey</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 6, 2011.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-hgroup-hokey-cokey/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>HTML5 for Web Developers</title>
		<link>http://html5doctor.com/html5-for-web-developers/</link>
		<comments>http://html5doctor.com/html5-for-web-developers/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 14:30:09 +0000</pubDate>
		<dc:creator>Oli Studholme</dc:creator>
				<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=3061</guid>
		<description><![CDATA[<p>While they’re essential reading material for our job, W3C specifications tend to make for poor reading material. One intrepid developer set out to change this for himself — “HTML5 for Web Developers” is the fruit of his labours. In addition to introducing this awesome new resource, we make a delicious fruit salad for you by comparing it to the other HTML(5) specs.</p>]]></description>
			<content:encoded><![CDATA[<!-- 
<h1>An HTML5 spec for the rest of us</h1>
 -->

<p>While they’re essential reading material for our job, the <dfn><abbr title="World Wide Web Consortium">W3C</abbr></dfn> specifications are not exactly <a href="http://www.georgerrmartin.com/" title="George R. R. Martin's Official Website">George R. R. Martin</a>-level reading material. To make matters worse, the often-dry text (written for <em>implementors</em>, not authors) and…colourful illustrations come wrapped in a design straight out of 1999. While the <a href="http://www.w3.org/Help/about-redesign.html" title="About the W3C Site Redesign"><abbr>W3C</abbr> homepage got some lovin’</a> in 2009 from the dynamic duo of <a href="http://www.happycog.com/create/w3c/" title="The World Wide Web Consortium Website Redesign: Happy Cog">Happy Cog</a> and <a href="http://www.airbagindustries.com/archives/airbag/were_actively_w.php" title="Airbag - Completed.">Airbag Industries</a>, the actual specifications are still only slightly above the baseline of browser defaults. So what’s a caring developer to do?</p>

<p><a href="http://twitter.com/benschwarz">Ben Schwarz</a>, a developer in Melbourne, Australia, took matters into his own hands with a <a href="http://germanforblack.com/articles/moving-towards-readable-w3c-specs" title="W3C Design
— an article by Ben Schwarz">userscript to give <abbr>W3C</abbr> specs some <em>readability</em></a>. Around the same time <a href="http://people.w3.org/mike/" title="W3C &#187; People &#187; Michael[tm] Smith">Mike™ Smith</a> — the <abbr>W3C</abbr> team contact for HTML Working Group amongst other things — was looking for CSS help for <a href="http://dev.w3.org/html5/markup/" title="HTML5: The Markup Language Reference">HTML5: The Markup Language Reference</a>, his cut-down reference version of the HTML5 spec. I was able to introduce Mike™ and Ben, and the result was <a href="http://dev.w3.org/html5/spec-author-view/" title="HTML5 (Edition for Web Authors)">HTML5 Edition for Web Authors</a>. But this was only the start.</p>

<p>Ben then got on the <abbr>WHATWG</abbr> <abbr>IRC</abbr> channel:</p>

<blockquote>
<p>Within 10 minutes of joining the <abbr>WHATWG</abbr> <abbr>IRC</abbr> channel Ian Hickson had granted me approval to continue with my own build of the spec, targeted for web developers.</p>
<footer><cite>— <a href="http://www.germanforblack.com/articles/html5-for-web-developers">HTML5, for web developers</a></cite> announcement by Ben Schwarz</footer>
</blockquote>

<p>After a lot of hard work, with input and encouragement from the web’s finest (including Dr Bruce), Ben has released <a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers">HTML5 for Web Developers</a>.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/html5-for-web-devs-50.png" alt="HTML5 for Web Developers screenshot" width="552" height="424" class="aligncenter size-full wp-image-3075" />
<figcaption>HTML5 for Web Developers</figcaption>
</figure>

<blockquote>
<p>The focus of this specification is readability and ease of access. Unlike the full HTML specification, this “web developer edition” removes information that only browser vendors need know.</p>
<footer><cite>— <a href="http://developers.whatwg.org/">HTML5 for Web developers</a></cite></footer>
</blockquote>

<p>In addition to streamlining the content, it boasts all manner of freshly implemented buzzwords and technical trickery through the magicks<!-- intentional --> of JavaScript and CSS:</p>

<ul>
<li>find-as-you-type search (type “<kbd>/</kbd>”)</li>
<li>offline access</li>
<li>alternate styles for mobile devices</li>
<li>technical references pulled inline</li>
<li>beautiful typography</li>
<li>…and <em>design</em></li>
</ul>

<p>It’s been well received, with more than <a href="https://twitter.com/benschwarz/status/40292551848235008">20,000 uniques in the first 24 hours</a>, and the Pied Piper of HTML5 remarking:</p>

<blockquote>
<p>Enjoying the gorgeously readable presentation of <a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers">http://developers.whatwg.org/</a> Nice work, <a href="http://twitter.com/benschwarz">@benschwarz</a>.</p>
<footer><cite>— <a href="http://twitter.com/#!/adactio/status/39827347100278784">@adactio, 22 Feb</a></cite> by Jeremy Keith</footer>
</blockquote>

<p><a href="https://github.com/benschwarz/developers.whatwg.org">The files to build HTML5 for Web Developers are on GitHub</a>, so if you have any problems or suggestions <a href="https://github.com/benschwarz/developers.whatwg.org/issues">add an issue</a>. You can also fork the project and help out — I have!</p>

<section id="what-to-use">
<h3>…but what spec should I use?</h3>

<p>In <a href="http://html5doctor.com/html5-living-standard/" title="HTML as a Living Standard — For and Against | HTML5 Doctor">our previous article on “HTML as a Living Standard”</a>, guest author <a href="http://john.foliot.ca/" title="Unrepentant">John Foliot</a> voiced a valid concern that with several versions of the HTML5 specification, you might end up on a different one than you expected, so let’s have a look at the different versions. Using the <abbr>W3C</abbr> nomenclature, “implementors” are browser and tool makers, and “authors” are web developers, and I’ve linked to Editor’s Drafts rather than Working Drafts, as HTML5 is still in flux.</p>
</section><!-- /#what-to-use -->

<section id="full-versions">
<h3>The heavyweight specs</h3>

<section id="html5">
<h4><a href="http://dev.w3.org/html5/spec/" title="HTML5">HTML5 — A vocabulary and associated <abbr>API</abbr>s for HTML and XHTML</a> by <abbr>W3C</abbr> <!-- <a href="http://www.w3.org/TR/html5/" title="HTML5">Working draft</a> --></h4>

<p>The HTML5 spec on the <abbr>W3C</abbr> site. It’s smaller than the other specs because several parts (including <a href="http://www.w3.org/TR/microdata/" title="HTML Microdata">Microdata</a>, <a href="http://dev.w3.org/html5/2dcontext/" title="HTML Canvas 2D Context">Canvas 2D Context</a>, and <a href="http://dev.w3.org/html5/postmsg/" title="HTML5 Web Messaging">Web Messaging</a>) have been turned into their own specifications.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/html5-w3c-33.png" alt="HTML5 specification screenshot" width="368" height="282" class="aligncenter size-full wp-image-3076" />
<figcaption>The HTML5 specification (on w3.org)</figcaption>
</figure>
<p>I recommend this spec if you don’t follow HTML5 developments — e.g., if you’re not a reader of HTML5 Doctor. This is the specification being prepared for Last Call in May 2011, and it shouldn't change much from here on.</p>
</section><!-- /#html5 -->

<section id="html-living-standard">
<h4><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/" title="HTML Standard">HTML — Living Standard</a> by <dfn><abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr></dfn></h4>

<p>The HTML spec on the <abbr>WHATWG</abbr> site. It’s a superset of the HTML5 spec, including some things that the <abbr>W3C</abbr> has split into separate specs (see above). It also includes post-HTML5 features such as <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#webvtt-0" title="4.8.6 The video element &mdash; HTML Standard">Web Video Text Tracks (WebVTT)</a>, but it doesn’t include non-HTML-specific specs like <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webstorage.html" title="11 Web storage &#8212; Web Applications 1.0">Web Storage</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/network.html" title="10.3 Web sockets &#8212; Web Applications 1.0">Web Sockets API</a>, and <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/comms.html#server-sent-events" title="10 Communication &#8212; Web Applications 1.0">Server-sent Events</a>.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/html-whatwg-33.png" alt="HTML — Living Standard specification screenshot" width="368" height="282" class="aligncenter size-full wp-image-3073" />
<figcaption>HTML — Living Standard specification (on whatwg.org)</figcaption>
</figure>

<p>I recommend this spec if you are interested in HTML5 (and beyond) and wish to be actively involved. While it’s more liable to change (especially the new bits), it’s also likely to include improvements that haven’t made it into HTML5. It’s also what browser makers are looking at. You can also get to it quickly with the link <a href="http://whatwg.org/html" title="HTML Standard">http://whatwg.org/html</a>.</p>
</section><!-- /#html-living-standard -->

<section id="web-applications">
<h4><a href="http://www.whatwg.org/specs/web-apps/current-work/complete/" title="Web Applications 1.0">Web Applications 1.0</a></h4>

<p>This is <em>everything</em> the <abbr>WHATWG</abbr> is working on, including non-HTML-specific material (see above). It’s introduced with a photo of a kitchen sink ;)</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/web-applications-33.png" alt="Web Applications 1.0 specification screnshot" width="368" height="282" class="aligncenter size-full wp-image-3077" />
<figcaption>Web Applications 1.0 specification (on whatwg.org)</figcaption>
</figure>

<p>While this is pretty much the same as HTML — Living Standard, I don’t recommend it because it doesn’t have the ability to hide implementor details. However you’ll need it if you’re interested in <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webstorage.html" title="11 Web storage &#8212; Web Applications 1.0">Web Storage</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/network.html" title="10.3 Web sockets &#8212; Web Applications 1.0">Web Sockets API</a>, and <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/comms.html#server-sent-events" title="10 Communication &#8212; Web Applications 1.0">Server-sent Events</a>. You can get to it quickly with the link <a href="http://whatwg.org/C" title="Web Applications 1.0">http://whatwg.org/C</a>.</p>
</section><!-- /#web-applications -->
</section><!-- /#full-versions -->


<section id="author-versions">
<h3>Cut-down versions specifically for authors (us)</h3>

<section id="h-tml">
<h4><a href="http://dev.w3.org/html5/markup/" title="HTML5: The Markup Language Reference">HTML5: The Markup Language Reference</a> <!-- <a href="http://www.w3.org/TR/html-markup/" title="HTML: The Markup Language Reference">Working draft</a> --></h4>

<p>A quick reference <em>for authors</em> describing the syntax, structure, and semantics of HTML5. It's intended to be <q>as concise and readable as possible</q>. From <a href="http://twitter.com/benschwarz/status/39891483897102336">the legend</a> and <a href="http://twitter.com/sideshowbarker">self-styled <abbr>W3C</abbr> HTML5 jackass</a> himself, Mike™ Smith, who also gets bonus points for the initialism “H:TML”.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/h-tml-33.png" alt="HTML5: The Markup Language Reference screenshot" width="368" height="282" class="aligncenter size-full wp-image-3071" />
<figcaption>HTML5: The Markup Language Reference (on w3.org)</figcaption>
</figure>

<p>I recommend this as a quick reference or cheat sheet to remind yourself of the essentials (well, in addition to the <a href="http://html5doctor.com/glossary/" title="Glossary | HTML5 Doctor">HTML5 Doctor glossary</a>, of course ;-). It doesn’t have the depth of guidance or the examples in the other specs (or the implementor details), but it has info links to <a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers">HTML5 for Web Developers</a>, so you can easily get more detailed information.</p>
</section><!-- /#h-tml -->

<section id="html5-for-web-authors">
<h4><a href="http://dev.w3.org/html5/spec-author-view/" title="HTML5 (Edition for Web Authors)">HTML5 (Edition for Web Authors)</a> <!-- <a href="http://www.w3.org/TR/html5/author/" title="HTML5 (Edition for Web Authors)">Working draft</a> --></h4>

<p>HTML5 for Web Authors was Mike™ and Ben’s first collaboration. It removes the implementation details intended for browser makers and adds some style, and it’s more in line with <abbr>W3C</abbr>’s HTML5 in that it doesn’t include microdata. For the time being, it’s been superseded by <a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers">HTML5 for Web Developers</a>.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/html-for-web-authors-33.png" alt="HTML5 for Web Authors screenshot" width="368" height="282" class="aligncenter size-full wp-image-3072" />
<figcaption>HTML5 for Web Authors (on w3.org)</figcaption>
</figure>

<p>I recommend this for JavaScripters, as it includes more API information than HTML5 for Web Developers. Currently it’s not as up-to-date as HTML5 for Web Developers, but I expect it to receive some love in the future.</p>
</section><!-- /#html5-for-web-authors -->

<section id="html5-for-web-developers">
<h4><a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers">HTML5 for Web Developers</a></h4>

<p>HTML5 for Web Developers also removes the implementation details intended for browser makers, but includes some parts like microdata that have been cut from <abbr>W3C</abbr>’s HTML5 spec. I’m very impressed with the functionality and design, and I expect it to keep improving.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/html5-for-web-devs-33.png" alt="HTML5 for Web Developers screenshot" width="368" height="282" class="aligncenter size-full wp-image-3074" />
<figcaption>HTML5 for Web Developers (on whatwg.org)</figcaption>
</figure>

<p>I recommend this for anyone wanting a beautiful, readable version of HTML5. With local storage, it’s also perfect for adding to an iPad home screen. As <a href="https://github.com/benschwarz/developers.whatwg.org">it’s on GitHub</a>, it’s also the only spec where <em>you</em> can easily contribute to the design and functionality.</p>
</section><!-- /#html5-for-web-developers -->

<p>There’s a bunch of other related Editor’s drafts linked to in the <a href="http://www.w3.org/html/wg/" title="W3C HTML Working Group">HTML Working Group sidebar</a> which may interest you. Lachlan Hunt’s <a href="http://dev.w3.org/html5/html-author/" title="HTML 5 Reference">HTML 5 Reference</a> — a learning rather than reference-focused version of the HTML5 spec — is unfortunately currently out-of-date and on ice, so I don’t recommend it.</p>
</section><!-- /#author-versions -->

<section id="summary">
<h3>In Summary</h3>

<p>I think these specs all have their place. Personally I’ve been mainly using the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/" title="HTML Standard">HTML — Living Standard</a> version, but expect to use <a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers">HTML5 for Web Developers</a> a lot now too. The differences between these different versions of HTML5 (except for <a href="http://dev.w3.org/html5/markup/" title="HTML5: The Markup Language Reference">H:TML</a>) can be broken down into two groups: the extra modules they include, and whether they include the option to show/hide implementor details — the HTML5 and HTML specs both do.</p>

<p>One fear <a href="http://html5doctor.com/html5-living-standard/" title="HTML as a Living Standard — For and Against | HTML5 Doctor">John Foliot expressed</a> is that you might accidentally end up using something that was highly likely to change. The <abbr>WHATWG</abbr> HTML and Web Applications specs, however, have annotations indicating the status of each item in the margin.</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/annotations.png" alt="WHATWG annotations widget screenshot" width="500" height="200" class="aligncenter size-full wp-image-3070" />
<figcaption>An example of the <a href="http://www.whatwg.org/specs/web-apps/current-work/status-documentation.html" title="Specification annotation system documentation"><abbr>WHATWG</abbr>’s annotation notes</a></figcaption>
</figure>

<p>Handy!</p>
</section><!-- /#summary -->

<section id="addendum">
<h3>Addendum — a call to arms</h3>

<p>More generally, Ben also recently wrote an article encouraging everyone to <a href="http://germanforblack.com/articles/taking-the-web-back" title="Taking the web back
— an article by Ben Schwarz">get involved in the web standards process</a>. <abbr>WHATWG</abbr> and <abbr>W3C</abbr> are actively seeking feedback and suggestions regarding their work (as is Ben), and you can <a href="http://wiki.whatwg.org/wiki/What_you_can_do" title="What you can do - WHATWG Wiki">participate in various ways</a>:</p>

<ul>
<li>Read the spec and send comments via the <a href="http://lists.w3.org/Archives/Public/public-html/" title="public-html@w3.org Mail Archives">HTML WG</a> and/or <a href="http://www.whatwg.org/mailing-list" title="Web Hypertext Application Technology Working Group Mailing List"><abbr>WHATWG</abbr> mailing lists</a></li>
<li>Contribute feedback directly on the HTML5 and HTML — Living Standard specs via the feedback widget</li>
<li>Contribute feedback via the <a href="http://www.w3.org/Bugs/Public/enter_bug.cgi" title="Log in to Bugzilla">W3 bug tracker</a> (you’ll need a free account)</li>
<li>Join the HTML WG as a (self-)invited expert</li>
<li>Join the <a href="http://wiki.whatwg.org/wiki/IRC" title="IRC - WHATWG Wiki"><abbr>WHATWG</abbr> <abbr>IRC</abbr> chat room</a> or <a href="http://forums.whatwg.org/" title="WHATWG HTML Forums :: Index">forum</a></li>
<li>Use recently implemented features in personal sites and give feedback</li>
<li>Write about your experiences using new features</li>
<li>Make demos to show new features (or, for the truly gifted, JavaScript mockups of proposed features)</li>
<li>Or, you know, just <a href="http://developers.whatwg.org/" title="HTML5 &mdash; Edition for Web Developers"><em>create a whole new way to view the spec</em></a></li>
</ul>

<p>Here at <a href="http://html5doctor.com/" title="HTML5 Doctor, helping you implement HTML5 today">HTML5 Doctor</a>, we’re doing our bit. I really hope you’re inspired by the backstory of HTML5 for Web Developers and see how low the barrier of entry is — inspired into <em>action!</em> We can (and should) all contribute to the future of the web.</p>

</section><!-- /#addendum -->

<p>I’ll leave the last words to Ben himself, who, a day after launching, said:</p>

<blockquote>
<p>I'm thrilled to have it out, see good community support, and I hope that it becomes a reference for people to use every day</p>
<footer>— Ben Schwarz</footer>
</blockquote>
<div id="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/html5-living-standard/" rel="bookmark" class="crp_title">HTML as a Living Standard — For and Against</a></li><li><a href="http://html5doctor.com/two-cheers-for-the-w3cs-html5-logo/" rel="bookmark" class="crp_title">Two cheers for the W3C&#8217;s HTML5 logo</a></li><li><a href="http://html5doctor.com/time-and-data-element/" rel="bookmark" class="crp_title">Goodbye time, datetime, and pubdate. Hello data and value.</a></li><li><a href="http://html5doctor.com/html5-briefing-notes-journalists-analysts/" rel="bookmark" class="crp_title">HTML5: briefing notes for journalists and analysts</a></li><li><a href="http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/" rel="bookmark" class="crp_title">HTML5 Simplequiz 6: Zeldman&#8217;s fat footer</a></li></ul></div><p><a href="http://html5doctor.com/html5-for-web-developers/" rel="bookmark">HTML5 for Web Developers</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 25, 2011.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-for-web-developers/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML as a Living Standard — For and Against</title>
		<link>http://html5doctor.com/html5-living-standard/</link>
		<comments>http://html5doctor.com/html5-living-standard/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 14:30:12 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=3000</guid>
		<description><![CDATA[<p>Recently Ian Hickson, editor of the HTML5 specification, announced that HTML is the new HTML5, meaning that the WHATWG will drop the numeral “5” and just call their spec “HTML”. Giant brains John Foliot and Bruce Lawson engage in an intellectual clash of the titans over whether or not you should care.</p>]]></description>
			<content:encoded><![CDATA[<p>People have already written a number of articles either <a href="http://www.zeldman.com/2011/01/27/html5-vs-html/">for</a> or <a href="http://www.infoworld.com/print/149585">against</a> dropping the version number on <abbr>HTML</abbr>. Here are two contrasting views about this news presented by Bruce Lawson, and John Foliot.</p>

<h2>The facts</h2>

<p>Ian Hickson, editor of the <abbr>HTML</abbr>5 specification, announced that <a href="http://blog.whatwg.org/html-is-the-new-html5"><abbr>HTML</abbr> is the new <abbr>HTML</abbr>5</a>, meaning that the <abbr>WHATWG</abbr> will drop the numeral "5" and just call their spec "<abbr>HTML</abbr>". <abbr>HTML</abbr> will be a "<a href="http://wiki.whatwg.org/wiki/FAQ#What_does_.22Living_Standard.22_mean.3F">living standard</a>", with a mixture of widely-implemented features like <code>&lt;canvas&gt;</code> or <code>&lt;video&gt;</code> and wildly experimental features like <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#devices"><code>&lt;device&gt;</code></a>. The W3C produces a spec called "<abbr>HTML</abbr>5". Ian Hickson (currently) edits both of them. They are different. The W3C creates a version of this technology which is under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">W3C Royalty Free Patent Policy</a> to give a better guarantee for developers against patents. This specification has the version number 5. (There's an interesting conversation to be had about the <abbr>WHATWG</abbr>, patent policy, and licensing, but that's not for today.)</p>

<h2>TL;DR: nothing much changes (by Bruce Lawson)</h2>
<p>So what does this mean? What changes for us developers? In practice: very little for most of us. Browsers process what they can process regardless of what mode they're in, what "version" of <abbr>HTML</abbr> is current, or what a document's DOCTYPE claims.</p>

<p>Take for example a document containing a <code>&lt;video&gt;</code> element, using WebM, Ogg, and MP4 <code>&lt;source&gt;</code> elements, with scripted controls using the <a href="http://dev.w3.org/html5/spec/video.html#media-elements">media elements <abbr>API</abbr></a>, <a href="http://dev.w3.org/html5/spec/number-state.html#range-state"><code>input type=range</code></a>, and CSS3 opacity and transitions. With an <abbr>HTML</abbr>2 (yes, <abbr>HTML</abbr><strong>2</strong>!) DOCTYPE, it's a fine example of <a href="http://people.opera.com/brucel/articles/html5dr-html2-video.html"><abbr>HTML</abbr>2 video</a>.</p>

<p>If you're using a modern browser, everything will work fine. Your browser knows how to show those <abbr>HTML</abbr>5 goodies, so it does, regardless of what the DOCTYPE claims. What would be the point of a browser looking up what elements are part of <abbr>HTML</abbr>2 and refusing to show the video since <code>&lt;video&gt;</code> isn't part of that list? Such switching logic would take longer to process, delaying rendering for no practical benefit at all.</p>

<p>The only function of a DOCTYPE is to keep the browser out of <a href="http://en.wikipedia.org/wiki/Quirks_mode">Quirks Mode</a>. The <abbr>HTML</abbr>5 DOCTYPE <code>&lt;!DOCTYPE HTML&gt;</code> is the shortest string that does this reliably. And note that there's no version number on that.</p>

<p>If version-less <abbr>HTML</abbr> surprises you, it shouldn't. It's what <abbr>CSS</abbr> has used all along. We happily use some <abbr>CSS</abbr> 3 modules without vendor prefixes (<code>border-radius</code>, for example) while we avoid some <abbr>CSS</abbr> 2 features because they have no support. So the version number has no practical use and we don't sweat it at all.</p>

<p>Here's an extract from a <a href="http://xhtml.com/en/css/conversation-with-css-3-team/">2008 interview by xhtml.com with Bert Bos</a>, who co-created <abbr>CSS</abbr> with Håkon Wium Lie (one of the <a href="http://www.whatwg.org/charter">core <abbr>WHATWG</abbr> members</a>):</p>

<blockquote>
  <p><b>xhtml.com:</b> I suspect many people haven't noticed that <abbr>CSS</abbr> has no version identifier&hellip;.What drove the original decision not to include a version identifier and how has this affected the evolution of the <abbr>CSS</abbr> spec?</p>
</blockquote>

<blockquote>
  <p><b>Bos:</b> The working group has recognized since a long time that version numbers for document formats (as opposed to software) are a fallacy. <abbr>HTML</abbr> has version numbers (inside the DOCTYPE), but implementations either ignore them or use them for something else ("quirksmode").</p>

  <p>Formats may evolve and be extended, as <abbr>HTML</abbr> and <abbr>CSS</abbr> are, but implementations won't provide different parsers for the different versions. They only implement the current version. The new version better be backwards compatible, or disaster will ensue. You might think that putting in a version number will cause old implementations to refuse documents that are too new, but it doesn't. None of the browsers written in the days of <abbr>HTML</abbr>2 will refuse to handle an <abbr>HTML</abbr>4 DOCTYPE. And none of the current <abbr>HTML</abbr>4 browsers will refuse an <abbr>HTML</abbr>5 document once <abbr>HTML</abbr>5 becomes a standard. No browser wants to admit it can't understand something and users don't want to use new features if that causes the whole file to fail.</p>

  <p>The basic problem is that old and new software and old and new content have to coexist. It isn't possible to pick a day and switch all content and all software in the world over to the new version. And on the Web, some software, and especially some content, have very long life spans.</p>
</blockquote>

<p>Sounds familiar, doesn't it? </p>

<p>(It's not the whole story. As I've mentioned above, all browsers use DOCTYPE to switch between parsing modes. <a href="http://www.quirksmode.org/css/quirksmode.html">Quirks mode</a> is triggered by a line in the <abbr>HTML</abbr>, but it doesn't alter <abbr>HTML</abbr> parsing — it switches <abbr>CSS</abbr> parsing between <abbr>IE</abbr>5's broken box model or the W3C box model. Internet Explorer also has its <a href="http://blogs.msdn.com/b/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx">compatibility mode</a> which allows <abbr>IE</abbr> to mimic old, buggy versions. Note that these are switches to trigger buggy implementations; they are <em>not</em> switches between implementations of different versions of <abbr>CSS</abbr> or <abbr>HTML</abbr>. I may be splitting semantic hairs here.)</p>

<p>So <abbr>HTML</abbr> versioning will be the same as <abbr>CSS</abbr> versioning. With <abbr>CSS</abbr>, as it's only styling and not content or functionality, it doesn't matter much if something fails silently. With <abbr>HTML</abbr>5, we don't have vendor prefixes like <abbr>CSS</abbr> does, but most (<a href="https://github.com/Modernizr/Modernizr/wiki/Undetectables">if not all</a>) new features can be feature-detected and <a href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills">poly-filled with JavaScript</a>. It might not be beautiful, but it's the way of the world, and version numbers won't change that.</p>

<p>Ultimately, the presence or absence of a version number is less important than the fact that we have a spec that extends <abbr>HTML</abbr> without breaking backwards compatibility. That's what I celebrate in my Geek Song <a href="http://www.brucelawson.co.uk/2011/living-standard/">Living Standard</a>.</p>

<h2>Versioning isn't for browsers. It's for authors. (By John Foliot)</h2>
<p>The main issue, as I see it, is that W3C Standards ("Recommendations" in their parlance) are not "snapshots". They're engravings, which implies a whole other level of stability and commitment. Engravings, for example, are used to print our paper currency.</p>

<p>The last standardized commit to <abbr>HTML</abbr> was over a decade ago with <abbr>HTML</abbr> 4.01 (Dec., 1999) (and/or the <abbr>XML</abbr> serialization of <abbr>XHTML</abbr> in January 2000, revised 1 August 2002), and <abbr>HTML</abbr>5 (the markup language), once finalized, will likely continue to be the benchmark a decade from now. While most would concede that <abbr>HTML</abbr> 4.01/<abbr>XHTML</abbr> 1.1 are somewhat dated today, you could (if you wanted) continue to build a site using <code>&lt;frames&gt;</code>, and it would work, and all user agents would know what to do with that code. Team members could work on that code in a shared environment, using different types of editing tools (including <abbr>WYSIWYG</abbr> tools). That work could span cultures and geographies as the specification has been translated into numerous world languages and teaching curricula. It is that kind of permanence and stability that comes with an actual Standard.</p>

<p>Just look at <code>&lt;hgroup&gt;</code>. Where are we with that today? Next week? April 2011? Who knows? (I sort of know. There's a bug filed, and it will likely be escalated to an actual issue in the Last Call process. <code>&lt;hgroup&gt;</code>'s future is under debate at this time, but with no firm timeline. The point is, you need to be on top of this stuff continuously, a task that many larger groups simply do not have the time or resources to do.) Then there is the accessibility of <code>&lt;canvas&gt;</code> and <code>&lt;video&gt;</code> — points I don't need to belabor, but issues that remain non-trivial today. Much of the current new "goodness" in the Draft <abbr>HTML</abbr>5 Specification has <a href="http://www.html5accessibility.com/">very little browser support</a>. Look at the lack of complete support for Web Forms or many of the other newly introduced elements. It's gotten so bad that some of the less-informed think that the solution today is that all of the browsers should just move to WebKit and the problems will be solved — a suggestion so far-removed from any kind of reality as to be laughable. The answer is not to move to one rendering engine for stability, but rather for all to agree on one firm specification that works across all browsers.</p>

<p>My larger objection is around perception of the spec: developers who think that just because it's spec'ed at <abbr>WHATWG</abbr> this week that it's good to go, bring it on, to heck with permanence and legacy! It's a continued "fix-it-in-the-mix" attitude far-removed from the real world of large corporations and government. In the contest to be cool and cutting-edge, some developers forget that there is a world of commerce and actual Just-Like-Mom users out there who think that the latest advancement of the internet is Farmville on their cell phone.</p>

<p>I think the recent release of Drupal 7 is a great example. After nearly three years of intense community collaboration by nearly a thousand contributors, the latest version of this high-profile Open Source <abbr>CMS</abbr> was launched simultaneously with numerous plug-in modules re-factored for this next-generation build. Standards conformance was a huge driver for this version (as was accessibility support), so this large group of developers required an extremely stable benchmark to work towards. They couldn't rely on spec that changes monthly. Nobody wants to go back and re-write code they shipped four months ago simply because the current Draft Specification has changed the way things are done. Thus, the bulk of Drupal 7 sites I've seen to date (including those with custom themes) proudly sport the following under the hood:</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"></code></pre>

<p><abbr>WHATWG</abbr> serves a useful function, no doubt. Like the Fashion Houses of Paris, New York and London, they create and explore and push the boundaries. But they also often remain far-removed from the world of <a href="http://www.clothingattesco.com/women/icat/catgwomens/">F&amp;F Clothing</a> at Tesco — Tesco by the way being an "<a href="http://www.londonfashionweek.co.uk/sponsors.aspx">Official Sponsor of London Fashion Week</a>". I truly believe that the web community needs to be reminded of this fact. An evolving spec serves the needs of browser vendors, but it is no friend to many commercial developers as it hurts larger entities who need to share authoring responsibilities.</p>

<p>Like that paper currency made from those engravings, I want to be sure I can take it to the bank.</p>

<h3>About John Foliot:</h3>
<p><a href="http://john.foliot.ca">John Foliot</a> is a Web Accessibility Specialist with over a decade of experience in that field. He manages the Online Accessibility Program at Stanford University, and is a co-chair of the W3C's <abbr>HTML</abbr>5 Accessibility Task Force, where he is focused on accessibility of the new media elements. When not ranting on the web about web accessibility and web standards, he enjoys riding his motorcycle, listening to and collecting Blues music, and sampling fine Single Malts with fellow geek friends. You can follow him on twitter at <a href="http://www.twitter.com/johnfoliot">@johnfoliot</a>.</p>

<h2>In summary</h2>
<p>We've given two opposing views on this matter, and now we want to hear your thoughts. Are you for or against a living <abbr>HTML</abbr> standard?</p>
<div id="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/html5-for-web-developers/" rel="bookmark" class="crp_title">HTML5 for Web Developers</a></li><li><a href="http://html5doctor.com/absent-elements-and-validation/" rel="bookmark" class="crp_title">Absent Elements and Validation</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/html5-briefing-notes-journalists-analysts/" rel="bookmark" class="crp_title">HTML5: briefing notes for journalists and analysts</a></li><li><a href="http://html5doctor.com/your-questions-13/" rel="bookmark" class="crp_title">Your Questions #13</a></li></ul></div><p><a href="http://html5doctor.com/html5-living-standard/" rel="bookmark">HTML as a Living Standard — For and Against</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 8, 2011.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-living-standard/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>Hello, summary and figcaption elements</title>
		<link>http://html5doctor.com/summary-figcaption-element/</link>
		<comments>http://html5doctor.com/summary-figcaption-element/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 10:42:38 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[details]]></category>
		<category><![CDATA[figcaption]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[summary]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1343</guid>
		<description><![CDATA[The details and figure elements are saved from the crazed pecadillos of legend, dd/ dt and caption by these two freshly-minted elements, sent from Hickson over the weekend.]]></description>
			<content:encoded><![CDATA[<p>This weekend saw the minting of not one but two new elements. The <code>summary</code> element (<strong>not</strong> the <code>summary</code> <em>attribute</em> on the <code>table</code> element) goes inside the <code>details</code> element:</p>
<pre><code>&lt;details&gt;
&lt;summary&gt;More information&lt;/summary&gt;
&lt;p&gt;Here is the source data that is discussed in the article ... &lt;/p&gt;
&lt;/details&gt;</code></pre>
<p>This is designed to produce an &#8220;expando&#8221; box that is closed by default (but can be open by default using the boolean <code>open</code> attribute), only displaying the text specified by the <code>summary</code> as a control. Activating that control opens the whole <code>details</code> element; re-activating closes it again. If no <code>summary</code> text is present, the browser defaults to the rubric &#8220;details&#8221;. (Added 4 Feb 10:) In browsers that support <code>details</code>, this behaviour does not depend on author scripting, and should work even if JavaScript is disabled or not present.</p>
<p><code>figcaption</code> lives inside the <code>figure</code>:</p>
<pre><code>&lt;figure&gt;
&lt;img ... &gt; (or <code>video</code>, <code>table</code> etc)
&lt;figcaption&gt;A rabid unicorn goring a fairy.&lt;/figcaption&gt;
&lt;/figure&gt;</code></pre>
<p>If you want some history, continue reading. Otherwise, bye bye!</p>
<p>Previously, the <code>legend</code> element was specified to do the job of both. Unfortunately, <a href="/legend-not-such-a-legend-anymore/">every browser had parsing problems</a> re-using it outside forms. Similar problems were encountered attempting to re-use the <code>caption</code> element outside tables. At Jeremy Keith&#8217;s  suggestion, the spec then re-used <code>dd</code> and <code>dt</code>, but <a href="http://html5doctor.com/dd-details-wrong-again/">that breaks too</a>.</p>
<p>Now, two new elements are minted. (I quite fancied one new element &#8211; <code>rubric</code> for both, but it&#8217;s a pretty esoteric word.)</p>
<p>One of the objections to <code>details</code>, as described by Shelley Powers in <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8379">her bug to remove it</a> is</p>
<blockquote><p>the use of JavaScript for the purpose of expanding or collapsing a section is both well-defined and common among web applications. More importantly, following the concept of progressive enhancement, these types of expanding sections are expanded by default if script is turned off. To have a section that is dynamic but not controlled by script is going to cause confusion, particularly among people who turn scripting off and are assuming that there are no &#8220;expando&#8221; sections in the web page.</p>
<p>In fact, I don&#8217;t see how this element will make developing web applications that much simpler. This type of functionality is trivial with JS.</p>
</blockquote>
<p>My counter-argument was that an expanding/ collapsing area on the page is a very common requirement. I&#8217;ve seen sites pull in a whole JavaScript library just to accomplish this (presumably as the developer was unfamiliar with JS), which bloats the page size for the user. I&#8217;ve seen pages where the &#8220;details&#8221; information is set to <code>display:none</code> by default, and the user cannot expand the information without JS, thereby making the contents inaccessible if JS is not present.</p>
<p>Reinstating this element would be advantageous to developers, who wouldn&#8217;t need to learn JS to accomplish a common task; advantageous to users who would get an accessibility bonus from having this behaviour natively in the browser.</p>
<p>While I like to think that the irrefutable logic of my argument, coupled with the tear-jerking rhetorical flourishes in  my prose captured both the heart and the head of the editor, I suspect what persuaded him was Apple&#8217;s Maciej Stachowiak saying that &#8220;the webkit community&#8221; were interested in implementing <code>details</code> once the spec was nailed down. Implementation wins the day.
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<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-details-and-summary-elements/" rel="bookmark" class="crp_title">The details and summary elements</a></li>
<li><a href="http://html5doctor.com/dd-details-wrong-again/" rel="bookmark" class="crp_title">dd-details wrong again</a></li>
<li><a href="http://html5doctor.com/speaking/" rel="bookmark" class="crp_title">HTML5 Doctor Speaking and Training Appearances</a></li>
<li><a href="http://html5doctor.com/html-5-reset-stylesheet/" rel="bookmark" class="crp_title">HTML5 Reset Stylesheet</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/summary-figcaption-element/" rel="bookmark">Hello, summary and figcaption elements</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 1, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/summary-figcaption-element/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>The Footer Element Update</title>
		<link>http://html5doctor.com/the-footer-element-update/</link>
		<comments>http://html5doctor.com/the-footer-element-update/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 13:00:30 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[HTML 5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=895</guid>
		<description><![CDATA[When I wrote the previous version of this article a few months ago, I knew, as I'm sure many of you also knew, that this element in particular would be subject to change as the <abbr>HTML</abbr>5 spec neared it's completion. The problem was simple, the <code>footer</code> element just didn't feel &#39;complete&#39;, it just didn't offer the same flexibility as other elements. Now that's changed.]]></description>
			<content:encoded><![CDATA[<h2>Update</h2>
<p>When I wrote the previous version of this article a few months ago, I knew, as I&#8217;m sure many of you also knew, that this element in particular would be subject to change as the <abbr>HTML</abbr> 5 spec neared it&#8217;s completion. The problem was simple, the <code>footer</code> element just didn&#8217;t feel &#39;complete&#39;, it just didn&#8217;t offer the same flexibility as other elements. <a href="http://html5.org/tools/web-apps-tracker?from=3750&#038;to=3751">Now that&#8217;s changed</a>.</p>
<p>In summary, the content model for the <code>footer</code> element has been changed to allow sectioning content like <code>header</code> or like <code>nav</code>. In fact it now works in very much the same way as the <a href="/the-header-element/"><code>header</code> element</a>. However, it&#8217;s important to note that <code>footer</code> <em>isn&#8217;t</em> sectioning content and <em>doesn&#8217;t</em> introduce a new section.</p>
<p>If you&#8217;ve been working on a site and have incorporated a wonderful new footer with everything that it now allows please feel free to post a link in the comments to show other readers just what you can get away with.</p>
<p>Below is an updated copy of the original article.</p>
<h2>Old Article</h2>
<p>For some time now we&#8217;ve become accustomed to seeing <code>&lt;div id="footer"&gt;</code> at the bottom of web pages but with the introduction of <abbr title="Hypertext Mark-up Language">HTML</abbr> 5 it&#8217;s time to say goodbye. With the addition of the new <code>&lt;footer&gt;</code> element we now have more scope and flexibility.</p>
<h2>According to the spec</h2>
<blockquote><p>The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.
</p></blockquote>
<h2>Lets get started</h2>
<p>Before we get stuck into dissecting the new element, let&#8217;s lay the foundations for the article and cover the basics. As we&#8217;ve already mentioned above, most people would have laid out the footer as follows</p>
<pre><code>&lt;div id="footer"&gt;
  &lt;ul&gt;
     &lt;li&gt;copyright&lt;/li&gt;
     &lt;li&gt;sitemap&lt;/li&gt;
     &lt;li&gt;contact&lt;/li&gt;
     &lt;li&gt;to top&lt;/li&gt;
  &lt;/ul&gt;
&lt;div&gt;
</code></pre>
<p>However with the creation of <abbr title="Hypertext Mark-up Language">HTML</abbr>5 this is no longer the case. As you may already know, there is now no longer the need for the<code> &lt;div&gt;</code> element for many elements. In our case, when referring to the footer, the appropriate markup would be <code>&lt;footer&gt;</code><a id="footer"></a></p>
<pre><code>&lt;footer&gt;
  &lt;ul&gt;
     &lt;li&gt;copyright&lt;/li&gt;
     &lt;li&gt;sitemap&lt;/li&gt;
     &lt;li&gt;contact&lt;/li&gt;
     &lt;li&gt;to top&lt;/li&gt;
  &lt;/ul&gt;
&lt;/footer&gt;
</code></pre>
<p>As I mentioned in the first paragraph, originally the <code>&lt;footer&gt;</code> element was only utilised once within our pages but with the introduction of the new element, this no longer needs to be the case. The <code>&lt;footer&gt;</code> element can now be used multiple times and to display all the extra information.</p>
<h2>Using the footer element</h2>
<p>An important point to note is that you are not restricted to use one <code>&lt;footer&gt;</code> element per site, you can use multiple footers, each of which will then become the <code>&lt;footer&gt;</code> for that section of the document. You could therefore have a <code>&lt;footer&gt;</code> for a <code>&lt;section&gt;</code> or an <code>&lt;article&gt;</code>.</p>
<h3>Section</h3>
<pre><code>&lt;section&gt;
   Section content appears here.
   &lt;footer&gt;
   Footer information for section.
   &lt;/footer&gt;
&lt;/section&gt;
</code></pre>
<h3>Article</h3>
<pre><code>&lt;article&gt;
   Article content appears here.
   &lt;footer&gt;
   Footer information for article.
   &lt;/footer&gt;
&lt;/article&gt;
</code></pre>
<p>To see an example of the <code>&lt;footer&gt;</code> within an article/section look no further than this very page. Scroll down beyond the article and you will notice the light grey text section, which falls directly after the &#8220;further reading&#8221;. This grey text section which gives information about trackbacks, responses, tags and categories is infact using the footer element. </p>
<h3>Footer</h3>
<p>We&#8217;ve already outlined what the new footer can look like <a href="#footer">above</a>.</p>
<h2>Other Thoughts</h2>
<blockquote cite="http://www.brucelawson.co.uk/2009/marking-up-a-blog-with-html-5-part-2/"><p>I was initially thrown off-course by the presentational name of the element; my use here isn’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’s information about its section, containing author name, links to related documents (comments) and the like. There’s no reason that you can’t have more than one footer on page; the spec’s description says &#8220;the footer element represents a footer for the section it applies to&#8221; and a page may have any number of sections. The spec also says &#8220;Footers don’t necessarily have to appear at the end of a section, though they usually do.&#8221;</p></blockquote>
<p>Bruce Lawson &#8211; <a href="http://www.brucelawson.co.uk/2009/marking-up-a-blog-with-html-5-part-2/">http://www.brucelawson.co.uk/2009/marking-up-a-blog-with-html-5-part-2/</a></p>
<h2>Conclusion</h2>
<p>The footer element offers the chance to define web pages giving them the correct semantic mark-up that they deserve but it&#8217;s vital to use these new found tags as they were intended for. Let&#8217;s not get carried away and misuse this tag like we have done with tables and divs.</p>
<h2>Futher reading</h2>
<ul>
<li><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-footer-element" rel="nofollow">http://www.whatwg.org/specs/web-apps/current-work/#the-footer-element</a></li>
</ul>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/the-footer-element/" rel="bookmark" class="crp_title">The footer element</a></li>
<li><a href="http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/" rel="bookmark" class="crp_title">HTML5 Simplequiz 6: Zeldman&#8217;s fat footer</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/september-html5-spec-changes/" rel="bookmark" class="crp_title">September HTML5 spec changes</a></li>
<li><a href="http://html5doctor.com/avoiding-common-html5-mistakes/" rel="bookmark" class="crp_title">Avoiding common HTML5 mistakes</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/the-footer-element-update/" rel="bookmark">The Footer Element Update</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on September 29, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-footer-element-update/feed/</wfw:commentRss>
		<slash:comments>32</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 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. Clarification over section and article The spec has been clarified to help authors correctly choose between when to use section and when [...]]]></description>
			<content:encoded><![CDATA[<p>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 class="related"><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/dd-details-wrong-again/" rel="bookmark" class="crp_title">dd-details wrong again</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><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>
	</channel>
</rss>

