<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>HTML5 Doctor</title>
	
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Fri, 10 May 2013 08:58:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/html5doctor" /><feedburner:info uri="html5doctor" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>html5doctor</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>How to mark up subheadings, subtitles, alternative titles and taglines</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/KJwiO0lDES4/</link>
		<comments>http://html5doctor.com/howto-subheadings/#comments</comments>
		<pubDate>Fri, 03 May 2013 12:35:11 +0000</pubDate>
		<dc:creator>Steve Faulkner</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=5067</guid>
		<description><![CDATA[If you don&#8217;t already know, the hgroup element is obsolete in HTML5. Advice is now provided in the HTML spec on how to mark up subheadings, subtitles, alternative titles and taglines using existing and implemented HTML features. Advice for marking up subheadings and the like The important question for developers is: How do I mark [...]]]></description>
				<content:encoded><![CDATA[<p>If you don&#8217;t already know, the <code>hgroup</code> element is <a href="#obsolete">obsolete</a> in <a href="http://www.w3.org/html/wg/drafts/html/master/Overview.html">HTML5</a>.</p>
<p>Advice is now provided in the <a href="http://www.w3.org/html/wg/drafts/html/master/common-idioms.html#sub-head">HTML spec</a> on how to mark up subheadings, subtitles, alternative titles and taglines using existing and <em>implemented</em> HTML features.<br />
<span id="more-5067"></span></p>
<h2>Advice for marking up subheadings and the like</h2>
<p>The important question for developers is: <strong>How do I mark up these buggers???</strong></p>
<p>To answer this advice has been <a href="http://www.w3.org/html/wg/drafts/html/master/common-idioms.html#sub-head">added</a> to the HTML specification on how to mark up subheadings, subtitles, alternative titles and taglines:</p>
<blockquote><p><strong>Note:</strong> Do not use <code><a href="http://www.w3.org/html/wg/drafts/html/master/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements">h1</a></code>–<code><a href="http://www.w3.org/html/wg/drafts/html/master/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements">h6</a></code> elements to markup subheadings, subtitles, alternative titles and taglines unless they are intended to be the heading for a new section or subsection.</p></blockquote>
<p class="callout"><strong>Note:</strong> Example below added 10/5/2013</p>
<blockquote><p>In the following example the title and subtitles of a web page are grouped using a <code><a href="http://www.w3.org/html/wg/drafts/html/master/sections.html#the-header-element">header</a></code> element. As the author does not want the subtitles to be included the table of contents and they are not intended to signify the start of a new section, they are marked up using <code><a href="http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-p-element">p</a></code> elements. A sample CSS styled rendering of the title and subtitles is provided below the code example.</p>
<pre>   &lt;header&gt;
   &lt;h1&gt;HTML 5.1 Nightly&lt;/h1&gt;
   &lt;p&gt;A vocabulary and associated APIs for HTML and XHTML&lt;/p&gt;
   &lt;p&gt;Editor's Draft 9 May 2013&lt;/p&gt;
   &lt;/header&gt;</pre>
<p><img alt="Title:'HTML 5.1 Nightly' in a mid blue Sans Serif font.     Subtitle 1:'A vocabulary and associated APIs for HTML and XHTML' on a new line, same style smaller font size.     Subtitle 2:'Editor's Draft 9 May 2013' on a new line, same style and size as subtitle 1." src="http://www.w3.org/html/wg/drafts/html/master/images/htmlheading.png" /></p></blockquote>
<blockquote><p>In the following example the subtitle of a book is on the same line as the title separated by a colon.</p>
<pre>&lt;h1&gt;The Lord of the Rings: The Two Towers&lt;/h1&gt;</pre>
<p><img alt="Title and subtitle:'The Lord of the Rings: The Two Towers' in a gold coloured Gothic style Serif font on a black background." src="http://www.w3.org/html/wg/drafts/html/master/images/lotr.PNG" width="414" height="43" /></p></blockquote>
<blockquote><p>In the following example part of an album title is included in a <code>span</code> element, allowing it to be styled differently from the rest of the title.</p>
<pre>   &lt;h1&gt;The Mothers 
   &lt;span&gt;Fillmore East - June 1971&lt;/span&gt; 
   &lt;/h1&gt;</pre>
<p><img alt=" Line 1:'The Mothers' displayed in a bold stencil style font. Line 2:'Fillmore East - June 1971' displayed in a free flowing hand writing style font." src="http://www.w3.org/html/wg/drafts/html/master/images/heading.PNG" width="296" height="77" /></p></blockquote>
<blockquote><p>In the following example the title and tagline for a news article are grouped using a <code>header</code> element. The title is marked up using a <code>h2</code> element and the tagline is in a <code>p</code> element.</p>
<pre>   &lt;header&gt;
   &lt;h2&gt;3D films set for popularity slide &lt;/h2&gt;
   &lt;p&gt;First drop in 3D box office projected for this year despite hotly tipped summer blockbusters,
    according to Fitch Ratings report&lt;/p&gt;
   &lt;/header&gt;</pre>
<p><img alt=" Title:'3D films set for popularity slide' in a large, bold, dark blue Serif font style. Paragraph: 'First drop in 3D box office projected for this year despite...' in a smaller, dark grey, Sans Serif font style." src="http://www.w3.org/html/wg/drafts/html/master/images/title-tagline.PNG" width="454" height="74" /></p></blockquote>
<p class="callout warning-block"><strong>Note:</strong> Some have been <a href="https://github.com/twitter/bootstrap/issues/7482">advocating</a> of the use of the <code>small</code> element to signify subtitles. This has been under <a href="http://lists.w3.org/Archives/Public/public-html/2013Apr/thread.html#msg2">discussion</a> in the <a href="http://www.w3.org/html/wg/">HTML working group</a>, but no compelling arguments for its use have been made. Therefore it is not advised to use <code>small</code> to mark up subtitles.</p>
<h2>What about the document outline?</h2>
<p>If you want a subtitle to be displayed in the <em>semi-mythical </em><a href="http://www.w3.org/html/wg/drafts/html/master/sections.html#outlines">document outline</a>, include it along with the heading text as per example 1 and 2 above. If you don&#8217;t, put the text in a <code>p</code> element (for example), as per example 3 above.<strong><br />
</strong></p>
<h2>Questions for developers</h2>
<p>Does the advice in the spec cover the use cases you encounter? If not what other advice should the spec include? Are the examples clear and unambiguous? If not how could they be improved? Any other questions you have, ask away in the comments!</p>
<p>If you are really keen you can <a href="http://www.w3.org/html/wg/#join">join</a> the likes of Bruce Lawson, Ian Devlin and myself in the HTML working group and take part in discussion there.</p>
<h2 id="obsolete" tabindex="-1">What being <em>obsolete</em> in HTML5 means</h2>
<blockquote><p>must not be used by authors</p></blockquote>
<p><code>hgroup</code> like other <a href="http://www.w3.org/html/wg/drafts/html/CR/obsolete.html#non-conforming-features">obsolete features,</a>  is non-conforming. This means that a <a href="http://validator.w3.org/nu/">conformance checker</a>  displays an error  if the <code>hgroup</code> element is found. The following is the error message displayed by the <a href="http://validator.w3.org/">W3C Markup Validation Service</a>:</p>
<blockquote><p><strong>Error</strong>: The <code>hgroup</code> element is obsolete. To mark up subheadings, consider either just putting the subheading into a <code>p</code> element after the <code>h1</code>-<code>h6</code> element containing the main heading, or else putting the subheading directly within the <code>h1</code>-<code>h6</code> element containing the main heading, but separated from the main heading by punctuation and/or within, for example, a <code>span</code> element with differentiated styling. To group headings and subheadings, alternative titles, or taglines, consider using the <code>header</code> or <code>div</code> elements.</p></blockquote>
<p>Like for other <a href="http://www.w3.org/html/wg/drafts/html/master/obsolete.html#non-conforming-features">obsolete elements</a>, browsers will continue their current level of support for <code>hgroup</code>. That is, browsers that have parsing and user agent style support will continue to do so, therefore authors that have used <code>hgroup</code> in their pages do not need to rush out and remove it. The element effectively has no meaning as its semantics have not been implemented. It&#8217;s effectively a <code>div</code> with a funny name.</p>
<h2>The whys and wherefores</h2>
<p>Much has been discussed and written over the past few years on the <code>hgroup</code> element and whether it meets the high bar required to include as a feature in HTML, on balance it has been decided it does not. Should this have happened more quickly? Yes , but as <a href="http://people.w3.org/mike//">Mike[tm]Smith</a> <a href="http://www.w3.org/QA/2013/04/getting_agreements_is_hard_som.html">stated recently</a>:</p>
<blockquote><p>People disagree. Organizations disagree. The task of us all working together to try to overcome our disagreements is time-consuming, often very frustrating, and almost never easy.</p></blockquote>
<p>If you want to read up on the history of <code>hgroup</code> there is plenty of stuff available:</p>
<h3>HTML working group <a href="http://lists.w3.org/Archives/Public/public-html/">mail archives</a> 2010 (tip of the iceberg):</h3>
<ul>
<li><a href="http://lists.w3.org/Archives/Public/public-html/2010Nov/thread.html#msg396">suggestion for abolition of <code>hgroup</code> thread (November)</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-html/2010Nov/thread.html#msg325"><code>hgroup</code> and ARIA outline thread</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-html/2010Dec/thread.html#msg0">suggestion for abolition of <code>hgroup</code> thread (December)</a></li>
</ul>
<h3><em>Selected</em> articles on the subject:</h3>
<ul>
<li><a href="http://www.brucelawson.co.uk/2010/on-the-hgroup-element/">On the <code>hgroup</code> element</a></li>
<li><a href="http://www.brucelawson.co.uk/2013/farewell-hgroup/">Farewell, <code>hgroup</code></a></li>
<li><a href="http://www.webmonkey.com/2013/04/w3c-drops-hgroup-tag-from-html5-spec/">W3C Drops <code>hgroup</code> Tag From HTML5 Spec</a></li>
<li><a href="http://blog.paciellogroup.com/2012/04/html5-accessibility-chops-data-for-the-masses/">HTML5 Accessibility Chops: data for the masses</a></li>
<li><a href="http://html5doctor.com/the-hgroup-hokey-cokey/">The <code>hgroup</code> hokey cokey</a></li>
<li><a href="http://www.iandevlin.com/blog/2013/04/html5/hgroup-removed-from-the-html5-specification"><code>hgroup</code> removed from the HTML5 specification</a></li>
<li><a href="http://www.sitepoint.com/html5-hgroup-element-dropped/">RIP HTML5 <code>hgroup</code> Element</a></li>
</ul>
<div class="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/the-hgroup-hokey-cokey/" rel="bookmark" class="crp_title">The hgroup hokey cokey</a></li>
<li><a href="http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/" rel="bookmark" class="crp_title">Interview with Steve Faulkner: HTML5 editor and new doctor</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/avoiding-common-html5-mistakes/" rel="bookmark" class="crp_title">Avoiding common HTML5 mistakes</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/howto-subheadings/" rel="bookmark">How to mark up subheadings, subtitles, alternative titles and taglines</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 3, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/KJwiO0lDES4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/howto-subheadings/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		<feedburner:origLink>http://html5doctor.com/howto-subheadings/</feedburner:origLink></item>
		<item>
		<title>Interview with Steve Faulkner: HTML5 editor and new doctor</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/YPm1bUvxOqc/</link>
		<comments>http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 13:59:06 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[interviews]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=5039</guid>
		<description><![CDATA[Steve Faulkner &#8211; invariably prefixed by the honorific &#8220;The Mighty&#8221; by those who know him &#8211; is Australian living in London with his wife and two kids. He works for The Paciello Group, a well-known web accessibility consultancy, and is a co-editor of the HTML5 spec at W3C Today, we&#8217;re pleased to announce that he&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>Steve Faulkner &#8211; invariably prefixed by the honorific &#8220;The Mighty&#8221; by those who know him &#8211; is Australian living in London with his wife and two kids. He works for <a href="http://www.paciellogroup.com">The Paciello Group</a>, a well-known web accessibility consultancy, and is a co-editor of the HTML5 spec at W3C Today, we&#8217;re pleased to announce that he&#8217;s joining the HTML5 Doctor team, with special focus on accessibility and didgeridoo.</p>
<p>Bruce grills him mercilessly; some questions were contributed over Twitter and co-interrogators are acknowledged below.</p>
<figure><img class="aligncenter size-full" alt="" src="http://html5doctor.com/wp-content/uploads/2013/03/mighty-steve-faulkner.jpg" width="300" height="381" /><br />
<figcaption>The Mighty Steve Faulkner, and a UFO</figcaption>
</figure>
<dl>
<dt>What&#8217;s your connection with HTML5?</dt>
<dd>I’ve been participating in the <a href="http://www.w3.org/html/wg/">HTML Working Group</a> since 2007 after reading <a href="http://www.456bereastreet.com/archive/200705/help_keep_accessibility_and_semantics_in_html/">a post </a> by Roger Johansson. I have recently taken on the roles of <a href="http://www.w3.org/WAI/PF/HTML/wiki/Main_Page">HTML accessibility task force </a> chair and co-editor of the <a href="http://www.w3.org/html/wg/drafts/html/master/">HTML specification</a>. I also edit <a href="https://dvcs.w3.org/hg/aria-unofficial/raw-file/tip/index.html">Using ARIA in HTML</a>, <a href="http://dev.w3.org/html5/alt-techniques/">HTML5: Techniques for Providing Useful Text Alternatives</a> and <a href="http://dvcs.w3.org/hg/html-api-map/raw-file/tip/Overview.html">HTML to Platform Accessibility APIs Implementation Guide</a> I also <a href="http://blog.paciellogroup.com/">blog</a> on accessibility and web standards.</p>
</dd>
<dt>Some people call you &#8220;the accessibility guy&#8221;. What do you call yourself?</dt>
<dd>I have lots of ways to self identify these days. The most important is being a dad to Clara and Eloisa.</p>
</dd>
<dt>What&#8217;s your day job?</dt>
<dd>I work as an accessibility engineer/director/consultant/curmudgeon at <a href="http://www.paciellogroup.com">The Paciello Group</a>. On a typical day I may be writing code, testing a site or application, reviewing the work of colleagues, talking with clients, (tor)mentoring colleagues (can’t wait until <a href="http://twitter.com/patrick_h_lauke">Patrick Lauke</a> starts), working on the free testing tools we develop, editing the HTML spec or one of the other specs I edit, writing a blog post, filing bug reports on browsers or AT and as I work from home I try to squeeze in a kip (nap), while keeping an ear open for my boss Charlie pinging me on skype.</p>
</dd>
<dt>How did you get into the world of accessibility?</dt>
<dd>When I went back to Australia in 2001 after a 2 year stint as a HTML code cutter in London, I applied for a job at <a href="http://www.visionaustralia.org/">vision australia</a> which combined my technical and social work interests (in a previous life I studied psychology at Sydney Uni and then worked with people with disabilities).</p>
<p>The job at vision australia was (I thought) as developer on their web site, but on the first day my then boss Brian Hardy threw a copy of <a href="http://www.w3.org/WAI/intro/wcag">WCAG 1.0</a> at me and said &#8220;read this&#8221;, and it started from there.</p>
</dd>
<dt>What&#8217;s the difference between W3C HTML5 and WHATWG HTML Living Standard?</dt>
<dd>The W3C has  <a href="http://www.w3.org/TR/html5/">HTML5</a> CR (Candidate Recommendation) which is a <a href="http://www.w3.org/QA/2012/12/html5_smile_its_a_snapshot.html">snapshot</a> (also read <a href="http://html5doctor.com/interview-with-robin-berjon-html5-editor/">Robin’s interview </a> for more detail) and <a href="http://www.w3.org/html/wg/drafts/html/master/">HTML 5.1</a> which is akin to the WHATWG spec in that it is up to date and includes new/unstable feature proposals. HTML 5.1 takes up most commits from the WHATWG spec unless there is disagreement in the HTML WG about a change.</p>
<p>HTML 5.1 is also modularised, meaning some features are developed as extension specifications within the “HTML5 family of specifications” This is the case for features such as <a href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/">HTML Canvas 2d context</a> and some controversial new features (the <a href="http://www.w3.org/TR/html-picture-element/">&lt;picture&gt; element</a> and <a href="http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/">srcset attribute</a> being examples).</p>
<p>Once one or both new feature proposals get implemented they may well be moved into the core HTML spec. Another example is the <a href="http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-main-element">&lt;main&gt; element</a>. It started life as an an extension spec, but was pretty quickly integrated into HTML 5.1 as implementations occurred. It should be noted that the &lt;main&gt; element should be included in the HTML5 CR spec before it becomes irrevocably frozen, as it already meets the criteria of two interoperable implementations. It should also be noted that the text of HTML5 CR is not yet untouchable. It is still updated with bug fixes and I have a queue of <a href="https://github.com/stevefaulkner?tab=activity">changes</a> to feature definitions, currently in HTML 5.1, to commit. More details about how the HTML recommendation process works can be found in: <a href="http://dev.w3.org/html5/decision-policy/html5-2014-plan.html">Plan 2014</a>.</p>
</dd>
<dt>Which mailing list should I be subscribed to for W3C HTML? (Steve Fenton)</dt>
<dd>I recommend you <a href="http://blog.paciellogroup.com/2011/12/how-you-can-join-the-w3c-html5-working-group-in-4-easy-steps/">join the HTML WG</a> &#8211; anybody can. When you join, you are subscribed to a number of lists; the two to watch and contribute to are <a href="http://lists.w3.org/Archives/Public/public-html/">Public-HTML </a> for technical discussion and <a href="http://lists.w3.org/Archives/Public/public-html-admin/">Public-HTML-admin</a> for process/admin stuff related to technical discussion.</p>
</dd>
<dt>How do you get a new element/ feature added to HTML? (Dr Rich Clark)</dt>
<dd>Lots of hard work, research, data gathering, use cases, discussion, haggling, etc. To get a feature added to HTML that involves implementation in browsers (i.e. vast majority) you need to get implementers to interested.</p>
<p>What I did for the &lt;main&gt; element was talk to as many implementers (both general browser implementers and accessibility implementers), developers, authors and users as I could and got advice and input from them. I went where the various people hung out; on IRC, mailing lists, twitter, blogs, conferences &#8211; anywhere.</p>
<p>Robin Berjon has written a useful <a href="http://www.w3.org/html/wg/wiki/ExtensionHowTo">HowTo</a> on extension specifications which is a route you can use at the W3C (I used it for &lt;main&gt;). The WHATWG also <a href="http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_adding_new_features_to_a_specification.3F">provide info</a> on how to do it via their process.</p>
</dd>
<dt>What drives you to push proposals through in the face of stiff opposition? (Steve Fenton)</dt>
<dd>A passion for pain mostly :-) also a desire to improve the web.</p>
</dd>
<dt>Do you plan to work on getting your changes upstreamed to the WHATWG spec? Do you coordinate with the upstream? (Henri Sivonen)</dt>
<dd>The way it currently works is that the WHATWG spec is a (major) source for the HTML 5.1 spec. We cherry-pick commits to the WHATWG spec to add to the HTML spec. Uncontroversial changes such as bug fixes, editorial tweaks, new features proposals that the HTML WG members have no issue with, get added on a weekly basis. We also do our own commits to the spec, for example I make improvements to the authoring advice and requirements and accessibility implementation stuff after discussions on the HTML list or in response to <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=HTML%20WG&amp;component=HTML5%20spec&amp;resolution=---&amp;list_id=6207">bug reports</a>.</p>
<p>Co-ordination is a thorny issue the WHATWG is an important contributor to HTML and I have have reached out, but with limited success so far. Its safe to say that like HTML, the relationship between the WHATWG and the W3C is a work in progress.</p>
<p>I think the most important thing is that the HTML 5.1 spec reflects implementations and that includes advice and requirements on how authors should use HTML as implemented, to maximise the benefit to users.</p>
</dd>
<dt>Are you worried about WHATWG/ W3C specs diverging?</dt>
<dd>I used to worry a lot more about this. Implementation stuff is not diverging, authoring advice and requirements and advice are diverging as improvements are made to HTML 5.1. Ideally the WHATWG spec and the HTML 5.1 spec would not contain contrary advice, but I don’t think the threat of divergence, should stop us from making improvements to HTML that benefit authors and users. Its better to have the improvements out there for people to make use of rather than have two specs that agree, both of which contain advice fictions based not on implementation reality but on future possibilities.</p>
<p>Rephrasing from <a href="http://wiki.whatwg.org/wiki/FAQ#Isn.27t_it_bad_that_the_specs_have_forked.3F">Isn&#8217;t it bad that the specs have forked?</a>:</p>
<p>“The plan is to just do a better job with the HTML 5.1 spec, such that it becomes the logical and obvious choice for anyone wanting to figure out which spec they should use.”</p>
</dd>
<dt>What are the skills of a good editor?</dt>
<dd>Unsure about that, I don’t know. What I try to do is get as much feedback on stuff as possible, so I go out to where people are and badger them. I realise that I don’t know it all and therefore want to engage others to contribute their knowledge and am myself only an editor in a team contributing to the development of HTML. I also realise that HTML is a vast and complex specification and limit my editing to those areas that I feel knowledgeable and confident enough to contribute to (luckily I am part of a team).</p>
</dd>
<dt>Is the spec readable/ useful enough for authors?</dt>
<dd>I think the spec needs work to make the authoring advice contained in it more useful, usable and accurate. I am working on it. I have already committed changes to HTML 5.1 in response to feedback from authors, developers and users. I read a lot of articles and blogs picking up issues with the spec and discuss stuff with authors/developers who use the spec and book authors such as you who use it as source material. But really, it&#8217;s the users of the spec that decide if it&#8217;s readable/ useful enough, so I seek out and appreciate any feedback from them.</p>
</dd>
<dt>Why hasn&#8217;t the HTML5 outlining model really been implemented? (Marc Drummond)</dt>
<dd>My understanding is that the outline algorithm as currently defined is not intended to be implemented in browsers. Meanwhile it has sort of been implemented by the JAWS screen reader, but in a borked way. It is a proposed feature that  implementers in general have not shown an interest in. for this reason it is a feature <a href="http://www.w3.org/html/wg/wiki/HTML5.0AtRiskFeatures">at risk</a> in the HTML5 CR specification and will likely be dropped before it becomes a Recommendation, it will probably live on in HTML 5.1 as a proposed feature and we will see how it goes.</p>
</dd>
<dt><a href="/the-hgroup-element/">&lt;hgroup&gt;</a>: rubbish or not?</dt>
<dd>Good question! I think it&#8217;s a feature in search of a use case. The only use case cited for it is to <a href="http://wiki.whatwg.org/wiki/Rationale#hgroup_and_other_heading_elements">mask subheadings </a> from the unimplemented outline algorithm (see above). I don’t think it&#8217;s a good enough reason to add a new element to HTML. Also, its accessibility mappings are defined such that any content in it becomes one big heading. But it is there, so we have some choices: make it more useful by changing how it is defined and fixing the accessibility mappings, obsolete it and replace it with something that is more useful, obsolete it and replace it with advice on how to mark up subheadings using current features, or just leave as is&#8230;</p>
</dd>
<dt>Do you agree with <a href="http://www.webdesignerdepot.com/2013/01/the-harsh-truth-about-html5s-structural-semantics-part-1/">Luke Stevens</a> that the new structural elements miss the mark and we should just use &lt;div&gt;s with ARIA roles instead?</dt>
<dd>No. I think that there is improvement needed in how the elements are defined and how they are explained, but do not think that using divs and roles is the way forward. Some people imbue HTML structural features with magical properties that in reality are not present. What I try to do is look at how such features are used and work in practice, for users that actually consume the semantics and, where needed, modify the feature definitions to benefit users.</p>
</dd>
<dt>I asked Hixie <a href="/interview-with-ian-hickson-html-editor/">why most of his fights are with accessibility practitioners</a>. He said didn&#8217;t know. Have you got any ideas?</dt>
<dd>Hixie has strong opinions about how HTML should be defined; other people disagree with him. Conflict ensues at times. I believe the new development process for HTML at the W3C takes a lot of heat out of these disagreements providing a constructive environment for contributions from a wide range of stakeholders to the further development of the language of the web.</p>
</dd>
<dt>Now you&#8217;re an HTML5 doctor, what (apart from fame, glory and the adultation of beautiful people) do you hope to get from it and contribute?</dt>
<dd>Once I get over the shock and honour of being bestowed with a HTML5Doctorate, I hope to contribute by writing articles on the bits of HTML/ARIA I know best. I would also very much like to get as much input/feedback as possible from the good readers of HTML5Doctor and seek their collaboration in improving HTML 5.1.</p>
</dd>
<dt>The all-important grooming question: Blue Stratos or Old Spice?</dt>
<dd>I used to be a Blue Stratos kinda guy, but have switched to the far superior male fragrance <a href="http://www.youtube.com/watch?v=jtwh3nQP5Uo">Hai Karate</a> after your recommendation.</dd>
</dl>
<div class="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/howto-subheadings/" rel="bookmark" class="crp_title">How to mark up subheadings, subtitles, alternative titles and taglines</a></li>
<li><a href="http://html5doctor.com/interview-with-robin-berjon-html5-editor/" rel="bookmark" class="crp_title">Interview with Robin Berjon, HTML5 editor</a></li>
<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/2022-or-when-will-html-5-be-ready/" rel="bookmark" class="crp_title">2022, or when will HTML 5 be ready?</a></li>
<li><a href="http://html5doctor.com/interview-with-ian-hickson-html-editor/" rel="bookmark" class="crp_title">Interview with Ian Hickson, HTML editor</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/" rel="bookmark">Interview with Steve Faulkner: HTML5 editor and new doctor</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on March 19, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/YPm1bUvxOqc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/</feedburner:origLink></item>
		<item>
		<title>HTML5 forms input types</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/2U6D4cBTRq4/</link>
		<comments>http://html5doctor.com/html5-forms-input-types/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 14:00:01 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[range]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[tel]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[web forms 2.0]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4993</guid>
		<description><![CDATA[	<p>In the <a href="http://html5doctor.com/html5-forms-introduction-and-new-attributes/">first article in this series</a> we looked at the history of HTML5 forms and many of the new attributes available to us. In this second and final part of the series, we'll look at the new input types available in HTML5. As we'll see, these new features will go a long way toward making your life easier while delivering a delightful user experience. The best thing about all this? You can start using them now.</p>]]></description>
				<content:encoded><![CDATA[	<p>In the <a href="http://html5doctor.com/html5-forms-introduction-and-new-attributes/">first article in this series</a> we looked at the history of HTML5 forms and many of the new attributes available to us. In this second and final part of the series, we&#8217;ll look at the new input types available in HTML5. As we&#8217;ll see, these new features will go a long way toward making your life easier while delivering a delightful user experience. The best thing about all this? You can start using them now.</p>
	
	<div class="callout highlight-block">
		
		<p>This is article is an excerpt from Chapter 6 of <a href="http://thewebevolved.com/">Beginning HTML5 and CSS3: The Web Evolved</a> by Christopher Murphy, Oli Studholme, Richard Clark and Divya Manian, published by Apress.</p>
		
		<p>Note: As this article is a book excerpt, browser renderings of attributes and input types may have altered since the screenshots were taken. Additionally, browser support may have increased since publication so please refer to the links at the end of the article for the current state of browser support.</p>
		
	</div>
	
	<section id="input-types">
		<h2>New input types</h2>
		
		<p>HTML5 introduces no less than a baker&#8217;s dozen (yes, that&#8217;s 13!) new input types for forms. We&#8217;re going to take a brief look at each of them and explain why you should be using them right now. These new input types have dual benefits: using them means less development time and an improved user experience. The new input types we&#8217;ll be looking at are:</p>
		
		<ul class="columns">
			<li><a href="#input-search"><code>search</code></a></li>
			<li><a href="#input-email"><code>email</code></a></li>
			<li><a href="#input-url"><code>url</code></a></li>
			<li><a href="#input-tel"><code>tel</code></a></li>
			<li><a href="#input-number"><code>number</code></a></li>
			<li><a href="#input-range"><code>range</code></a></li>
			<li><a href="#input-date"><code>date</code></a></li>
			<li><a href="#input-month"><code>month</code></a></li>
			<li><a href="#input-week"><code>week</code></a></li>
			<li><a href="#input-time"><code>time</code></a></li>
			<li><a href="#input-datetime"><code>datetime</code></a></li>
			<li><a href="#input-datetime-local"><code>datetime-local</code></a></li>
			<li><a href="#input-color"><code>color</code></a></li>
		</ul>

		<section id="input-search">
			<h3>search</h3>
		
			<p>Search seems like an appropriate place to start our foray into HTML5 input types. When we talk about search, we&#8217;re not just talking about Google, Bing, or Yahoo. We&#8217;re talking about the search field on that e-commerce site you just made a purchase from, on Wikipedia, and even on your personal blog. It&#8217;s probably the most common action performed on the Web every day, yet it&#8217;s not marked up very semantically, is it? We all tend to write something like this:</p>

			<pre><code>&lt;input type="text" name="search"&gt;</code></pre>
			
			<p>Well, what if we could write something like &hellip;</p>

			<pre><code>&lt;input type="search" name="search"&gt;</code></pre>

			<p>With HTML5 we can. Feels much better, doesn&#8217;t it? Desktop browsers will render this in a similar way to a standard text field—until you start typing, that is. At this point, a small cross appears on the right side of the field. Notice the x in Figure 1. This lets you quickly clear the field, just like Safari&#8217;s built-in search field.</p>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-6.png" alt="Screenshot of a search input box in Safari for Windows with a value of html4.01 and an 'x' appearing in the right of the text box" />
				<figcaption>Figure 1. <code>type="search"</code> as displayed in Safari for Windows</figcaption>
			</figure>

			<p>On a mobile device, however, things start to get interesting. Take the example iPhone shown in Figure 2; when you focus on an input using <code>type="search"</code>, notice the keyboard, specifically the action button on the keyboard (bottom right). Did you spot that it says &#8220;Search&#8221; rather than the regular &#8220;Go&#8221;? It&#8217;s a subtle difference that most users won&#8217;t even notice, but those who do will afford themselves a wry smile.</p>

			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-7.png" alt="Screenshot of an iPhone with dynamic keyboard and the action button saying 'Search'" />
				<figcaption>Figure 2. <code>type="search"</code> on the iPhone</figcaption>
			</figure>
 
			<p>As you&#8217;ve seen with the new attributes, browsers that don&#8217;t understand them will simply degrade gracefully. The same applies to all of the new input types discussed here. If a browser doesn&#8217;t understand <code>type="search"</code>, it will default to <code>type="text"</code>. This means you&#8217;re not losing anything. In fact, you&#8217;re using progressive enhancement and helping users to have a better experience. Let&#8217;s face it: filling out web forms isn&#8217;t very fun, so anything you can add to ensure a smoother experience, the better.</p>

		</section>
		
		<section id="input-email">
			<h3>email</h3>
		
			<p>In rendering terms, the email input type is no different than a standard text input type and allows for one or more e-mail addresses to be entered. Combined with the <code>required</code> attribute, the browser is then able to look for patterns to ensure a valid e-mail address has been entered. Naturally, this checking is rudimentary, perhaps looking for an @ character or a period (.) and not allowing spaces. Opera 9.5+, Firefox 4+, Internet Explorer 10 and Chrome 5+ have already implemented this basic validation. The browser goes as far as presenting the user with an error message (see Opera in Figure 3) if the e-mail address entered isn’t valid. You can style the field for when an value is entered using the <code>:valid</code>, <code>:invalid</code> or <code>:required</code> pseudo class (assuming you have the required attribute on the input) just like <a href="">Locum Dr. Peter explained</a>.</p>
			
			<pre><code>&lt;input type="email" name="email" required&gt;</code></pre>

			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-8.png" alt="Screenshot of an email input field in Opera with an error message stating 'Please enter a valid email address' with 'gordo' written in the field" />
				<figcaption>Figure 3. Opera e-mail address error messaging</figcaption>
			</figure>

			<aside class="sidenote">
				<p>For more on styling forms using pseudo-classes the &#8220;CSS Ninja&#8221;, Ryan Seddon, has put together a great demonstration on <a href="http://j.mp/alaninja">A List Apart</a>.</p>
			</aside>

			<p>The specification details that one or more e-mail addresses are allowed. This means that the multiple attribute could be used with <code>type="email"</code> too.</p>
				
			<p>Pretty cool, huh? Again, this highlights how HTML5 forms help to cut down the amount of JavaScript that you have to write when carrying out form validation.</p>

			<div class="callout warning-block">

				<p>There&#8217;s always a catch, though, right? At the time of writing, there is an internationalization issue with <code>type="email"</code>. When using it with double-byte internationalized domain names, the browsers invalidate them; so this example</p>
				
				<pre><code>&lt;input type="email" name="email" value="gordo@日本.jp"&gt;</code></pre>

				<p>isn’t valid in Firefox, Safari, or Chrome (there is no issue in Opera). However, a workaround has been created by Kyle Barrow that uses <code>type="text"</code> with the <code>pattern</code> attribute, as shown here:</p>

				<pre><code>&lt;input type="text" name="email" value="gordo@日本.jp" pattern="[^ @]*@[^ @]*"&gt;</code></pre>
				
				<p>An alternative solution is to continue using <code>type="email"</code> with the <code>formnovalidate</code> attribute on the submit button, as follows. This ensures that no validation will be carried out on form submission, which may or may not be suitable for your needs.</p>

				<pre><code>&lt;form action="process.php"&gt;
&lt;label for="email"&gt;Email:&lt;/label&gt;
&lt;input type="email" name="email" value="gordo@日本.jp"&gt;
&lt;input type="submit" formnovalidate value="Submit"&gt;
Or you could use the novalidate attribute on your form, like so:

&lt;form action="process.php" novalidate&gt; &lt;label for="email"&gt;Email:&lt;/label&gt;
&lt;input type="email" name="email" value="gordo@日本.jp"&gt;
&lt;input type="submit" value="Submit"&gt;</code></pre>

			</div>
  
			<p>Internationalization issues aside, remember how we said there are dual benefits to HTML5&#8242;s input types—less development time and better user experience? Let’s go back and look at the iPhone once more, as shown in Figure 4.</p>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-9.png" alt="Screenshot of an iPhone with dynamic keyboard and the action button saying 'Go' when focussed on the email input field" />
				<figcaption>Figure 4. The iPhone displays a custom keyboard when using type=&#8221;email&#8221;. </figcaption>
			</figure>
 
			<p>Did you notice it this time? No? Look at the keyboard again. That&#8217;s right, the keyboard is different. There are dedicated keys for the @ and . characters to help you complete the field more efficiently. As we discussed with <code>type="search"</code>, there is no downside to using <code>type="email"</code> right now. If a browser doesn’t support it, it will degrade to <code>type="text"</code>. And in some browsers, users will get a helping hand.</p>

		</section>
		
		<section id="input-url">
			<h3>url</h3>

			<aside class="sidenote">
				<p>There is currently some debate about whether the user has to enter http:// into a field
using <code>input="url"</code>. Browser vendors are discussing the possibility of pre-pending http:// to a URL following a check upon form submission. For up-to-date information, refer to the HTML5 specification.</p>
			</aside>
		
			<p>The <code>url</code> input type, as you might expect, is for web addresses. You can use the <code>multiple</code> attribute to enter more than one URL. Like <code>type="email"</code>, a browser will carry out simple validation on these fields and present an error message on form submission. This is likely to include looking for forward slashes, periods, and spaces, and possibly detecting a valid top-level domain (such as .com or .co.uk). Use the <code>url</code> input type like so:</p>
			
			<pre><code>&lt;input type="url" name="url" required&gt;</code></pre>
			
			<p>Again, we&#8217;ll take a look at how the iPhone renders <code>type="url"</code>. As you can see in Figure 5, it has again updated the onscreen keyboard to ensure that completing the field is as simple as possible for the user by swapping the default space key for period, forward slash, and .com keys. (To access more endings like .org and .net, tap and hold the .com key.)</p>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-10.png" alt="Screenshot of an iPhone with dynamic keyboard and the action button saying 'Go' when focussed on the URL input field" />
				<figcaption>Figure 5. type=&#8221;url&#8221; activates a URL-specific keyboard on the iPhone.</figcaption>
			</figure>

		</section>
		
		<section id="input-tel">
			<h3>tel</h3>
		
			<p><code>tel</code> differs from <code>email</code> and <code>url</code> in that no particular syntax is enforced. Phone numbers differ around the world, making it difficult to guarantee any type of specific notation except for allowing only numbers and perhaps a + symbol to be entered. It’s possible that you can validate specific phone numbers (if you can guarantee the format) using client-side validation. <code>type="tel"</code> is marked up as follows:</p>
			
			<pre><code>&lt;input type="tel" name="tel" id="tel" required&gt;</code></pre>
			
			<p>Once more, the iPhone recognises <code>type="tel"</code>, only this time it goes one step further and completely changes the keyboard to the standard phone keyboard, as shown on the left in Figure 6. In addition to the iPhone, some Android devices (such as HTC Desire, shown on the right in Figure 6) also display a numeric keyboard for <code>type="tel"</code>. That’s pretty handy, don’t you think? Nice, big keys for entering a phone number help you to get that big, nasty form completed quickly.</p>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-11.png" alt="Screenshot of an iPhone and Android device with dynamic keyboard changing to a number input when the user is focussed on a tel input field" />
				<figcaption>Figure 6. <code>type="tel"</code> on the iPhone and some Android devices dynamically changes the keyboard to a numeric keypad. (Android screenshot provided by Stuart Langridge).</figcaption>
			</figure>

		</section>
		
		<section id="input-number">
			<h3>number</h3>
		
			<p><code>number</code>, as you might expect, is used for specifying a numerical value. As with the majority of these new input types, Opera was the first to implement <code>type="number"</code>. It, Safari, and Chrome render the input as a spinbox control (see Figure 7) whereby you can click the arrows to move up or down. Or if you prefer, you can type directly into the field. Firefox, on the other hand, renders the field like a standard text box. Support for type=&#8221;number&#8221; is in IE 10 also, although if you enter a non-numerical character the field empties when focus is lost and no feedback is provided to the user.</p>

			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-12.png" alt="Screenshot of the Opera browser rendering of a number input field for 'showe size' the value is 9 and there are up and down arrows to the right of the field." />
				<figcaption>Figure 7. <code>type="number"</code> in Opera</figcaption>
			</figure>

			<p>With the additional attributes <code>min</code>, <code>max</code>, and <code>step</code> we can change the default step value of this spinbox control as well as set minimum, maximum, and starting values (using the standard HTML <code>value</code> attribute). This example shows how these attributes work:</p>
			
			<pre><code>&lt;input type="number" min="5" max="18" step="0.5" value="9" name="shoe-size"&gt;</code></pre>
			
			<p>In this example, min represents the minimum value the field will accept, and max represents the maximum value. If we reach the maximum or minimum value, the appropriate arrow on the spinbox control will be greyed out so you can no longer interact with it. step is the increment that the value should adjust up or down, with the default step value being 1. This means we can include negative values or step up in increments of 0.5 or 5. value is that attribute you’re used to from previous versions of HTML. Each of the attributes are optional, with defaults being set if they aren&#8217;t used.</p>

			<p>In contrast to Opera&#8217;s implementation, the iPhone (Figure 8) and some Android devices (such as HTC Desire, shown on the right in Figure 6-13) simply render the field as a standard text box but optimize the keyboard for easy input.</p>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-13.png" alt="Screenshot of an iPhone and Android device with dynamic keyboard changing to a number input when the user is focussed on a number input field" />
				<figcaption>Figure 8. <code>type="number"</code> on iPhone and Android HTC Desire (Android screenshot provided by Stuart Langridge)</figcaption>
			</figure>
			
			<p>To make the iPhone render with the standard telephone keypad as we saw for <code>type="text"</code> Chris Coyier, of CSS Tricks devised a little hoax you can use. Rather than using type=&#8221;number&#8221;, use a standard <code>type="text"</code> input and add a pattern attribute that accepts only numbers, as shown below. This solution isn’t ideal but if you think it could be useful, <a href="http://j.mp/numbertrick">Chris has put a short video together showing it in action</a>.</p>

			<pre><code>&lt;input type="text" pattern="[0-9]*" name="shoe-size"&gt;</code></pre>
			
			<p>Chris’ technique may soon become absolete though with the introduction of the <code>inputmode</code> attribute. The attribute, recently added to the specification will allow users to specify the type of input mechanism that is most useful for users. When implemented, you will be able to choose between numeric, latin, email, or kana input modes.</p>

		</section>
		
		<section id="input-range">
			<h3>range</h3>
		
			<aside class="sidenote">
				<p>Note: For browsers that don’t support <code>type="range"</code>, Remy Sharp has created a JavaScript polyfill to plug the gaps. You can find out more about it <a href="http://j.mp/rangepolyfill">on his blog</a>.</p>
			</aside>
		
			<p>The <code>range</code> input type is similar to number but more specific. It represents a numerical value within a given range. Why the difference, I hear you cry? Because when you’re using <code>range</code>, the exact value isn’t important. It also allows browsers to offer a simpler control than for <code>number</code>. In Opera, Safari, Internet Explorer 10 and Chrome, <code>type="range"</code> renders as a slider (see Figure 6-14). When moving the slider in IE 10 a tooltip appears showing the current value. Additionally, in Opera, if the CSS defines the height greater than the width, the slider control will be rendered vertically as opposed to the standard horizontal rendering.</p>
			
			<p>The following code shows how we might mark up our skill level on a scale of 1 to 100 by setting the <code>min</code> and <code>max</code> attributes (see Figure 9). We can also set the starting point for <code>range</code> using the <code>value</code> attribute.</p>
			
			<pre><code>&lt;input id="skill" type="range" min="1" max="100" value="0"&gt;</code></pre>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-14.png" alt="Screenshot of the range input type for Flying Skill level as rendered by Opera." />
				<figcaption>Figure 9. <code>type="range"</code> in Chrome</figcaption>
			</figure>

		</section>
		
		<section id="dates-and-times">
			<h3>Dates and times</h3>
		
			<aside class="sidenote">
				<p>You may have noticed that there isn&#8217;t a <code>type="year"</code> input type defined in HTML5. The reason for this is a lack of relevant use cases. All the use cases for a year input type that have been proposed can be achieved using <code>type="number"</code>.</p>
			</aside>

			<p>If you&#8217;ve ever booked tickets online, you will have come across date pickers to help you quickly and easily choose the date you require. Perhaps you’ve even implemented a date picker on your own website. Generally, this is done using a JavaScript library such as jQuery, Dojo, or YUI. It can be a pain when you need to load a whole library and associated plug-ins just to implement a simple date picker. Well, with HTML5 we get that functionality baked into the browser. Not only that, but we don&#8217;t have to stop at just electing a single date; we can select a week, month, time, date and time, and even date and time with a time zone using the different input types. The markup is pretty straightforward.</p>
			
			<pre><code>&lt;input id="dob" name="dob" type="date"&gt;</code></pre>
			
			<p>You can go a step further by using the <code>min</code> and <code>max</code> attributes to ensure the user can only choose from a specified date range.</p>
			
			<pre><code>&lt;input id="startdate" name="startdate" min="2012-01-01" max="2013-01-01" type="date"&gt;</code></pre>
			
			<p>As with many of the other form implementations, Opera leads the way (support in other browsers is varied). Let&#8217;s take a look next at how browsers render these input types.</p>

			<section id="input-date">
				<h4>date</h4>
				
				<p>Figure 10 shows Opera 10.5&#8242;s rendering of <code>type="date"</code>.</p>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-15.png" alt="Screenshot of the date input type rendered by Opera. There is a dropdown for the date and a calendar widget shown." />
					<figcaption>Figure 10. <code>type="date"</code> in Opera 10.5</figcaption>
				</figure>
				
				<p>These date pickers aren&#8217;t restricted to desktop devices; some Blackberry devices and Chrome for Android render its internal date picker when used with <code>type="date"</code> (see Figure 11).</p>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-16.png" alt="Screenshot of the date input type as rendered on a Blackberry. There are three spinners, one for day, one for month and another for year." />
					<figcaption>Figure 11. <code>type="date"</code> on Blackberry (screenshot provided by Terence Eden)</figcaption>
				</figure>
				
			</section>
			
			<section id="input-month">
				<h4>month</h4>
				
				<p>Next up, Figure 12 shows <code>type="month"</code>, which might, for example, be used for a credit card expiry date.</p>

				<pre><code>&lt;input id="expiry" name="expiry" type="month" required&gt;</code></pre>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-17.png" alt="Screenshot of the month input type rendered by Opera. There is a dropdown for the date and a calendar widget shown with the current month highlighted." />
					<figcaption>Figure 12. <code>type="month"</code> in Opera 10.5</figcaption>
				</figure>
				
			</section>
			
			<section id="input-week">
				<h4>week</h4>
				
				<p>You can also drill down to <code>type="week"</code>. Notice how Opera highlights a specific week using the same date picker control, as shown in Figure 13.</p>
				
				<pre><code>&lt;input id="vacation" name="vacation" type="week"&gt;</code></pre>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-18.png" alt="Screenshot of the week input type rendered by Opera. There is a dropdown for the date and a calendar widget shown with the current week highlighted." />
					<figcaption>Figure 13. <code>type="week"</code> in Opera 10.5</figcaption>
				</figure>
				
			</section>
			
			<section id="input-time">
				<h4>time</h4>
				
				<p>You can see in Figure 14 that <code>type="time"</code> renders a spinbox similar to that used earlier for selecting the precise time.</p>

				<pre><code>&lt;input id="exit-time" name="exit-time" type="time"&gt;</code></pre>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-19.png" alt="Screenshot of the time input type rendered by Opera. There is an input with a value of 14:10 and up and down arrows to the right of the input." />
					<figcaption>Figure 14. <code>type="time"</code> in Opera 10.5</figcaption>
				</figure>
				
			</section>
			
			<section id="input-datetime">
				<h4>datetime</h4>
				
				<p>We can combine the date and time by using <code>type="datetime"</code> for specifying a precise time on a given day, as shown in Figure 15.</p>

				<pre><code>&lt;input id="entry-day-time" name="entry-day-time" type="datetime"&gt;</code></pre>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-20.png" alt="Screenshot of the datetime input type rendered by Opera. There is a dropdown for the date and a calendar widget shown with the current day highlighted. There is an input with a value of 12:08 and up and down arrows to the right of the input along with the text 'UTC'." />
					<figcaption>Figure 15. <code>type="datetime"</code> in Opera 10.5</figcaption>
				</figure>
				
			</section>
			
			<section id="input-datetime-local">
				<h4>datetime-local</h4>
				
				<p>Finally, Figure 16 shows that we can achieve slightly more granular control by selecting a precise time on a given day with a local time zone variation using <code>type="datetime-local"</code>.</p>

				<pre><code>&lt;input id="arrival-time" name="arrival-time " type="datetime-local"&gt;</code></pre>
				
				<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-21.png" alt="Screenshot of the datetime-local input type rendered by Opera. There is a dropdown for the date and a calendar widget shown with the current day highlighted. There is an input with a value of 17:08 and up and down arrows to the right." />
					<figcaption>Figure 16. <code>type="datetime-local"</code> in Opera 10.5</figcaption>
				</figure>
				
			</section>
			
			<div class="callout warning-block">
				<h4>Date and time caveats</h4>
				
				<p>There are two caveats with these implementations. First, with the current implementation, it isn&#8217;t possible to type a date into the field (in all browsers). The date picker is keyboard accessible, though. However, we can foresee a potential issue; if implemented on a form that a data entry clerk regularly completes, they are likely to be quicker at typing the date than tabbing through with the keyboard or selecting from a date picker. Second, it isn&#8217;t possible to style the look of the date picker. We tend to think that this is a good thing, as users will receive a common experience across all websites they visit (provided they use the same browser all the time). Undoubtedly, though, corporations will require a branded date picker. Safari 5 and Chrome 5 have implemented these input types, but, unfortunately, they aren’t very user friendly. Dates have to be entered in the same format as the time element that we met earlier in the book. So for dates, the format would be YYYY-MM-DD, and for dates with time, a user would have to enter YYYYMM-DDT00:00Z, which is not very friendly at all.</p>

				<p>As with the other new input types, if a browser doesn&#8217;t recognize them, it will simply default back to <code>type="text"</code> and let the user continue to use your JavaScript date picker.</p>
			</div>

		</section><!-- end date/time -->
		
		<section id="input-color">
			<h3>color</h3>
		
			<p>The color input type is pretty self-explanatory: it allows the user to select a color and returns the hex value for that color. It is anticipated that users will either be able to type the value or select from a color picker, which will either be native to the operating system or a browser’s own implementation. Opera 11 has implemented type=&#8221;color&#8221; with a simple color picker that offers a number of standard color choices or the option to select Other, which brings up the operating system color picker (shown on the right in Figure 17).</p>
			
			<pre><code>&lt;input id="color" name="color" type="color"&gt;</code></pre>
			
			<figure>
				<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-22.png" alt="Screenshot of the color input type as rendered by Opera. There is a colour dropdown which when clicked shows a range of colours with an 'other' button. The right shows the dialog box opened when the user clicks 'Other' which is a standard operating system color dialog." />
				<figcaption>Figure 17. <code>type="color"</code> in Opera on the left and the result of clicking Other shown on the right</figcaption>
			</figure>
			
			<p>In contrast, certain Blackberry devices have implemented the <code>color</code> input type that renders a color picker, as shown in Figure 18.</p>
			
			<figure>
					<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-23.png" alt="Screenshot of the color input type as rendered on a Blackberry. There is a colour spectrum with a hue box and a color preview alongside an 'OK' button." />
				<figcaption>Figure 18. <code>type="color"</code> on Blackberry (screenshot provided by Terence Eden)</figcaption>
			</figure>

		</section>
		

	</section><!--// end input types-->
	
	
	<section>
		<h2>Input types summary</h2>
		
		<p>By using HTML5&#8242;s new form input types right now, we can enhance the user&#8217;s experience, future-proof our site, and make our life as developers easier. Obviously, we can&#8217;t just leave the browsers that don&#8217;t support all these new features hanging, and in Chapter 6 of <a href="http://thewebevolved.com/">Beginning HTML5 and CSS3</a> we take a look at how to detect support for these form features using JavaScript.</p>
		
		<p>You can find a dummy form, using some of the examples we&#8217;ve shown in this article at our <a href="http://html5doctor.com/demos/forms/forms-example.html">HTML5 forms demo page</a>.</p>
		
		<p>We&#8217;ve hinted throughout the article at which browsers have support for HTML5 forms input types and attributes. With new versions of browsers being released at an ever-increasing rate, it can be difficult to keep up with what is or isn&#8217;t supported. If you want to keep an eye on the current progress, we suggest visiting When <a href="http://j.mp/caniuse">can I use &#8230;</a> or <a href="http://j.mp/findmebyip">FindMeByIP</a> or <a href="http://j.mp/wufooh5">Wufoo&#8217;s HTML5 forms research</a>.</p>
		
		<p>If you missed the first article in this series on HTML5 forms, why not read <a href="http://html5doctor.com/html5-forms-introduction-and-new-attributes/">a brief History of HTML5 forms and learn all about the new attributes introduced</a>.</p>
		
	</section>
	
	<div class="callout highlight-block">
		
		<img class="book" src="/wp-content/uploads/2013/01/web-evolved.jpg" alt="Cover image of Beginning HTML5 and CSS3: The Web Evolved.">
		<p>This is article is an excerpt from Chapter 6 of <a href="http://thewebevolved.com/">Beginning HTML5 and CSS3: The Web Evolved</a> by Christopher Murphy, Oli Studholme, Richard Clark and Divya Manian, published by Apress.</p>
		
		<p><a href="http://thewebevolved.com/" class="btn">Buy the book</a></p>
		
	</div><div class="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/html5-forms-introduction-and-new-attributes/" rel="bookmark" class="crp_title">HTML5 forms introduction and new attributes</a></li><li><a href="http://html5doctor.com/css3-pseudo-classes-and-html5-forms/" rel="bookmark" class="crp_title">CSS3 Pseudo-Classes and HTML5 Forms</a></li><li><a href="http://html5doctor.com/the-output-element/" rel="bookmark" class="crp_title">The output element</a></li><li><a href="http://html5doctor.com/using-modernizr-to-detect-html5-features-and-provide-fallbacks/" rel="bookmark" class="crp_title">Using Modernizr to detect HTML5 features and provide fallbacks</a></li><li><a href="http://html5doctor.com/designing-a-blog-with-html5/" rel="bookmark" class="crp_title">Designing a blog with html5</a></li></ul></div><p><a href="http://html5doctor.com/html5-forms-input-types/" rel="bookmark">HTML5 forms input types</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 28, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/2U6D4cBTRq4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-forms-input-types/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://html5doctor.com/html5-forms-input-types/</feedburner:origLink></item>
		<item>
		<title>HTML5 forms introduction and new attributes</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/VjlBLtFkoGA/</link>
		<comments>http://html5doctor.com/html5-forms-introduction-and-new-attributes/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 14:30:58 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[autofocus]]></category>
		<category><![CDATA[datalist]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[placeholder]]></category>
		<category><![CDATA[required]]></category>
		<category><![CDATA[web forms 2.0]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=5001</guid>
		<description><![CDATA[	<p>No doubt you interact with at least one form on the Web every day. Whether you're searching for content or logging in to your e-mail account or Facebook page, using online forms is one of the most common tasks performed on the Web. As designers and developers, creating forms has a certain monotony about it, particularly writing validation scripts for them. HTML5 introduces a number of new attributes, input types, and other elements for your markup toolkit. In this article we'll be focussing on the new attributes with a future article looking at the new input types.</p>]]></description>
				<content:encoded><![CDATA[	<p>No doubt you interact with at least one form on the Web every day. Whether you&#8217;re searching for content or logging in to your e-mail account or Facebook page, using online forms is one of the most common tasks performed on the Web. As designers and developers, creating forms has a certain monotony about it, particularly writing validation scripts for them. HTML5 introduces a number of new attributes, input types, and other elements for your markup toolkit. In this article we&#8217;ll be focussing on the new attributes with <a href="http://html5doctor.com/html5-forms-input-types/">a future article looking at the new input types</a>.</p>

	<p>As we&#8217;ll see, these new features will go a long way toward making your life easier while delivering a delightful user experience. The best thing about all this? You can start using them now. We&#8217;ll start with a (very) brief history of HTML5 forms though.</p> 
	
	<div class="callout highlight-block">
		
		<p>This is article is an excerpt from Chapter 6 of <a href="http://thewebevolved.com/">Beginning HTML5 and CSS3: The Web Evolved</a> by Christopher Murphy, Oli Studholme, Richard Clark and Divya Manian, published by Apress.</p>
		
		<p>Note: As this article is a book excerpt, browser renderings of attributes and input types may have altered since the screenshots were taken. Additionally, browser support may have increased since publication so please refer to the links at the end of the article for the current state of browser support.</p>
		
	</div>
	
	<section id="history">
		<h2>A history of HTML5 forms</h2>
		
		<p>The forms section of HTML5 was originally a specification titled <a href="http://j.mp/web-forms">Web Forms 2.0</a> that added new types of controls for forms. Started by Opera and edited by then-Opera employee Ian Hickson, it was <a href="http://j.mp/opera-forms">submitted to the W3C in early 2005</a>.  The work was initially carried out under the W3C. It was then combined with the Web Applications 1.0 specification to create the basis of the breakaway Web Hypertext Application Technology Working Group (WHATWG) HTML5 specification.</p>

	</section>
	
	<section id="principles">
		<h2>Using HTML5 design principles</h2>
		
		<p>One of the best things about HTML5 forms is that you can use almost all of these new input types and attributes right now. They don’t even need any shivs, hacks, or workarounds. That isn’t to say they&#8217;re all &#8220;supported&#8221; right now, but they do cool things in modern browsers that do support them-and degrade gracefully in browsers that don&#8217;t understand them. This is thanks to <a href="http://j.mp/designprinciples">HTML5&#8242;s design principles</a>. In this instance we’re specifically referring to the principle of graceful degradation. In essence, this means that there’s no excuse for not using these features right now. In fact, it means you&#8217;re ahead of the curve.</p>

	</section>
	
	<section id="attributes">
	
	<h2>HTML5 form attributes</h2>
	
	<p>There are 14 new attributes that we&#8217;ll be looking at in this article.</p>
	
	<ul class="columns">
		<li><a href="#placeholder"><code>placeholder</code></a></li>
		<li><a href="#autofocus"><code>autofocus</code></a></li>
		<li><a href="#autocomplete"><code>autocomplete</code></a></li>
		<li><a href="#required"><code>required</code></a></li>
		<li><a href="#pattern"><code>pattern</code></a></li>
		<li><a href="#list-datalist"><code>list</code></a></li>
		<li><a href="#multiple"><code>multiple</code></a></li>
		<li><a href="#novalidate"><code>novalidate</code></a></li>
		<li><a href="#novalidate"><code>formnovalidate</code></a></li>
		<li><a href="#attr-form"><code>form</code></a></li>
		<li><a href="#formaction"><code>formaction</code></a></li>
		<li><a href="#formenctype"><code>formenctype</code></a></li>
		<li><a href="#formmethod"><code>formmethod</code></a></li>
		<li><a href="#formtarget"><code>formtarget</code></a></li>
	</ul>
	
	<section id="placeholder">
		<h3>placeholder</h3>
		
		<p>First up is the <code>placeholder</code> attribute, which allows us to set placeholder text as we would currently do in
HTML4 with the <code>value</code> attribute. It should only be used for short descriptions. For anything longer, use the title attribute. The difference from HTML4 is that the text is only displayed when the field is empty and hasn&#8217;t received focus. Once the field receives focus (e.g., you click or tab to the field), and you begin to type, the text simply disappears. It&#8217;s very similar to the search box you see in Safari (see Figure 1).</p>

		<figure>
			<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-1.png" alt="Screenshot of the browser search box in Safari with and without focus" />
			<figcaption>Figure 1. Browser search box in Safari without and with focus</figcaption>
		</figure>
		
		<p>Let&#8217;s have a look at how to implement the <code>placeholder</code> attribute.</p>
		
		<pre><code>&lt;input type="text" name="user-name" id="user-name" placeholder="at least 3 characters"&gt;</code></pre>
		
		<p>That&#8217;s it! We can hear you thinking, “What&#8217;s so great about that? I&#8217;ve been doing it with JavaScript for years.” Yes, that&#8217;s true. However, with HTML5, it’s part of the browser, meaning less scripting is required for a more accessible, cross-browser solution (even when JavaScript is disabled). Figure 2 shows the <code>placeholder</code> attribute working in Chrome.</p>

		<figure>
			<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-2.png" alt="Screenshot of an input field in Chrome with and without focus, so showing and not showing the placeholder" />
			<figcaption>Figure 2. Placeholder attribute support in Chrome, unfocused and focused</figcaption>
		</figure>
		
		<p>Browsers that don&#8217;t support the placeholder attribute ignore it, so it won&#8217;t render. By including it, though, you&#8217;re providing an enhanced user experience for those users who have browser support and you&#8217;re “future proofing” your site. All modern browsers support <code>placeholder</code>.</p>
		
		<div class="callout highlight-block">
			<p>Note: There is no official pseudo-class for styling placeholder text but both Mozilla (makers of Firefox) and WebKit offer vendor prefixed properties for styling (-mozplaceholder and –webkit-input-placeholder). This makes it safe to assume that a pseudo-class will become standard for styling placeholder text. For further detail there is <a href="http://j.mp/pseudoplaceholder">a thread on the WHATWG mailing list about this topic</a>.</p>
		</div>

	</section>
	
	<section id="autofocus">
		<h3>autofocus</h3>
		
		<p><code>autofocus</code> does exactly what it says on the tin. Adding it to an input automatically focuses that field when the page is rendered. As with <code>placeholder</code>, <code>autofocus</code> is something that we used JavaScript for in the past.</p>
		
		<p>Traditional JavaScript methods do, though, have some serious usability problems. For example, if a user begins completing the form before the script loads, they will (jarringly) be returned to the first form field when the script is loaded. The <code>autofocus</code> attribute in HTML5 gets around this issue by focusing as soon as the document loads, without having to wait for the JavaScript to be loaded. However, we only recommend using it for pages whose sole purpose is the form (like Google) to prevent the usability issues.</p>
		
		<p>It is a Boolean attribute (except if you are writing XHTML5; see the note) and is implemented as follows:</p>
		
		<pre><code>&lt;input type="text" name="first-name" id="first-name" autofocus&gt;</code></pre>
		
		<p>All modern browsers support the attribute and, like <code>placeholder</code>, browsers that don&#8217;t support the <code>autofocus</code> attribute simply ignore it.</p>
		
		<div class="callout highlight-block">
			<p>Note: Several new HTML5 form attributes are Boolean attributes. This just means they&#8217;re set if they&#8217;re present and not set if they’re absent. They can be written several ways in HTML5.</p>
			
			<pre><code>autofocus
autofocus=""
autofocus="autofocus"</code></pre>

			<p>However, if you are writing XHTML5, you have to use the <code>autofocus="autofocus"</code> style.</p>
		</div>
		
	</section>
	
	<section id="autocomplete">
		<h3>autocomplete</h3>
		
		<p>The <code>autocomplete</code> attribute helps users complete forms based on earlier input. The attribute has been around since IE5.5 but has finally been standardized as part of HTML5. The default state is set to on. This means that generally we won’t have to use it. However, if you want to insist that a form field be entered each time a form is completed (as opposed to the browser autofilling the field), you would implement it like so:</p>
		
		<pre><code>&lt;input type="text" name="tracking-code" id="tracking-code" autocomplete="off"&gt;</code></pre>
		
		<p>The <code>autocomplete</code> state on a field overrides any <code>autocomplete</code> state set on the containing <code>form</code> element.</p>
		
	</section>
	
	<section id="required">
		<h3>required</h3>
		
		<p>The <code>required</code> attribute doesn&#8217;t need much introduction; like <code>autofocus</code>, it does exactly what you&#8217;d expect. By adding it to a form field, the browser requires the user to enter data into that field before submitting the form. This replaces the basic form validation currently implemented with JavaScript, making things a little more usable and saving us a little more development time. <code>required</code> is a Boolean attribute, like <code>autofocus</code>. Let’s see it in action.</p>
		
		<pre><code>&lt;input type="text" id="given-name" name="given-name" required&gt;</code></pre>
		
		<p><code>required</code> is currently implemented only in Opera 9.5+, Firefox 4+, Safari 5+, Internet Explorer 10 and Chrome 5+, so for the
time being you need to continue writing a script to check that fields are completed on the client side in other browsers (*cough* IE!). Opera, Chrome, and Firefox show the user an error message (see Figure 3) upon form submission. In most browsers, the errors are then localized based on the declared language. Safari doesn’t show an error message on submit, but instead places focus on that field.</p>

		<figure>
			<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-3.png" alt="Screenshot from Opera showing an error message on an input field" />
			<figcaption>Figure 3. Form field with required attribute displaying a browser-generated error message in Opera</figcaption>
		</figure>
		
		<aside class="sidenote">
			<p>Since the book was published, Bruce has <a href="http://www.brucelawson.co.uk/2013/on-the-styling-of-forms/">written a little more on the styling of forms</a> and there is <a href="http://www.broken-links.com/2011/03/28/html5-form-validation/">another post from Peter</a> that is useful reading.</p>
		</aside>
		
		<p>The default rendering of “required” error messages depends on the individual browser; at present the error message bubble can’t be styled with CSS in all browsers. Chrome, however, does have a proprietary property that you can use to style the error bubble. <a href="http://j.mp/stylingformerrors">Peter Gasston has written an article about the syntax</a>. You can also style the input <a href="http://j.mp/pseudoforms">using the :required pseudo-class</a>. An alternative is to override the wording and styling using the <code>setCustomValidity()</code> method in JavaScript. Importantly, don&#8217;t forget that this browser validation is no substitute for validating on the server as well.</p>
		
	</section>
	
	<section id="pattern">
		<h3>pattern</h3>
		
		<aside class="sidenote">
			<p>A regular expression (regex or regexp) provides a way to match entered strings of text to particular patterns. A regex might be used to check a particular format for a product or ZIP code. They can be used with a number of programming languages, some of which (Perl, Ruby) have them built into their syntax. Regex is where the <code>pattern</code> attribute originates.</p>
		</aside>
		
		<p>The <code>pattern</code> attribute is likely to get a lot of developers very excited (well, as excited as you can get about form attributes). It specifies a JavaScript regular expression for the field’s value to be checked against. <code>pattern</code> makes it easy for us to implement specific validation for product codes, invoice numbers, and so on. The possibilities for <code>pattern</code> are wide-ranging, and this is just one simple example using a product number.</p>
		
		<pre><code>&lt;label&gt;Product Number:
&lt;input pattern="[0-9][A-Z]{3}" name="product" type="text" title="Single digit followed by three uppercase letters."/&gt;
&lt;/label&gt;</code></pre>

		<p>This pattern prescribes that the product number should be a single digit [0-9] followed by three uppercase letters [A-Z]{3}. For more examples, the <a href="http://j.mp/html5p">HTML5 Pattern website</a> lists common regex style patterns to help get you started.</p>
		
		<p>As with required, Opera 9.5+, Firefox 4+, Safari 5+, Internet Explorer 10 and Chrome 5+ are the only browsers with support for pattern at present. However, with the browser market moving at a fast pace, the others will soon catch up.</p>
		
	</section>
	
	<section id="list">
		<h3>list and the datalist element</h3>
		
		<p>The <code>list</code> attribute enables the user to associate a list of options with a particular field. The value of the <code>list</code> attribute must be the same as the ID of a <code>datalist</code> element that resides in the same document. The <code>datalist</code> element is new in HTML5 and represents a predefined list of options for form controls. It works in a similar way to the in-browser search boxes that autocomplete as you type (see Figure 4).</p>
		
		<figure>
			<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-4.png" alt="Screenshot Google's autosuggest functionality in Safaris search box" />
			<figcaption>Figure 4. Google search autosuggestions in Safari</figcaption>
		</figure>
		
		<p>The following example shows how <code>list</code> and <code>datalist</code> are combined (see Figure 5):</p>
		
		<pre><code>&lt;label&gt;Your favorite fruit:
&lt;datalist id="fruits"&gt;
  &lt;option value="Blackberry"&gt;Blackberry&lt;/option&gt;
  &lt;option value="Blackcurrant"&gt;Blackcurrant&lt;/option&gt;
  &lt;option value="Blueberry"&gt;Blueberry&lt;/option&gt;
  &lt;!-- … --&gt;
&lt;/datalist&gt;
If other, please specify:
  &lt;input type="text" name="fruit" list="fruits"&gt;
&lt;/label&gt;</code></pre>

		<p>By adding a <code>select</code> element inside the <code>datalist</code> you can provide superior graceful degradation than by simply using an option element. This is an elegant markup pattern <a href="http://j.mp/datalistpattern">designed by Jeremy Keith</a> that adheres perfectly with HTML5&#8242;s principle of degrading gracefully.</p>
		
		<pre><code>&lt;label&gt;Your favorite fruit:
&lt;datalist id="fruits"&gt;
  &lt;select name="fruits"&gt;
    &lt;option value="Blackberry"&gt;Blackberry&lt;/option&gt;
    &lt;option value="Blackcurrant"&gt;Blackcurrant&lt;/option&gt;
    &lt;option value="Blueberry"&gt;Blueberry&lt;/option&gt;
    &lt;!-- … --&gt;
  &lt;/select&gt;
If other, please specify:
&lt;/datalist&gt;
  &lt;input type="text" name="fruit" list="fruits"&gt;
&lt;/label&gt;</code></pre>

		<p>Browser support for <code>list</code> and <code>datalist</code> is currently limited to Opera 9.5+ (see Figure 5), Chrome 20+, Internet Explorer 10 and Firefox 4+.</p>
		
		<figure>
			<img src="http://html5doctor.com/wp-content/uploads/2013/02/figure_6-5.png" alt="Screenshot of the list attribute and datalist element in Opera" />
			<figcaption>Figure 5. The datalist element rendered in Opera</figcaption>
		</figure>
		
	</section>
	
	<section id="multiple">
		<h3>multiple</h3>
		
		<p>We can take our <code>list</code>s and <code>datalist</code>s one step further by applying the Boolean attribute <code>multiple</code> to allow more than one value to be entered from the <code>datalist</code>. Here is an example.</p>
		
		<pre><code>&lt;label&gt;Your favorite fruit:
&lt;datalist id="fruits"&gt;
  &lt;select name="fruits"&gt;
    &lt;option value="Blackberry"&gt;Blackberry&lt;/option&gt;
    &lt;option value="Blackcurrant"&gt;Blackcurrant&lt;/option&gt;
    &lt;option value="Blueberry"&gt;Blueberry&lt;/option&gt;
    &lt;!-- … --&gt;
  &lt;/select&gt;
If other, please specify:
&lt;/datalist&gt;
  &lt;input type="text" name="fruit" list="fruits" multiple&gt;
&lt;/label&gt;</code></pre>

		<p><code>multiple</code> isn&#8217;t exclusively for use with <code>datalist</code>s, though. A further example for <code>multiple</code> might be for email addresses when sending items to friend or the attachment of files, as shown here:</p>
		
		<pre><code>&lt;label&gt;Upload files:
&lt;input type="file" multiple name="upload"&gt;&lt;/label&gt;</code></pre>

		<p><code>multiple</code> is supported in Firefox 3.6+, Safari 4+, Opera 11.5+, Internet Explorer 10 and Chrome 4+.</p>
		
	</section>

	<section id="novalidate">
		<h3>novalidate and formnovalidate</h3>
		
		<p>The <code>novalidate</code> and <code>formnovalidate</code> attributes indicate that the form shouldn&#8217;t be validated when submitted. They are both Boolean attributes. <code>formnovalidate</code> can be applied to submit or image input types. The <code>novalidate</code> attribute can be set only on the <code>form</code> element.</p>

		<p>An example use case for the <code>formnovalidate</code> attribute could be on a &#8220;save draft&#8221; button, where the form has fields that are required for submitting the draft but aren&#8217;t required for saving the draft. <code>novalidate</code> would be used in cases where you don&#8217;t want to validate the form but do want to take advantage of the more useful user interface enhancements that the new input types offer.</p>
		
		<p>The following example shows how to use <code>formnovalidate</code>:</p>
		
		<pre><code>&lt;form action="process.php"&gt;
  &lt;label for="email"&gt;Email:&lt;/label&gt;
  &lt;input type="text" name="email" value="gordo@example.com"&gt;
  &lt;input type="submit" formnovalidate value="Submit"&gt;
&lt;/form&gt;</code></pre>

		<p>And this example shows how to use <code>novalidate</code>:</p>
		
		<pre><code>&lt;form action="process.php" novalidate&gt;
  &lt;label for="email"&gt;Email:&lt;/label&gt;
  &lt;input type="text" name="email" value="gordo@example.com"&gt;
  &lt;input type="submit" value="Submit"&gt;
&lt;/form&gt;</code></pre>
	
	</section>
	
	<section id="attr-form">
		<h3>form</h3>
		
		<p>The <code>form</code> attribute is used to associate an <code>input</code>, <code>select</code>, or <code>textarea</code> element with a form (known as its <em>form owner</em>). Using <code>form</code> means that the element doesn&#8217;t need to be a child of the associated form and can be moved away from it in the source. The primary use case for this is that input buttons that are placed within tables can now be associated with a form.</p>
		
		<pre><code>&lt;input type="button" name="sort-l-h" form="sort"&gt;</code></pre>
		
	</section>
	
	<section>
		<h2>formaction, formenctype, formmethod, and formtarget</h2>
		
		<p>The <code>formaction</code>, <code>formenctype</code>, <code>formmethod</code>, and <code>formtarget</code> attributes each have a corresponding attribute on the <code>form</code> element, which you&#8217;ll be familiar with from HTML4, so let&#8217;s run through each of them briefly. These new attributes have been introduced primarily because you may require alternative actions for different submit buttons, as opposed to having several forms in a document.</p>
		
		<section id="formaction">
			<h4>formaction</h4>
			
			<p><code>formaction</code> specifies the file or application that will submit the form. It has the same effect as the <code>action</code> attribute on the <code>form</code> element and can only be used with a submit or image button (<code>type="submit"</code> or <code>type="image"</code>). When the form is submitted, the browser first checks for a <code>formaction</code> attribute; if that isn&#8217;t present, it proceeds to look for an <code>action</code> attribute on the form.</p>
			
			<pre><code>&lt;input type="submit" value="Submit" formaction="process.php"&gt;</code></pre>
			
		</section>
		
		<section id="formenctype">
			<h4>formenctype</h4>
			
			<p><code>formenctype</code> details how the form data is encoded with the POST method type. It has the same effect as the <code>enctype</code> attribute on the form element and can only be used with a submit or image button
(<code>type="submit"</code> or <code>type="image"</code>). The default value if not included is <code>application/x-www-formurlencoded</code>.</p>
			
			<pre><code>&lt;input type="submit" value="Submit" formenctype="application/x-www-form-urlencoded"&gt;</code></pre>
			
		</section>
		
		<section id="formmethod">
			<h4>formmethod</h4>
			
			<p><code>formmethod</code> specifies which HTTP method (GET, POST, PUT, DELETE) will be used to submit the form data. It has the same effect as the method attribute on the form element and can only be used with a submit or image button (<code>type="submit"</code> or <code>type="image"</code>).</p>
			
			<pre><code>&lt;input type="submit" value="Submit" formmethod="POST"&gt;</code></pre>
			
			
		</section>
		
		<section id="formtarget">
			<h4>formtarget</h4>
			
			<p><code>formtarget</code> specifies the target window for the form results. It has the same effect as the target attribute on the <code>form</code> element and can only be used with a submit or image button (<code>type="submit"</code> or <code>type="image"</code>).</p>
			
			<pre><code>&lt;input type="submit" value="Submit" formtarget="_self"&gt;</code></pre>
			
		</section>
		
	</section>
	
	</section>
	
	<section id="summary">
		<h2>Form attributes summary</h2>
		
		<p>We&#8217;ve looked at several new form attributes that help improve user experience and save you development time. There are some more new attributes to discuss, which are covered together with <a href="http://html5doctor.com/html5-forms-input-types/">HTML5&#8242;s new input types in the next article in this series</a>.</p>
		
		<p>You can find a dummy form, using some of the examples we&#8217;ve shown in this article at our <a href="http://html5doctor.com/demos/forms/forms-example.html">HTML5 forms demo page</a>.</p>
		
		<p>We&#8217;ve hinted throughout the article at which browsers have support for HTML5 forms input types and attributes. With new versions of browsers being released at an ever-increasing rate, it can be difficult to keep up with what is or isn&#8217;t supported. If you want to keep an eye on the current progress, we suggest visiting When <a href="http://j.mp/caniuse">can I use &#8230;</a> or <a href="http://j.mp/findmebyip">FindMeByIP</a> or <a href="http://j.mp/wufooh5">Wufoo&#8217;s HTML5 forms research</a>.</p>
		
	</section>
		
	<div class="callout highlight-block">
		
		<img class="book" src="/wp-content/uploads/2013/01/web-evolved.jpg" alt="Cover image of Beginning HTML5 and CSS3: The Web Evolved.">
		<p>This is article is an excerpt from Chapter 6 of <a href="http://thewebevolved.com/">Beginning HTML5 and CSS3: The Web Evolved</a> by Christopher Murphy, Oli Studholme, Richard Clark and Divya Manian, published by Apress.</p>
		
		<p><a href="http://thewebevolved.com/" class="btn">Buy the book</a></p>
		
	</div><div class="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/html5-forms-input-types/" rel="bookmark" class="crp_title">HTML5 forms input types</a></li><li><a href="http://html5doctor.com/css3-pseudo-classes-and-html5-forms/" rel="bookmark" class="crp_title">CSS3 Pseudo-Classes and HTML5 Forms</a></li><li><a href="http://html5doctor.com/the-output-element/" rel="bookmark" class="crp_title">The output element</a></li><li><a href="http://html5doctor.com/your-questions-5/" rel="bookmark" class="crp_title">Your Questions Answered #5</a></li><li><a href="http://html5doctor.com/avoiding-common-html5-mistakes/" rel="bookmark" class="crp_title">Avoiding common HTML5 mistakes</a></li></ul></div><p><a href="http://html5doctor.com/html5-forms-introduction-and-new-attributes/" rel="bookmark">HTML5 forms introduction and new attributes</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 26, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/VjlBLtFkoGA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-forms-introduction-and-new-attributes/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://html5doctor.com/html5-forms-introduction-and-new-attributes/</feedburner:origLink></item>
		<item>
		<title>The progress element</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/Pcj1Eosea78/</link>
		<comments>http://html5doctor.com/the-progress-element/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 14:30:16 +0000</pubDate>
		<dc:creator>Ian Devlin</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[file api]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[progress]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4927</guid>
		<description><![CDATA[When building web sites and web applications, we often need to provide essential feedback to a user informing them of the progress of their request or task, be it uploading a file, playing a video, or importing data. HTML5 makes life easier for us by defining an element whose sole purpose is just that: the [...]]]></description>
				<content:encoded><![CDATA[<p>When building web sites and web applications, we often need to provide essential feedback to a user informing them of the progress of their request or task, be it uploading a file, playing a video, or importing data.</p>
<p>HTML5 makes life easier for us by defining an element whose sole purpose is just that: the <code>&lt;progress&gt;</code> element.</p>
<p>The <a href="http://www.w3.org/TR/html5-author/the-progress-element.html"><abbr title="HyperText Markup Language 5">HTML5</abbr> specification</a> describes it best:</p>
<blockquote><p>The progress element represents the completion progress of a task.</p></blockquote>
<p>The task itself is irrelevant, but displaying its progress is not.</p>
<section id="attributes">
<h2>Attributes <a href="#attributes" class="permalink">#</a></h2>
<p>There are four attributes that are specified for the <code>&lt;progress&gt;</code> element: <code>max</code>, <code>value</code>, <code>position</code>, and <code>labels</code>. Before taking a look at each of theses attributes in turn, here are a few important notes on them:</p>
<ul>
<li>If the <code>value</code> attribute exists, then the progress bar is considered to be <strong>determinate</strong> (i.e., it has exact limits). Otherwise it is considered to be <strong>indeterminate</strong>.</li>
<li>If the <code>max</code> attribute is not included, the default acceptable range for the progress bar is between 0.0 and 1.0 inclusive.</li>
<li>Authors are encouraged always to include the current value and the maximum value (if used) as inline text to the <code>&lt;progress&gt;</code> element so that the information is still visible to users of legacy browsers.</li>
</ul>
<p>And now let&#8217;s take a closer look at the attributes themselves:</p>
<dl>
<dt>Max</dt>
<dd>The <code>max</code> attribute is a floating point number that indicates how much work the relevant task requires in total before it can be considered complete. The default value is 1.0.</dd>
<dt>Value</dt>
<dd>This is a floating point number that represents the current progress of the relevant task. Its value must be greater than or equal to 0.0 and less than or equal to 1.0 <strong>or</strong> the value of the <code>max</code> attribute if present.</dd>
<dt>Position</dt>
<dd>This is a read-only attribute that returns the current position of the <code>&lt;progress&gt;</code> element. This value is equal to <code>value / max</code> for a determinate progress bar and -1 for an indeterminate progress bar (as the position can&#8217;t accurately be determined).</dd>
<dt>Labels</dt>
<dd>This is also a read-only attribute that returns a list of the <code>&lt;progress&gt;</code> element&#8217;s <code>label</code>s (if there are any).</dd>
</dl>
</section>
<section id="examples">
<h2>Examples <a href="#examples" class="permalink">#</a></h2>
<p>Let&#8217;s now take a look at some examples of how the <code>&lt;progress&gt;</code> element might be used, including how it might be updated via JavaScript.</p>
<section id="indeterminate-progress-bar">
<h3>Simple Indeterminate Progress Bar <a class="permalink" href="#indeterminate-progress-bar">#</a></h3>
<pre><code>&lt;progress id='p'&gt;&lt;/progress&gt;</code></pre>
<p>Since we have no idea how long the task in hand will take, the browser will simply display the progress bar until the task is complete and we either hide it or replace it with a &#8216;task complete&#8217; message.</p>
</section>
<section id="determinate-progress-bar">
<h3>Simple Determinate Progress Bar <a class="permalink" href="#determinate-progress-bar">#</a></h3>
<pre><code>&lt;progress id='p' max='70'&gt;&lt;span&gt;0&lt;/span&gt;%&lt;/progress&gt;</code></pre>
<p>And the JavaScript for updating it:</p>
<pre><code>var pBar = document.getElementById('p');
var updateProgress = function(value) {
  pBar.value = value;
  pBar.getElementsByTagName('span')[0].innerHTML = Math.floor((100 / 70) * value);
}</code></pre>
<p>Note that here the progress bar can have a maximum value of 70, so calls to <code>updateProgress</code> will have values between 0 and 70 and that the value is also displayed within the <code>&lt;progress&gt;</code> element so that it is visible as a simple percentage string for users of legacy browsers.</p>
</p>
</section>
<section id="video">
<h3>Using <code>&lt;progress&gt;</code> with HTML5 Video <a class="permalink" href="#video">#</a></h3>
<p>A good example of using the <code>&lt;progress&gt;</code> element is with an HTML5 video, informing the user how much of the video has been played. This won&#8217;t be a full example but will just show the necessary HTML and JavaScript.</p>
<p>Given a <code>&lt;video&gt;</code> element with an id of &#8216;v&#8217;:</p>
<pre><code>&lt;progress id='p' max='100' value='0'&gt;&lt;span&gt;0&lt;/span&gt;% played&lt;/progress&gt;</code></pre>
<p>Use this JavaScript:</p>
<pre><code>var video = document.getElementById('v');
var pBar = document.getElementById('p');
video.addEventListener('timeupdate', function() {
  var percent = Math.floor((100 / video.duration) * video.currentTime);
  pBar.value = percent;
  pBar.getElementsByTagName('span')[0].innerHTML = percent;
}, false);</code></pre>
<p>The JavaScript uses the <code>timeupdate</code> event, which is constantly triggered as the video is being played. The value is converted into a percentage value using the video&#8217;s <code>duration</code> (full length) and <code>currentTime</code> (where in the video it currently is).</p>
</section>
<section id="file-api">
<h3>Using <code>&lt;progress&gt;</code> with the File API <a class="permalink" href="#file-api">#</a></h3>
<p>Another useful example is how the <code>&lt;progress&gt;</code> element might be used with the <a href="http://www.w3.org/TR/FileAPI/">File API</a>. Again, this is not a complete example, assuming the existence of a file input and upload button and <code>&lt;progress&gt;</code> element, and code for reading the file. The <a href="http://www.w3.org/TR/FileAPI/">specification itself</a> has some good code examples of this.</p>
<pre><code>var p = document.getElementById('p');
// 'reader' is of type FileReader
reader.addEventListener('loadstart', function(evt) {
  if (evt.lengthComputable) p.max = evt.total;
}, false);
reader.addEventListener('progress', function(evt) {
  if (evt.lengthComputable) p.value = evt.loaded;
}, false);</code></pre>
<p>Here the <code>loadstart</code> event is used to set the <code>max</code> attribute of the <code>&lt;progress&gt;</code> element, and then the <code>progress</code> event is used to update the <code>&lt;progress&gt;</code> element&#8217;s <code>value</code> attribute.</p>
</section>
</section>
<section id="browser-support">
<h2>Browser Support <a class="permalink" href="#browser-support">#</a></h2>
<p>The <code>&lt;progress&gt;</code> element is <a href="http://caniuse.com/#feat=progressmeter">fairly well-supported</a> in today&#8217;s major browsers, although only in version 6+ of Safari (so not on Windows, as the last version there was 5.1) and only in version 10+ of Internet Explorer.</p>
</section>
<section id="styling">
<h2>Styling <a class="permalink" href="#styling">#</a></h2>
<p>As is usual with such elements, browsers have their own unique styling for the <code>&lt;progress&gt;</code> element. You can, however, override this to a certain extent using simple CSS.</p>
<p>The default styling tends to consist of an element with rounded corners, a grey background colour, and a green gradient for the actual progress marker.</p>
<figure>
     <img src="http://html5doctor.com/wp-content/uploads/2013/02/progress-element-firefox.jpg" alt="A screenshot of the progress element in Firefox" /></p>
<figcaption>The default styling for the progress element in Firefox 18.0.2.</figcaption>
</figure>
<p>Let&#8217;s say we want to style our progress bar for the HTML5 Doctor website, so that it fits in with the design. We&#8217;ll remove the bevel and the gradients using only solid colours. The code below will almost do that:</p>
<pre><code>progress {
  color: #0063a6;
  font-size: .6em;
  line-height: 1.5em;
  text-indent: .5em;
  width: 15em;
  height: 1.8em;
  border: 1px solid #0063a6;
  background: #fff;
}</code></pre>
<p>This, however, won&#8217;t change the colour of the progress bar itself, which will remain a green colour. We can change this in Firefox, Internet Explorer 10, Chrome, and Safari using a variety of methods which are outlined below.</p>
<section id="styling-firefox">
<h3>Firefox <a class="permalink" href="#styling-firefox">#</a></h3>
<p>All we need to use here is:</p>
<pre><code>progress::-moz-progress-bar { background: #0063a6; }</code></pre>
<p>and Firefox will display the colour correctly.</p>
<figure>
      <img src="http://html5doctor.com/wp-content/uploads/2013/02/progress-element-styled.jpg" alt="A screenshot of the progress bar after custom styling" /></p>
<figcaption>The progress bar as it appears in Firefox 18.0.2 after being styled.</figcaption>
</figure>
</section>
<aside id="styling-opera">
<h3>Update &#8211; <time datetime="2013-02-13">13th February 2013</time></h3>
<p>Opera have just <a href="http://www.opera.com/press/releases/2013/02/13/">announced their move to using WebKit</a> as their rendering engine, so eventually the WebKit specifc styling rules will also work in Opera.</p>
</aside>
<section id="styling-webkit">
<h3>Chrome and Safari <a class="permalink" href="#styling-webkit">#</a></h3>
<p>For Chrome and Safari, we need to use <code>progress::-webkit-progress-value</code> to specify the progress bar colour and <code>progress::-webkit-progress-bar</code> to specify the background colour of the <code>&lt;progress&gt;</code> element itself:</p>
<pre><code>progress::-webkit-progress-bar { background: #fff; }
progress::-webkit-progress-value { background: #0063a6; }</code></pre>
</section>
<section id="styling-ie">
<h3>Internet Explorer 10 <a class="permalink" href="#styling-ie">#</a></h3>
<p>Actually the CSS above will be fine to style the <code>&lt;progress&gt;</code> element in IE10, but it&#8217;s worth noting that this browser interprets the <code>&lt;progress&gt;</code> element&#8217;s <code>color</code> value as the colour of the progress bar.</p>
</section>
<p>I&#8217;ve uploaded some <a href="/demos/progress/progress-element.html">working examples</a> of determinate and indeterminate progress bars for you to see.</p>
</section>
<section id="summary">
<h2>Summary <a class="permalink" href="#summary">#</a></h2>
<p>The <code>&lt;progress&gt;</code> element may seem very similar to the <a href="http://html5doctor.com/measure-up-with-the-meter-tag/"><code>&lt;meter&gt;</code> element</a> — which was also introduced in HTML5 — but it can be seen as a more specific kind of <code>&lt;meter&gt;</code> element that&#8217;s only used to measure progress of a task. It&#8217;s worth bearing this in mind when deciding which one to use.</p>
<p>Since browser support is pretty good, it&#8217;s definitely worth using the <code>&lt;progress&gt;</code> element where appropriate, but you should also ensure that you provide textual fallback for legacy browsers as has been outlined above.</p>
</section>
<div class="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/drag-and-drop-to-server/" rel="bookmark" class="crp_title">Drag and Drop and Automatically Send to the Server</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-11/" rel="bookmark" class="crp_title">Your Questions Answered #11</a></li>
<li><a href="http://html5doctor.com/native-audio-in-the-browser/" rel="bookmark" class="crp_title">Native Audio in the browser</a></li>
<li><a href="http://html5doctor.com/css3-pseudo-classes-and-html5-forms/" rel="bookmark" class="crp_title">CSS3 Pseudo-Classes and HTML5 Forms</a></li>
<li><a href="http://html5doctor.com/injecting-new-life-into-the-doctor/" rel="bookmark" class="crp_title">Injecting new life into the Doctor</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/the-progress-element/" rel="bookmark">The progress element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on February 12, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/Pcj1Eosea78" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-progress-element/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://html5doctor.com/the-progress-element/</feedburner:origLink></item>
		<item>
		<title>Simplequiz #7: Pinterest</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/g3sI7_f13a0/</link>
		<comments>http://html5doctor.com/html5-simplequiz-7-pinterest/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 15:22:02 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Simplequiz]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[pinterest]]></category>
		<category><![CDATA[simplequiz]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4776</guid>
		<description><![CDATA[<p>One of our readers commented on an article a while ago (I won't tell you which one just now ;) asking about marking up items on Pinterest. It struck me that this would be a prime candidate for a Simplequiz, so here we are.</p>]]></description>
				<content:encoded><![CDATA[<p>One of our readers commented on an article a while ago (I won&#8217;t tell you which one just now ;) asking about marking up items on Pinterest. It struck me that this would be a prime candidate for a Simplequiz, so here we are.</p>

<p><a href="http://pinterest.com">Pinterest</a>, for the uninitiated of you, allows you to organise and share things you love — mostly food, drink, and kittens.</p>

<figure>
  <img src="http://html5doctor.com/wp-content/uploads/2013/01/Pinterest-Home1.jpg" alt="Pinterest Homepage Screengrab" />
  <figcaption>A distinct lack of kittens on Pinterest&#8217;s homepage in this screengrab</figcaption>
</figure>

<p>We&#8217;re going to look at how to mark up a single pinned item, as shown below:</p>

<figure>
<img src="http://html5doctor.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-22-at-14.54.15.png" alt="Individual pinned item on Pinterest" /><img src="http://html5doctor.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-22-at-14.54.21.png" alt="Individual pinned item on Pinterest" />
  <figcaption>The item we&#8217;ll be marking up (bottom image is the hovered state)</figcaption>
</figure>

<p>The existing markup is below (I&#8217;ve simplified it a little to make it easier to read):</p>

<pre><code>&lt;div class="pin"&gt;
  &lt;div class="pin-holder"&gt;
    &lt;div class="actions"&gt;
      &lt;a href="#repin"&gt;Repin&lt;/a&gt;
      &lt;a href="#like"&gt;Like&lt;/a&gt;
      &lt;a href="#comment"&gt;Comment&lt;/a&gt;
    &lt;/div&gt;
    &lt;a href="me/cat/"&gt;
      &lt;img src="cat.jpg" alt="My awesome cat"&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;p&gt;Awesome cat description.&lt;/p&gt;
  &lt;p class="stats"&gt;
    &lt;span&gt;25 likes&lt;/span&gt;
    &lt;span&gt;2 comments&lt;/span&gt;
    &lt;span&gt;100 repins&lt;/span&gt;
  &lt;/p&gt;
  &lt;div class="convo"&gt;
    &lt;a href="/me/"&gt;
      &lt;img src="me.jpg" alt="Profile picture of me"&gt;
    &lt;/a&gt;
    &lt;p&gt;&lt;a href="/me/"&gt;Me&lt;/a&gt; onto &lt;a href="/here/"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>

<p>So, all&#8217;s well and good, but how should it be marked up in HTML5? As the saying goes, there are a hundred ways to skin a cat (excuse the pun). We&#8217;ve created five possible options, one of which achieved some consensus amongst the Doctors. Be warned: some of the differences between options are small and may be difficult to spot. Look carefully at each option!</p>

<p>Let us know which answer you would go with (or roll your own) in the comments. Make sure you show your working out. Also, please escape your HTML (or use pseudo code), or we’ll put a <del>severed unicorn head</del> <ins>skinned cat</ins> in your bed.</p>

<section id="answer-a">
  <h2>Answer A: <a class="permalink" href="#answer-a">#</a></h2>
  <p>An <code>&lt;article&gt;</code>, with <code>&lt;nav&gt;</code> and <code>&lt;aside&gt;</code> elements:</p>

  <pre><code>&lt;article class="pin"&gt;
  &lt;div class="pin-holder"&gt;
    &lt;nav class="actions"&gt;
      &lt;a href="#repin"&gt;Repin&lt;/a&gt;
      &lt;a href="#like"&gt;Like&lt;/a&gt;
      &lt;a href="#comment"&gt;Comment&lt;/a&gt;
    &lt;/nav&gt;
    &lt;a href="me/cat/"&gt;
      &lt;img src="cat.jpg" alt="My awesome cat"&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;p&gt;Awesome cat description.&lt;/p&gt;
  &lt;aside class="stats"&gt;
    &lt;span&gt;25 likes&lt;/span&gt;
    &lt;span&gt;2 comments&lt;/span&gt;
    &lt;span&gt;100 repins&lt;/span&gt;
  &lt;/aside&gt;
  &lt;article class="convo"&gt;
    &lt;a href="/me/"&gt;
      &lt;img src="me.jpg" alt="Profile picture of me"&gt;
    &lt;/a&gt;
    &lt;p&gt;&lt;a href="/me/"&gt;Me&lt;/a&gt; onto &lt;a href="/here/"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
&lt;/article&gt;</code></pre>
</section>

<section id="answer-b">
  <h2>Answer B: <a class="permalink" href="#answer-b">#</a></h2>
  <p>An <code>&lt;article&gt;</code>, with <code>&lt;aside&gt;</code> elements:</p>

  <pre><code>&lt;article class="pin"&gt;
  &lt;div class="pin-holder"&gt;
    &lt;aside class="actions"&gt;
      &lt;a href="#repin"&gt;Repin&lt;/a&gt;
      &lt;a href="#like"&gt;Like&lt;/a&gt;
      &lt;a href="#comment"&gt;Comment&lt;/a&gt;
    &lt;/aside&gt;
    &lt;a href="me/cat/"&gt;
      &lt;img src="cat.jpg" alt="My awesome cat"&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;p&gt;Awesome cat description.&lt;/p&gt;
  &lt;aside class="stats"&gt;
    &lt;span&gt;25 likes&lt;/span&gt;
    &lt;span&gt;2 comments&lt;/span&gt;
    &lt;span&gt;100 repins&lt;/span&gt;
  &lt;/aside&gt;
  &lt;article class="convo"&gt;
    &lt;a href="/me/"&gt;
      &lt;img src="me.jpg" alt="Profile picture of me"&gt;
    &lt;/a&gt;
    &lt;p&gt;&lt;a href="/me/"&gt;Me&lt;/a&gt; onto &lt;a href="/here/"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
&lt;/article&gt;</code></pre>
</section>

<section id="answer-c">
  <h2>Answer C: <a class="permalink" href="#answer-c">#</a></h2>
  <p>An <code>&lt;article&gt;</code>, with <code>&lt;nav&gt;</code>, <code>&lt;figure&gt;</code>, and <code>&lt;aside&gt;</code> elements:</p>

  <pre><code>&lt;article class="pin"&gt;
  &lt;div class="pin-holder"&gt;
    &lt;nav class="actions"&gt;
      &lt;a href="#repin"&gt;Repin&lt;/a&gt;
      &lt;a href="#like"&gt;Like&lt;/a&gt;
      &lt;a href="#comment"&gt;Comment&lt;/a&gt;
    &lt;/nav&gt;
    &lt;figure&gt;
      &lt;a href="me/cat/"&gt;
        &lt;img src="cat.jpg" alt="My awesome cat"&gt;
        &lt;figcaption&gt;Awesome cat description.&lt;/figcaption&gt;
      &lt;/a&gt;
    &lt;/figure&gt;
  &lt;/div&gt;
  &lt;aside class="stats"&gt;
    &lt;span&gt;25 likes&lt;/span&gt;
    &lt;span&gt;2 comments&lt;/span&gt;
    &lt;span&gt;100 repins&lt;/span&gt;
  &lt;/aside&gt;
  &lt;article class="convo"&gt;
    &lt;a href="/me/"&gt;
      &lt;img src="me.jpg" alt="Profile picture of me"&gt;
    &lt;/a&gt;
    &lt;p&gt;&lt;a href="/me/"&gt;Me&lt;/a&gt; onto &lt;a href="/here/"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
&lt;/article&gt;</code></pre>
</section>

<section id="answer-d">
  <h2>Answer D: <a class="permalink" href="#answer-d">#</a></h2>
  <p>A <code>&lt;section&gt;</code>, with <code>&lt;aside&gt;</code> and <code>&lt;figure&gt;</code> elements:</p>

  <pre><code>&lt;section class="pin"&gt;
  &lt;div class="pin-holder"&gt;
    &lt;aside class="actions"&gt;
      &lt;a href="#repin"&gt;Repin&lt;/a&gt;
      &lt;a href="#like"&gt;Like&lt;/a&gt;
      &lt;a href="#comment"&gt;Comment&lt;/a&gt;
    &lt;/aside&gt;
    &lt;figure&gt;
      &lt;a href="me/cat/"&gt;
        &lt;img src="cat.jpg" alt="My awesome cat"&gt;
        &lt;figcaption&gt;Awesome cat description.&lt;/figcaption&gt;
      &lt;/a&gt;
    &lt;/figure&gt;
  &lt;/div&gt;
  &lt;p class="stats"&gt;
    &lt;span&gt;25 likes&lt;/span&gt;
    &lt;span&gt;2 comments&lt;/span&gt;
    &lt;span&gt;100 repins&lt;/span&gt;
  &lt;/p&gt;
  &lt;div class="convo"&gt;
    &lt;a href="/me/"&gt;
      &lt;img src="me.jpg" alt="Profile picture of me"&gt;
    &lt;/a&gt;
    &lt;p&gt;&lt;a href="/me/"&gt;Me&lt;/a&gt; onto &lt;a href="/here/"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
&lt;/section&gt;</code></pre>
</section>

<section id="answer-e">
  <h2>Answer E: <a class="permalink" href="#answer-e">#</a></h2>
  <p>A <code>&lt;div&gt;</code>, with child <code>&lt;article&gt;</code> and <code>&lt;aside&gt;</code> elements:</p>

  <pre><code>&lt;div class="pin"&gt;
  &lt;article class="pin-holder"&gt;
    &lt;aside class="actions"&gt;
      &lt;a href="#repin"&gt;Repin&lt;/a&gt;
      &lt;a href="#like"&gt;Like&lt;/a&gt;
      &lt;a href="#comment"&gt;Comment&lt;/a&gt;
    &lt;/aside&gt;
    &lt;a href="me/cat/"&gt;
      &lt;img src="cat.jpg" alt="My awesome cat"&gt;
      &lt;p&gt;Awesome cat description.&lt;/p&gt;
    &lt;/a&gt;
  &lt;/article&gt;
  &lt;aside class="stats"&gt;
    &lt;span&gt;25 likes&lt;/span&gt;
    &lt;span&gt;2 comments&lt;/span&gt;
    &lt;span&gt;100 repins&lt;/span&gt;
  &lt;/aside&gt;
  &lt;div class="convo"&gt;
    &lt;a href="/me/"&gt;
      &lt;img src="me.jpg" alt="Profile picture of me"&gt;
    &lt;/a&gt;
    &lt;p&gt;&lt;a href="/me/"&gt;Me&lt;/a&gt; onto &lt;a href="/here/"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</section>

<p>Your answers below, please, with your rationale, by Tuesday, 29th January.</p><div class="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/html5-simplequiz-2-citing-people/" rel="bookmark" class="crp_title">HTML5 Simplequiz #2: citing people</a></li><li><a href="http://html5doctor.com/using-modernizr-to-detect-html5-features-and-provide-fallbacks/" rel="bookmark" class="crp_title">Using Modernizr to detect HTML5 features and provide fallbacks</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><li><a href="http://html5doctor.com/html5-simplequiz-5-urls-of-commenters/" rel="bookmark" class="crp_title">HTML5 Simplequiz 5: URLs of commenters</a></li><li><a href="http://html5doctor.com/u-element/" rel="bookmark" class="crp_title">The return of the u element</a></li></ul></div><p><a href="http://html5doctor.com/html5-simplequiz-7-pinterest/" rel="bookmark">Simplequiz #7: Pinterest</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on January 22, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/g3sI7_f13a0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-simplequiz-7-pinterest/feed/</wfw:commentRss>
		<slash:comments>60</slash:comments>
		<feedburner:origLink>http://html5doctor.com/html5-simplequiz-7-pinterest/</feedburner:origLink></item>
		<item>
		<title>Interview with Ian Hickson, HTML editor</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/E3mVc7x8t5g/</link>
		<comments>http://html5doctor.com/interview-with-ian-hickson-html-editor/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 13:58:20 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[interviews]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4868</guid>
		<description><![CDATA[Hot on the heels of our <a href="http://html5doctor.com/interview-with-robin-berjon-html5-editor/">interview with Robin Berjon</a>, editor of HTML5 at W3C, over the weekend I interviewed Ian Hickson, editor of HTML "The Living Standard" at WHATWG and, arguably, the most influential individual working on the Web today. Hickson, known as "Hixie", works for Google and previously worked for Opera (my employer) and Netscape.]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.publickey1.jp/blog/13/hixie_html5hixie.html">Japanese translation</a>, thanks <a href="http://twitter.com/jniino">Junichi Niino</a>.</p>
<p>Hot on the heels of our <a href="http://html5doctor.com/interview-with-robin-berjon-html5-editor/">interview with Robin Berjon</a>, editor of HTML5 at W3C, over the weekend I interviewed Ian Hickson, editor of HTML &#8220;The Living Standard&#8221; at WHATWG and, arguably, the most influential individual working on the Web today. Hickson, known as &#8220;Hixie&#8221;, works for Google and previously worked for Opera (my employer) and Netscape.</p>
<p>Some of questions were suggested by web developers over Twitter, where indicated.</p>
<figure>
  <img src="http://html5doctor.com/wp-content/uploads/2013/01/Ian_Hickson_at_CSS_Working_Group_Meeting_Day_Three.jpeg" alt="" width="201" height="211" class="aligncenter size-full" /></p>
<figcaption>Ian Hickson</figcaption>
</figure>
<dl>
<dt>If you could wipe out any web technologies from existence, which would you choose? (from @webr3)</dt>
<dd>
<p>HTML, JavaScript, DOM, anything I&#8217;ve ever invented, SVG, XML, JSON, CSS — basically anything that anyone uses! The Web technology stack is a complete mess. The problem is: what would you replace it with?</p>
<p>The Web&#8217;s technology stack is one of the only (maybe the only? I&#8217;m hard pressed to come up with another example) platform that is completely vendor-neutral and not centrally developed. Anyone can invent a new feature and if the market agrees, can get that feature to be a de facto part of the platform. <code>XMLHttpRequest</code> is a classic example. A browser cannot be a serious competitor on the Web without supporting it now, yet it was initially just made up and shipped by one vendor without any consultation with anyone. Even the features that are designed in public with wide review end up implemented and used before they&#8217;re &#8220;done&#8221;, and once they&#8217;re used they can&#8217;t be changed — which leads to APIs that make no sense, like <code>pushState()</code>, which has a required argument that is ignored.</p>
<p>The hardest part of this is that we can&#8217;t tell if something we&#8217;ve designed is any good without testing it in real world sites, and by the time it&#8217;s been properly tested, it&#8217;s too late to change it. <code>pushState()</code> happened like this (where we learnt that the second of the three arguments should be dropped only after there were already pages depending on using the first and third arguments), but there are even bigger examples: the CSS cascade and specificity mechanism, for example, which was a great idea but that doesn&#8217;t quite work at the end of the day, or even XML and specifically XML namespaces, which are widely recognised as a disaster but which whole layers of the Web platform depend on.</p>
<p>This isn&#8217;t helped by the way that certain parts of the platform that are now absolutely core central pillars, like JavaScript, essentially started as experiments; or the way that other features, like the offline application cache API, were designed with a very limited understanding of how authors would eventually use them. (Appcache works great if you want to do what it was designed for, but it turns out most people want     to do something different enough that appcache feels horrible to them.)</p>
<p>In the end, the most horrible parts of the Web are also the most successful, because it&#8217;s the most successful parts that get extended by the most people, and so that have the least coordination in terms of their long-term evolution, which is how things end up being horrible.</p>
</dd>
<dt>HTML5 vs. the &#8220;living standard&#8221;: how do I know which elements will be around ten years from now, so I can safely use them in client work? (from @szafranek)</dt>
<dd>
<p>You know what will be around ten years from now by looking at what is implemented in two browsers today. If it&#8217;s implemented in two browsers today, I can almost guarantee it&#8217;ll still be around in ten years. If it&#8217;s not, all bets are off.</p>
<p>This has nothing to do with &#8220;living standard&#8221; vs. versioned specs, though. HTML4 has all kinds of features that aren&#8217;t in HTML anymore — for example, <code>&lt;object declare&gt;</code> and <code>&lt;a coords&gt;</code>.</p>
</dd>
<dt>Do you feel there&#8217;s enough innovation within the user agent market, since most are virtually equivalent in every way? (From @webr3)</dt>
<dd>
<p>I don&#8217;t really agree with the premise of the question. Browsers differ in many important ways. One of the reasons they might seem to be &#8220;virtually equivalent&#8221;, though, is that they often adopt features from each other. Another is that one of the key features they&#8217;ve all been trying for is &#8220;get out of the way and let the Web shine through&#8221;, which means you see less and less of the browser itself.</p>
<p>In the area of browser development that I&#8217;m most familiar with — namely the Web technology stack — there&#8217;s a lot of innovation going on. I get a lot of e-mails from browser vendors asking me to spec their new invention so that it has a spec and can be implemented by everyone else also. In fact, it&#8217;s gotten to the point where I have to track these requests to make sure I only spec those with multiple vendors on board. (I don&#8217;t want to end up with a spec where each section is only implemented by one browser. That would be a waste of everyone&#8217;s time.)</p>
<p>The browser space right now has more active competition than it ever has had in the past, especially on desktops. It&#8217;s a great time for users.</p>
</dd>
<dt>Why are you the one who always says &#8220;no&#8221;? Casing the <code>&lt;picture&gt;</code> and <code>&lt;main&gt;</code> elements here (from @helloanselm). Why so grumpy? (from @steve_fenton)</dt>
<dd>
<p>The short answer is, it&#8217;s my job!</p>
<p>There&#8217;s really two questions here. First, why do we in general say &#8220;no&#8221; so often? And second, why is it that it&#8217;s so often me that says it?</p>
<p>The first one is a combination of prioritisation and design.</p>
<p>First, let&#8217;s look at prioritisation. There are very limited resources available to add features to the Web. Every feature has a cost:</p>
<ul>
<li>Implementation: someone has to write code for it in each browser</li>
<li>Testing: someone has to write the tests to check the feature is working</li>
<li>QA: someone has to regularly run the tests to make sure the feature doesn&#8217;t regress</li>
<li>Code maintenance: when browser vendors refactor code, they have to refactor more code if there are more features</li>
<li>Tutorials: people who write tutorials have to include the feature, or handle feedback asking for them to do so</li>
<li>Cognitive load: authors learning the platform have more documentation to wade through, even if they don&#8217;t care about the feature</li>
<li>Page maintenance: authors have to know how to maintain the feature if other people have used it in pages they now maintain</li>
<li>Spec writing: someone has to write the spec for the feature and ensure it&#8217;s maintained</li>
<li>Bug fixing: when bugs are found in the spec or implementations, they have to be maintained</li>
<li>Code size: each feature increases the size of browsers (both on-disk binaries and in-memory resident size)</li>
</ul>
<p>(This list comes from <a href="http://wiki.whatwg.org/wiki/FAQ#Where.27s_the_harm_in_adding.E2.80.94">our FAQ</a>.)</p>
<p>We get an absolute torrent of feature requests, from authors, users, browser vendors, etc. So we have to prioritise:</p>
<ul>
<li>Is the feature going to be implemented by more than one browser? If no browser has signed up, or if only one has signed up and no other browsers have shown any interest, then I add it to the <a href="http://wiki.whatwg.org/wiki/New_Features_Awaiting_Implementation_Interest">page of notes</a> I mentioned earlier, and move on.</li>
<li>Is the feature a game changer, or is it merely incremental? If the feature does no more than save a line of code every now and then, then its value probably doesn&#8217;t warrant its cost.</li>
<li>Is the feature compatible with the Web philosophy? If the request is for a way to force the user to read something the way the author wants, it&#8217;s likely to be a non-starter. If it&#8217;s something that enables the user to control the page better, that&#8217;s more likely to be a winner.</li>
<li>Is it more important than everything else? This is a great way to filter ideas: is your idea the most important thing we can do to improve the Web? There&#8217;s not always a direct tradeoff. The people who work on a browser&#8217;s JavaScript engine are often not the same people who work on a browser&#8217;s canvas API, for instance. But there&#8217;s always an opportunity cost — adding one feature means we won&#8217;t have the time or resources to add another.</li>
</ul>
<p>So that&#8217;s the first part of the answer: we say &#8220;no&#8221; because we don&#8217;t have time to add everything. <code>&lt;main&gt;</code> is a great example of this. In my opinion, the value it adds is so minimal that it just isn&#8217;t worth the cost.</p>
<p>Next, let&#8217;s look at design. The way we usually approach ideas is that we describe the problem, then we come up with solutions to the problem and compare them by evaluating them against the problem. This is where most concrete proposals run into a &#8220;no&#8221;, because something else got the &#8220;yes&#8221; instead.</p>
<p><code>&lt;picture&gt;</code> is an example of this. We described the problem (that took a few months of back and forth), and then once we had a problem description, I looked at the various proposals and synthesised a solution based on those that addressed the problems adequately while trying to avoid some common design pitfalls based on lessons we&#8217;d learnt from previous ideas. So for example with <code>&lt;picture&gt;</code>, we learnt with <code>&lt;video&gt;</code> and <code>&lt;source&gt;</code> that having multiple elements for selecting a resource is a huge design pitfall, so when designing a solution to the problem here, I avoided that (hence the <code>srcset=""</code> design based on CSS&#8217;s <code>image-set()</code> proposal).</p>
<p>So that&#8217;s the second part of the answer. We say &#8220;no&#8221; to some specific proposals because we&#8217;ve come up with other (better) solutions instead.</p>
<p>The second implicit question here was why do <em>I</em> say &#8220;no&#8221; so much, as opposed to other people. This is basically politics. It&#8217;s hard to say &#8220;no&#8221;, in part because of human nature, but also in part because when you say &#8220;no&#8221; in this kind of context you tend to invite argument. Most browser vendors don&#8217;t have time to have these arguments. I do. It&#8217;s my job, and I&#8217;ve gotten pretty good at saying &#8220;no&#8221; over the years. So a lot of the veteran browser engineers will just redirect people to me and expect me to say &#8220;no&#8221; for them. This lets them get on with their job of writing a browser, redirecting all the ire and arguments to me, whose job it is to field them. Or they&#8217;ll see an e-mail to the WHATWG list, think &#8220;oh my, that&#8217;s crazy&#8221;, but just stay silent because &#8220;Hixie will deal with it&#8221;.</p>
<p>In reality, I can&#8217;t really say either &#8220;yes&#8221; or &#8220;no&#8221;. What I say doesn&#8217;t mean anything: I don&#8217;t write any browsers. The browser vendors say &#8220;no&#8221; to me all the time by not implementing what I&#8217;ve specced. Just last week I revamped part of the spec (on context menus) because none of the browser vendors implemented it. One of the specs I spent years of my life on — XBL2 — has gone precisely nowhere because the browser vendors just don&#8217;t want to implement it. (My main mistake with XBL was trying to solve the whole problem at once, rather than doing it in incremental steps that implementors could more easily deal with.)</p>
<p>Similarly, there&#8217;s stuff that was never specced, indeed stuff that I&#8217;ve said &#8220;no&#8221; to myself, which the browser vendors nonetheless implemented. Again with the context menu example: Gecko implemented it by having an element called <code>&lt;menuitem&gt;</code>, which I argued forcefully was a bad design. They disagreed with my arguments and implemented it anyway, and so (eventually) I updated the spec to have <code>&lt;menuitem&gt;</code>. (This isn&#8217;t a criticism of Mozilla. It&#8217;s how these things are done. They did nothing wrong here.)</p>
</dd>
<dt>Do you feel there&#8217;s enough feedback from HTML authors, rather than vendors, getting through to specification editors/authors? (from @webr3)</dt>
<dd>
<p>I don&#8217;t know about &#8220;enough&#8221;. Is there ever &#8220;enough&#8221; feedback?</p>
<p>We do get a lot of feedback from Web developers, but it&#8217;s true that most of it has to be collected by seeking it out on forums, sites like Reddit, Twitter, Google+, people&#8217;s blogs, etc. I have some Google Alerts that lead me to a lot of places where people are complaining about HTML in one way or another, which I use as feedback. It&#8217;s almost certainly not enough. I wish we had more authors participating directly by either filing bugs or participating in the WHATWG list. People probably don&#8217;t realise how much feedback we get from developers, because they don&#8217;t see me reading the blogs and so on. Also, a lot of the feedback browser vendors send us is actually of the form &#8220;Web developers tell us that…&#8221; (though they often don&#8217;t say that explicitly).</p>
<p>The problem, to be honest, is that most authors don&#8217;t know what they want. Many years ago, Google actually paid for a usability study for one of the features I was speccing (microdata) and it was absolutely fascinating to see how people&#8217;s actual performance was so divergent from their impressions. We&#8217;d ask them questions like, &#8220;Which would be simpler, this or that?&#8221;, and then we&#8217;d actually test them by having them use the options, and there was just no relationship between what people said they wanted and what people were actually able to use.</p>
<p>Often when people send feedback (not just authors; pretty much anyone who hasn&#8217;t been in the process for a long time starts this way), they send feedback along the lines of &#8220;I want to add feature X&#8221; or &#8220;I want feature X to be extended in manner Y&#8221;. But when we drill down and ask them, &#8220;What problem are you trying to solve?&#8221;, or, &#8220;What&#8217;s your use case?&#8221; (same question but phrased differently), we often find that either (a) they actually don&#8217;t have a real problem and just thought that it would be a good idea, or (b) their solution wouldn&#8217;t actually solve their problem. Often we&#8217;re able to come up with much simpler solutions (or point to already existing solutions), which is quite satisfying.</p>
</dd>
<dt>Two and a half years ago, <a href="http://www.webstandards.org/2009/05/13/interview-with-ian-hickson-editor-of-the-html-5-specification/">I asked you, &#8220;Would you like to be the HTML 6 editor?&#8221;</a>. You replied, &#8220;I might want a change of pace when we&#8217;re done with HTML 5.&#8221; How come you decided not to take that holiday and continue editing HTML?</dt>
<dd>
<p>We&#8217;re not done yet. I still have 238 e-mails and 163 bugs remaining.</p>
</dd>
<dt>Do you have an exit strategy, or would you like to edit HTML for the forseeable future?</dt>
<dd>
<p>Well, I could stop any time, really. So long as I find it interesting and implementors respect my work, though, why stop? We have a severe lack of spec writers who are able to write good specs.</p>
</dd>
<dt>For styling form components, we were told to wait for XBL, then to wait for Web Components. Anne van Kesteren said, &#8220;After a decade of waiting for this, I think it might be time to start calling this vaporware.&#8221; Thoughts?</dt>
<dd>
<p>If anyone has a better proposal, I&#8217;m all ears.</p>
</dd>
<dt>You work for Google, which has a widely deployed browser, a mobile operating system, and massive web properties. Do your employers require you to align specifications to their business objectives or otherwise influence your specification decisions?</dt>
<dd>
<p>No, quite the opposite. When I started, I was given very explicit instructions to the effect that I should put the Web&#8217;s long-term interests ahead of any of Google&#8217;s short-term interests.</p>
<p>Having said that, of course, one of the reasons I wanted to work for Google is the unique perspective one can get from working here and from having access to the data Google has. There&#8217;s no question that that has influenced my decisions.</p>
</dd>
<dt>Do you have other duties apart from specification?</dt>
<dd>
<p>I basically work on the HTML spec full-time, but yes, I have some <a href="http://ian.hixie.ch/career/resume.html">other duties</a> internally.</p>
</dd>
<dt>Is the Web Platform becoming too complex (Web Components, shadow DOM, etc.)? </dt>
<dd>
<p>Too complex for what?</p>
</dd>
<dt>For the amateur with something to say, rather than professional coder? Or new entrants — e.g., <a href="http://the-pastry-box-project.net/geri-coady/2013-january-3/">Geri Coady&#8217;s Pastry Box article</a>?</dt>
<dd>
<p>The platform has been too complex for any one person to fully understand for a long time already. Heck, there are parts of the Web platform that I haven&#8217;t even tried to grok — for example, WebGL or IndexDB — and parts that I continually find to be incredibly complicated despite my efforts at understanding them — like the Unicode bidirectional text algorithm or the subtler aspects of JavaScript&#8217;s prototype model. I&#8217;m pretty sure most authors don&#8217;t understand the precise details of margin collapsing in the presence of floats and divs with <code>clear</code> set, or the inline box model.</p>
<p>This isn&#8217;t surprising, though. If you define the &#8220;Windows&#8221; platform as everything from the NT kernel API to the Direct3D API and everything in between, I&#8217;m pretty sure you&#8217;d quickly come to the conclusion that nobody understood that whole platform either.</p>
<p>I don&#8217;t think this is a problem.</p>
</dd>
<dt>The WHATWG began because the W3C told you, &#8220;HTML was dead. If you want to do something like HTML5, you should go elsewhere.&#8221; Now that the W3C has come to its senses, is it time for the WHATWG to hang up its spurs and for its participants to work inside W3C to continue the development of the web platform?</dt>
<dd>
<p>We tried (2007–2012). It didn&#8217;t work out. In fact, we ended up spinning more specs out of the W3C! The WHATWG has about <a href="http://whatwg.org/specs/">12 specs</a> spread amongst eight or so editors now.</p>
</dd>
<dt>In what sense didn&#8217;t it work out, and why?</dt>
<dd>
<p>We have different priorities, different visions, different approaches. I&#8217;m probably not the right person to give an objective answer, though.</p>
</dd>
<dt>You seem to have most of your spats with people who work in the field of accessibility. Why is that?</dt>
<dd>
<p>I don&#8217;t know. I wish I did.</p>
</dd>
<dt>You told me, &#8220;People with disabilities are just as important to me in my work on HTML5 as is anyone else&#8221;, but I guess they would say you don&#8217;t pay enough attention to the needs of disabled people (<code>longdesc</code>, table <code>summary</code>, re-writing rules for alt text). Presumably therefore you feel that disabled people are better served by removing these features. What do you base that assumption on?</dt>
<dd>
<p>The premise of the question is that there&#8217;s one accessibility community that speaks with one voice and has one opinion, and that they entirely represent the exact homogeneous desires of all disabled people. But none of that is true. There are multiple Web standards accessibility communities. People within those communities often don&#8217;t agree with each other. There are lots of disabled people with lots of different opinions and different needs. The accessibility communities don&#8217;t always represent all the disabled people&#8217;s needs. And so forth.</p>
<p>Taking the specific features you list:</p>
<ul>
<li><code>longdesc=""</code> is a solution in search of a problem, which virtually no author uses, and which those who do use almost entirely use incorrectly, and which therefore users have long ignored. Discouraging its continued use means authors are more likely to spend time on things that are more likely to improve accessibility. Mark Pilgrim, author of &#8220;Dive Into Accessibility&#8221;, <a href=" http://blog.whatwg.org/the-longdesc-lottery">wrote a post about this</a>.</li>
<li>Table summaries: check out the <a href="http://whatwg.org/html/#the-table-element">HTML spec for &lt;table&gt;</a>. The first paragraph says that <code>&lt;table&gt;</code> is for representing tabular data (incidentally discouraging the use of <code>&lt;table&gt;</code> for layout tables, which is good for accessibility). The second paragraph says what tabular data is (a grid). The third paragraph provides a link to the section that defines what the table model is. The fourth paragraph encourages authors to &#8220;provide information describing how to interpret complex tables&#8221; and links to <em>an entire section</em> describing how to give table summaries. That section has six different suggestions for how to do it.</li>
<li>Rules for alternative text for images: the section on <code>&lt;img&gt;</code> first says that <code>&lt;img&gt;</code> represents an image, then briefly says that how you give the URL for the image (it goes into more detail for that again later), and then the <em>third sentence</em> points at the section on <code>alt=""</code> — which consists of literally a dozen different subsections on how best to give alternative text for images in a wide variety of cases. When this was first written, it was probably by far the most detailed description for how to write alternative text ever published.</li>
</ul>
<p>So we didn&#8217;t remove two of those three features. We expanded them dramatically. The one feature we removed was really a misfeature, and we have the data to back that up.</p>
</dd>
<dt>What&#8217;s been your biggest mistake? What are you most proud of?</dt>
<dd>
<p>I&#8217;m probably most proud of the HTML parser specification. Years ago it seemed like such a preposterously absurd task to take on that I said I would never do it. And it was huge (and we&#8217;re not quite done yet; there&#8217;s at least one major outstanding bug). But this, more than anything, has been the crowning achievement of the HTML spec. We went from a world where four browser engines had four completely different approaches with radically different behaviours in every edge case, to a world where the browsers agree so closely on their behaviour that we have an almost unheard of level of interoperability. There have been academic papers written about it. It&#8217;s completely changed how we write parser specifications, and I expect the knock-on effects on other specs will continue for years. It used to be that people said that specs should only define how to parse conforming content and should do so in a declarative fashion. But now saying that sounds hopelessly naive and old-fashioned.</p>
<p>My biggest mistake…there are so many to choose from! <code>pushState()</code> is my favourite mistake, for the sheer silliness of ending up with an API that has a useless argument and being forced to keep it because the feature was so desired that people used it on major sites before we were ready to call it done, preventing us from changing lest we break it. <code>postMessage()</code>&#8216;s security model is so poorly designed that it&#8217;s had academic papers written about how dumb I was, so that&#8217;s a pretty big mistake. (It&#8217;s possible to use <code>postMessage()</code> safely. It&#8217;s just that the easiest thing to do is not the safe way, so people get it wrong all the time.) The appcache API is another big mistake. It&#8217;s the best example of not understanding the problem before designing a solution, and I&#8217;m still trying to fix that mess.</p>
<p>At the less-technical and more-political level, I think taking WebSockets to the IETF was a huge mistake. It ended up delaying the spec for literally a year without any resulting improvements, and they made a number of changes that IMHO reduce the protocol&#8217;s security. (Again, it&#8217;s possible to use it safely, it&#8217;s just not as easy as it was before the IETF got involved. Ironically, they broke the very things we learnt to do right after getting them wrong with <code>postMessage()</code>.) We&#8217;re still waiting for things like compression and multiplexing, which we would probably have had a long time ago if we hadn&#8217;t gone to the IETF.</p>
<p>Also, when I designed the Web Storage API I made a horrible mistake by making the API synchronous and requiring consistency during a script&#8217;s execution, which essentially became the one place in the whole Web platform where, in theory, browsers are required to block cross-process. Since browsers don&#8217;t implement that, we instead have an API where there&#8217;s no consistency guarantee, which is rather scary.</p>
<p>Outside of the HTML spec, one of my biggest mistakes was not realising, back when I was first in the CSS working group, that specifications were not immutable. CSS2 had these vague rules about margin collapsing and about the inline box model which David Baron and I took as essentially immutable constraints around which we were to strictly define the margin collapsing model and the inline box model. We succeeded, in that now the spec has mostly well-defined models for both those things, but boy are they insanely complicated. What we should have done instead is just break the constraints and come up with something simpler, ideally something that more closely matched what browsers implemented at the time.</p>
<p>One of the side-effects of that kind of thinking (not directly my mistake, though I didn&#8217;t argue against it as far as I recall) is that we ended up with &#8220;Quirks Mode&#8221; and DOCTYPE switching. What we should have done is just made the specs match browsers and not bothered with all these modes.</p>
<p>I also made mistakes with the Acid tests, wherein I tested things that the specs required but which in retrospect it would have been better to ignore, which ended up encouraging browsers to implement things that we later realised it would have been better all around if we had skipped. Some of those we were able to mitigate, others not so much. Acid3 had some stuff around SVG fonts that we should have never had. Acid2 had some crazy stuff around SGML comments that we were thankfully later able to totally abandon.</p>
<p>I made a number of mistakes in the development of XBL2 (as mentioned earlier), but since the result of those mistakes was that it&#8217;s getting ignored, the only real long-term cost has been the opportunity cost and delay in getting a solution in that space.</p>
<p>I&#8217;m sure I&#8217;m forgetting some huge mistake I&#8217;ve made that everyone is yelling at me for. (I asked for suggestions for this question on IRC, and after we were done enumerating a bunch of mistakes, Anne asked, &#8220;That&#8217;s a long list. Why do we trust this guy again?&#8221; D&#8217;oh.)</p>
</dd>
<dt>Urban geek legend has it that you invented Web Sockets because you wanted to control your model trains through the browser and couldn&#8217;t. True or false?</dt>
<dd>
<p>Obviously there&#8217;s a lot of demand for something like Web Sockets, so it&#8217;s not like it was only because I want to control my trains that we worked on that, but it was definitely a key motivating factor for me. Without Web Sockets I was forced to use hanging GETs and all the other techniques people will be familiar with, which introduces precious milliseconds of latency that can be so destructive when you have two locomotives speeding towards each other. I&#8217;ve since used Web Sockets in pretty much every non-trivial development project I&#8217;ve done.</p>
</dd>
<dt>You specified microdata, which even you dislike, because RDFa was ugly and hard to write…</dt>
<dd>
<p>It&#8217;s not so much that I dislike microdata so much as I don&#8217;t think the problem microdata (and RDF, etc.) solves is an interesting problem that should be solved. Of course, enough people think it is a problem that should be solved that I approached it like all the other problems. It&#8217;s a good example of how the HTML spec is not just a reflection of my wishes.</p>
</dd>
<dt>…The WHATWG shot across RDFa&#8217;s bow worked. <a href="http://manu.sporny.org/2012/mythical-differences/">RDFa Lite now does everything microdata does</a>, while also being compatible with Facebook&#8217;s Open Graph Protocol…</dt>
<dd>
<p>RDFa Lite doesn&#8217;t do everything microdata does. There&#8217;s a number of things that microdata does (or doesn&#8217;t do) that are absolutely key:</p>
<ul>
<li>not have anything to do with RDF</li>
<li>not have any support for any prefixing mechanism</li>
<li>have integration with the drag-and-drop API</li>
</ul>
<p>There are probably others, too, but I haven&#8217;t studied RDFa Lite carefully.</p>
</dd>
<dt>Why is &#8220;not have anything to do with RDF&#8221; key?</dt>
<dd>
<p>It&#8217;s where microdata and microformats get most of their simplicity compared to RDF-based technologies.</p>
</dd>
<dt>…To avoid fragmentation, are you going to withdraw microdata as a spec, add an RDFa API, and use RDFa Lite instead? If not, why not?</dt>
<dd>
<p>Well, at this point microdata is in wide use, so there&#8217;s no way to remove it even if we wanted to. But since RDFa still doesn&#8217;t solve the same problems, it hasn&#8217;t come up.</p>
<p>RDFa (or rather, RDF) and microdata have fundamentally different data models. RDF is a triple (quad, really) database. Microdata represents tree structures. Microdata has more in common with JSON than RDF.</p>
<dt>What are your thoughts on angle brackets…</dt>
<dd>
<p>They&#8217;re pointy? I don&#8217;t know. Are angle brackets something people have thoughts on?</p>
</dd>
<dt>…and how does HTML stand up to JSON? (from @pal_nes)</dt>
<dd>
<p>Different solutions to different problems.</p>
<p>JSON&#8217;s missing one major feature that I wish it would get, which is defined error handling (even if it&#8217;s only XML-style &#8220;you must abandon the parse if it there is an error&#8221;). Right now, handling of broken JSON seems to vary from parser to parser.</p>
<p>Other than that, I like JSON and often use it. I think people get very attached to generic syntaxes, though. Sometimes the best syntax is just newline-separated strings in a plain text file. Sometimes it&#8217;s a nested tree like JSON. Other times it&#8217;s a nested annotated tree like XML. Sometimes it&#8217;s a binary bitmap. I think people shy away from defining their own syntaxes more than they should. Writing a parser is easy and is a very, <em>very</em> well studied part of computer science. Using something like JSON makes sense if what you want to serialise is a static JavaScript structure with no cross-references. If your data structure is something else, then using JSON doesn&#8217;t generally make more sense than using a dedicated format — either way, you&#8217;re going to have to get the data out and piece it back together into your own internal representation.</p>
<p>Also, often when people define generic syntaxes, they go a bit crazy. When you&#8217;re defining a dedicated format (or a vocabulary for a generic format, same thing really), you usually don&#8217;t have time to go crazy and define wild features, because your motivation is to solve your original problem and designing the language is a necessary evil, not the end goal.</p>
</dd>
<dt>Is it a problem if people have no markup in the <code>&lt;body&gt;</code> and generate the DOM with script?</dt>
<dd>
<p>It&#8217;s obviously a problem for users who have scripting disabled, but other than that, it&#8217;s just an authoring choice.</p>
<p>There are significant advantages to having a static description of markup. You can validate it, for example, to catch semantic errors (such as accidentally putting an <code>&lt;input&gt;</code> in a <code>&lt;select&gt;</code> instead of using <code>&lt;option&gt;</code>). HTML these days has several features to make it easier to do this while writing a Web app — e.g., <code>hidden=""</code>, DOM cloning, etc.</p>
<p>But equally there are advantages to generating things from script. For one, if you want to generate several instances of something, right now the easiest way is to describe the structure in JavaScript calls with the data you want to substitute into your template being right there.</p>
<p>Personally, when I write Web apps (mostly games), I tend to use static HTML for the parts of the app that don&#8217;t change or that only appear once, and JavaScript calls to generate the parts that appear more than once. For example, one of the games I&#8217;m working on has a list of maps, and so the <code>&lt;ol&gt;</code> for the list is hard-coded in the HTML, but the <code>&lt;li&gt;</code>s are generated dynamically.</p>
</dd>
<dt>Talking of script, what do you think of DART?</dt>
<dd>
<p>I haven&#8217;t studied it (or the newer JS proposals, for that matter) enough to have an opinion. If it&#8217;s intended to replace JavaScript as the Web&#8217;s language, they have an uphill battle ahead of them, though. Replacing any part of the Web is extremely hard.</p>
<p>I wrote about <a href="https://plus.google.com/107429617152575897589/posts/SiLdNL9MsFw">the difficulty of replacing the whole Web</a> last year. Replacing any part of the Web (as opposed to extending it) is similar in difficulty, though on a proportionally smaller scale.</p>
</dd>
<dt>How do you think the long-term development of devices and interaction models will impact the development of web standards? (from @wcagtest)</dt>
<dd>
<p>I don&#8217;t think it&#8217;ll affect the development at all. There&#8217;s no difference between new interaction models and any other new feature. The Web and Web standards themselves will obviously be impacted, but I have no idea how. I&#8217;m fascinated to find out how the Web will evolve in the face of projects like Google&#8217;s Glass or devices like the Pebble.</p>
<p>I am sad that the Web didn&#8217;t handle small screens — and later, touch UI — that well. I would&#8217;ve hoped that the Web&#8217;s media-independent nature would have made that work better. For small screens, honestly, I mostly blame Web designers for assuming big screens and not thinking flexibly. We&#8217;re seeing that change now. For touch, though, I wish we had done a better job of mapping the UI to the Web&#8217;s generic events. A touch gets mapped to a &#8220;click&#8221; event easily enough, but drag-and-drop never got mapped, pinch gestures didn&#8217;t get mapped to wheel events, etc. Mainly I think this is because the first truly successful touch browser set the standard, and it was developed mostly in secret with a small team many of whom, as I understand it, weren&#8217;t Web veterans.</p>
</dd>
<dt>Will native apps triumph over the Web on mobile devices?</dt>
<dd>
<p>Native platforms and the Web have very different characteristics. The Web is by design radically vendor-neutral, and (to a lesser extent in practice) device-neutral. This has huge benefits: nobody can single-handedly kill the Web, for example. If you write a Web page or application today, and then tomorrow your desktop operating system vendor or your mobile phone handset vendor goes bankrupt, you can just buy another device and your page still works. If you target a proprietary platform — e.g., Amiga or OS/2 — that then loses the support of its vendor, the result is that your application is no longer usable.</p>
<p>The <em>cost</em> of having a system immune from the whims of a single vendor is that by and large, innovation doesn&#8217;t happen in multi-vendor discussions. If you have a proprietary platform, it&#8217;s easy to add features to it: you just do it. No need to argue with anyone. On the Web, a feature can only be added if every major implementor agrees it&#8217;s worth adding, and that usually only happens once it&#8217;s been proven in a native platform. So native platforms have the edge when things are rapidly innovating.</p>
<p>This is why the mobile world today has so much focus on native apps. Every new generation brings radical new features, and the Web will always be behind on those. So the cutting edge is native.</p>
<p>You can see this on the desktop. Innovation on desktop operating systems has slowed down dramatically, and as a result the Web has been able to mature there. The result is that on desktop, Web apps are doing great (so great that it&#8217;s viable to create a desktop OS that does nothing but bring up a Web browser, in fact). Mobile is where desktop was a decade or two ago, in terms of innovation.</p>
</dd>
<dt>What&#8217;s the biggest danger to a free, open Web at the moment?</dt>
<dd>
<p>Patents.</p>
</dd>
<dt>What&#8217;s the very next thing on your to-do list?</dt>
<dd>
<p>The top thing on my bugs list is &#8220;Spec for document.open() doesn&#8217;t match reality when the parser is script-created&#8221;. That sounds like a hard one. Let&#8217;s see…top thing on my e-mail pile right now is…some even harder stuff do with the HTML parser and feedback from [Boris Zbarsky] about some very subtle aspects of the security implications of certain DOM APIs. Yikes. Maybe I&#8217;ll do lunch instead…</p>
</dd>
<div class="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/interview-with-robin-berjon-html5-editor/" rel="bookmark" class="crp_title">Interview with Robin Berjon, HTML5 editor</a></li>
<li><a href="http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/" rel="bookmark" class="crp_title">Interview with Steve Faulkner: HTML5 editor and new doctor</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-living-standard/" rel="bookmark" class="crp_title">HTML as a Living Standard — For and Against</a></li>
<li><a href="http://html5doctor.com/html5-for-web-developers/" rel="bookmark" class="crp_title">HTML5 for Web Developers</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/interview-with-ian-hickson-html-editor/" rel="bookmark">Interview with Ian Hickson, HTML editor</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on January 8, 2013.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/E3mVc7x8t5g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/interview-with-ian-hickson-html-editor/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		<feedburner:origLink>http://html5doctor.com/interview-with-ian-hickson-html-editor/</feedburner:origLink></item>
		<item>
		<title>Review: Pro HTML5 Accessibility by Joshue O Connor</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/r5xWDAS8N6w/</link>
		<comments>http://html5doctor.com/review-pro-html5-accessibility-by-joshue-o-connor/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 10:00:48 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[oconnor]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4830</guid>
		<description><![CDATA[TL;DR: this is a good book, let down by a bad tech editor and a publisher who has low production values. ]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.apress.com/9781430241942">Pro HTML5 Accessibility</a> is an exhaustive book. Author Joshue O Connor is senior accessibility consultant with National Council for the Blind of Ireland&#8217;s Centre for Inclusive Technology and a stalwart of many W3C working groups.</p>
<p>Don&#8217;t be afraid of the title. The book doesn&#8217;t assume that you&#8217;re a professional accessibility expert &#8211; quite the opposite; the first 100 pages don&#8217;t really deal with HTML5 at all, but survey the landscape of disability, assitive technologies and W3C WAI-ARIA. The last chapters of the book usefully survey testing methodologies and tools which will be invaluable to the lone developer told &#8220;oh, and it must be accessible/ DDA-/508-compliant, too&#8221;.</p>
<p>Joshue does an admirable job of explaining how to use HTML5/ARIA to make sites accessible, and gives a thorough overview of how current browsers communicate new widgets (date pickers, sliders, video controls etc) to assistive technology now, rather than in some glorious unspecified future. </p>
<p>He writes engagingly, too: &#8220;Remember that the <code>&lt;div&gt;</code> and <code>&lt;span&gt;</code> elements are semantically neutral elements. They have no meaning, poor things, and are merely empty hooks—ciphers for you to do with what you will. They cheer up to no end when you give them meaning. Existential crisis averted!&#8221;</p>
<p>I also appreciated Joshue&#8217;s pragmatism: &#8220;Good semantics are really important, but real-world accessibility is very nuanced—particularly for new content and element types. However, bear in mind that an unencoded ampersand (which will throw a validation error) never resulted in an inaccessible webpage.&#8221;</p>
<p>However, I didn&#8217;t understand &#8220;Having some heading structure, rather than none, on a web document is far more important than merely ensuring the headings are ordered in the correct way.&#8221; Surely &#8220;merely ensuring the headings are ordered in the correct way&#8221; is exactly the same as &#8220;having some heading structure rather than none&#8221;?</p>
<figure>
<img src="http://html5doctor.com/wp-content/uploads/2012/12/A9781430241942-3d_2.png" alt=""  width="277" height="350" class="aligncenter size-full wp-image-4845" /></p>
<figcaption><a href="http://www.apress.com/9781430241942"><cite>Pro HTML5 Accessibility</cite> by Joshue O Connor</a></figcaption>
</figure>
<p>It&#8217;s also unclear to me why the author chose to markup buttons to control a video player as</p>
<pre> 
<code>&lt;div id="back" tabindex="0"&gt;
&lt;img src="player/back_button.png" role="button" alt="Jump Back" /&gt;
&lt;/div&gt;
</code>
</pre>
<p>rather than simply use a <code>&lt;button&gt;</code> element which by default has a role of button and is focussable. But it doesn&#8217;t much matter; it gets the job done.</p>
<p>There are some errors which the technical editor should have picked up. Chapter 3 says &#8220;JavaScript has some event handlers that can be activated only by using the mouse, such as onClick&#8221;, which <a href="http://websiteaccessibility.donaldevans.com/2011/06/30/when-does-onclick-work-with-the-keyboard-enter-key/">isn&#8217;t strictly true</a>. The same chapter also says &#8220;IE 9 doesn’t support the <code>&lt;video&gt;</code> element&#8221;, which is just wrong: it does. A cursory code-test would have shown that chapter 5&#8242;s example <code>&lt;img scr="myserver/usful_andgroovy_image.png"&gt;</code> won&#8217;t work, as there is no <code>scr</code> attribute (it&#8217;s obviously a typo for <code>src</code>).</p>
<p>The most significant failing of the book isn&#8217;t the author&#8217;s fault: it&#8217;s  the lack of love for presentation that I&#8217;ve found endemic in all Apress books lately. For example, the tables in chapter 5 could easily have been formatted for a more attractive presentation, but they look exactly as a basic Word document. Similarly, the multi-page bulleted lists could easily have been a single, multi-column page.</p>
<p>It looks as if Apress just doesn&#8217;t care about quality, which is incomprehensible from a publisher. In a publishing environment where ebooks have advantages such as portability, searchability, updateability in case of errors,  dead-tree publishers need to work hard to ensure their products remain competitive. They need to play to the traditional strengths of print: beautiful layouts, colours, good design and high-quality paper. We see these in books from Five Simple Steps, Smashing Magazine and A Book Apart. I&#8217;ve only seen a PDF of this book, but a previous physical Apress book I own has a paper quality redolent of 1970s East German toilet paper. Certainly Apress has expended no effort at all to lay out the pages for a pleasant read.</p>
<p>That rant aside, the content of this book will be invaluable to a developer new to the world of accessibility, trying to use  modern web standards. </p>
<div class="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/review-html5-designing-rich-internet-applications/" rel="bookmark" class="crp_title">Review: HTML5 Designing Rich Internet Applications</a></li>
<li><a href="http://html5doctor.com/review-html5-multimedia-develop-and-design/" rel="bookmark" class="crp_title">Review: HTML5 Multimedia: Develop and Design</a></li>
<li><a href="http://html5doctor.com/reviewing-html5-for-web-designers/" rel="bookmark" class="crp_title">Reviewing HTML5 for Web Designers</a></li>
<li><a href="http://html5doctor.com/resources/" rel="bookmark" class="crp_title">HTML5 Doctor Resources</a></li>
<li><a href="http://html5doctor.com/review-the-truth-about-html5-for-web-designers/" rel="bookmark" class="crp_title">Review: The Truth About HTML5 For Web Designers</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/review-pro-html5-accessibility-by-joshue-o-connor/" rel="bookmark">Review: Pro HTML5 Accessibility by Joshue O Connor</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on December 11, 2012.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/r5xWDAS8N6w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/review-pro-html5-accessibility-by-joshue-o-connor/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://html5doctor.com/review-pro-html5-accessibility-by-joshue-o-connor/</feedburner:origLink></item>
		<item>
		<title>Taking Web Audio Offline in iOS 6 Safari</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/-3n4CEK4L_A/</link>
		<comments>http://html5doctor.com/taking-web-audio-offline-in-ios-6-safari/#comments</comments>
		<pubDate>Tue, 27 Nov 2012 13:30:20 +0000</pubDate>
		<dc:creator>Alex Gibson</dc:creator>
				<category><![CDATA[JavaScript APIs]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[offline]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4812</guid>
		<description><![CDATA[Playing cached audio for offline use on iOS Safari has long been a challenge that has proved to be mission impossible. But with the advent of the WebKit-only, it is now finally achievable — although you still need to jump through a few hoops.]]></description>
				<content:encoded><![CDATA[<p>Playing cached audio for offline use on iOS Safari has long been a challenge that has proved to be <a href="http://happyworm.com/blog/2012/05/29/playing-web-audio-offline-on-mobile-safari-mission-impossible/">mission impossible</a>. But with the advent of the (WebKit-only) <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html">Web Audio API</a>, it is now finally achievable — although you still need to jump through a few hoops.</p>

<p>The bad news is that you still can&#8217;t cache an MP3 file using <a href="http://html5doctor.com/go-offline-with-application-cache/">Application Cache</a> and then simply load it using an <code>XmlHttpRequest</code>. Safari on iOS 6 will cache the MP3 but then refuse to play it and fail silently (how useful!).</p>

<p>But all is not lost…</p>

<p><section id="base64">
<h2>Base64 to the Rescue <a href="#base64" class="permalink">#</a></h2></p>

<p>Because the Web Audio API offers developers direct control over the <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode">AudioBuffer</a>, you can now convert data formats on-the-fly and feed them directly to the Web Audio API for playback. For example, if you encode an MP3 file as a Base64 string, you can then decode it to an <a href="https://developer.mozilla.org/en/JavaScript_typed_arrays/ArrayBuffer">ArrayBuffer</a> and convert the raw audio data.
</section></p>

<p><section id="encoding">
<h2>Encoding an Audio File <a href="#encoding" class="permalink">#</a></h2></p>

<p>You can easily convert an MP3 file to a Base64 string using <a href="http://www.openssl.org/">OpenSSL</a>. If you are on Mac OS X, it comes pre-installed, so just open up Terminal.app and type the following command:</p>

<p><figure></p>

<pre><code>openssl base64 -in [infile] -out [outfile]
</code></pre>

<p></figure></p>

<p>Make sure to replace <code>[infile]</code> with the path to your MP3 and <code>[outfile]</code> with your chosen destination for the encoded data.</p>

<p>This will output a Base64-encoded string representation of your sound file. You can then cache the string using any form of web storage you choose (e.g., <a href="http://html5doctor.com/go-offline-with-application-cache/">Application Cache</a>, <a href="http://html5doctor.com/storing-data-the-simple-html5-way-and-a-few-tricks-you-might-not-have-known/">localStorage</a>, or <a href="http://html5doctor.com/introducing-web-sql-databases/">webSQL</a>).
</section></p>

<p><section id="decoding">
<h2>Base64 to ArrayBuffer <a href="#decoding" class="permalink">#</a></h2></p>

<p>In order to decode the Base64 string back into an <code>ArrayBuffer</code>, you&#8217;ll need to use a custom method. Check out Daniele Guerrero&#8217;s <a href="https://github.com/danguer/blog-examples/blob/master/js/base64-binary.js">base64-binary.js</a> as a good script that can be used exactly for this purpose. It decodes a Base64 string into a <a href="https://developer.mozilla.org/en/JavaScript_typed_arrays/Uint8Array">Uint8Array</a> typed array and stores it in an <code>ArrayBuffer</code>.</p>

<p>Once this is done, you can simply decode the audio data using the Web Audio API&#8217;s <code>decodeAudioData()</code> method:</p>

<p><figure></p>

<pre><code>var buff = Base64Binary.decodeArrayBuffer(sound);

myAudioContext.decodeAudioData(buff, function(audioData) {
  myBuffer = audioData;
});
</code></pre>

<p></figure></p>

<p>Once you have the audio data decoded, pass it to your audio buffer source and play the sound:</p>

<p><figure></p>

<pre><code>mySource = myAudioContext.createBufferSource();
mySource.buffer = myBuffer;
mySource.connect(myAudioContext.destination);
mySource.noteOn(0);
</code></pre>

<p></figure></p>

<p></section></p>

<p><section id="demo">
<h2>Full Demo and Source Code <a href="#demo" class="permalink">#</a></h2></p>

<p>Check out the <a href="http://alxgbsn.co.uk/offlinewebaudio/">online demo</a> and <a href="https://github.com/alexgibson/offlinewebaudio">source code</a> for a complete example of the techniques discussed in this article.
</section></p>

<p><section id="support">
<h2>Browser Support <a href="#support" class="permalink">#</a></h2></p>

<p>Currently the demo works in Safari 6, Chrome Desktop, and iOS 6 Safari. The technique has potential to work in any browser that supports Web Audio API, so hopefully Chrome Mobile can soon add support as well.</p>

<p>The W3C is currently pursuing the Web Audio API <a href="http://www.w3.org/2011/audio/wiki/W3C_Audio_Publications_and_Milestones">as a standard</a>.
</section>
<div class="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/multimedia-troubleshooting/" rel="bookmark" class="crp_title">Multimedia Troubleshooting</a></li><li><a href="http://html5doctor.com/native-audio-in-the-browser/" rel="bookmark" class="crp_title">Native Audio in the browser</a></li><li><a href="http://html5doctor.com/go-offline-with-application-cache/" rel="bookmark" class="crp_title">Go offline with application cache</a></li><li><a href="http://html5doctor.com/drag-and-drop-to-server/" rel="bookmark" class="crp_title">Drag and Drop and Automatically Send to the Server</a></li><li><a href="http://html5doctor.com/server-sent-events/" rel="bookmark" class="crp_title">Server-Sent Events</a></li></ul></div></p>
<p><a href="http://html5doctor.com/taking-web-audio-offline-in-ios-6-safari/" rel="bookmark">Taking Web Audio Offline in iOS 6 Safari</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on November 27, 2012.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/-3n4CEK4L_A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/taking-web-audio-offline-in-ios-6-safari/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://html5doctor.com/taking-web-audio-offline-in-ios-6-safari/</feedburner:origLink></item>
		<item>
		<title>Interview with Robin Berjon, HTML5 editor</title>
		<link>http://feedproxy.google.com/~r/html5doctor/~3/2SDlAnmgzjs/</link>
		<comments>http://html5doctor.com/interview-with-robin-berjon-html5-editor/#comments</comments>
		<pubDate>Tue, 13 Nov 2012 14:05:26 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[interviews]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=4788</guid>
		<description><![CDATA[At the recent Apps World expo in London, Doctor Bruce spoke on a panel with Robin Berjon, recently appointed W3C HTML5 editor. He took the opportunity to ask Robin some questions on process, living standards and male grooming.]]></description>
				<content:encoded><![CDATA[<p>At the recent Apps World expo in London, Doctor Bruce spoke on a panel with Robin Berjon, recently appointed W3C HTML5 editor. He took the opportunity to ask Robin some questions on process, living standards and male grooming.</p>
<figure> <img class="aligncenter size-full wp-image-4796" src="http://html5doctor.com/wp-content/uploads/2012/11/berjon.jpg" alt="Bruce Lawson and Robin Berjon" width="300" height="321" /><br />
<figcaption>Bruce and Robin</figcaption>
</figure>
<p>&nbsp;</p>
<dl>
<dt>Tell us about yourself.</dt>
<dd>My name is Robin Berjon (<a href="http://twitter.com/robinberjon">@robinberjon</a>, <a href="http://berjon.com/">berjon.com</a>) and I live in Paris with wife, daughter, and cat. I&#8217;ve been hacking Web and open source stuff since 1996. A little over ten years ago I started becoming involved in standards with the hope of helping make hacking with Web technology as cool as I thought it could be. I hadn&#8217;t realised that &#8220;as cool as it could be&#8221; would be notion prone to evolving so fast over time.</p>
</dd>
<dt>How long have you been editor of HTML5?</dt>
<dd>Since September, so a touch over two months by now.</p>
</dd>
<dt>But isn&#8217;t Hixie editor?</dt>
<dd>Hixie is the editor of the WHATWG HTML specification; I&#8217;m part of the W3C team of HTML editors. Essentially the same source document is used by everyone, but we produce different views on it. The WHATWG view is a single document containing features at varying levels of maturity; the W3C publishes that document as multiple separate specifications and currently focuses on a more stable subset of features.</p>
<p>It&#8217;s a big document — there&#8217;s room enough for a broad community to collectively figure out the future of HTML.</p>
</dd>
<dt>What does the job entail? Just tidying up and getting tests written? Isn&#8217;t that terribly boring?</dt>
<dd>Our goal is two-fold. First, we are on track to producing a stable snapshot of HTML5 by 2014. The first step in getting there is to produce a draft that is ready for intensive testing, which is the next step in the W3C process. In parallel, we will shortly start publishing drafts on the HTML.next track (also known as HTML 5.1) including a number of new features. This basically corresponds to switching to something that resembles software development best practices in which one can choose either to use a stable release or the nightly build.</p>
<p>Based on the stable snapshot, we will ramp up our testing effort in earnest. To some, testing is a tedious occupation but I beg to differ. With testing, you get to break stuff. And other people&#8217;s stuff, too! And those people then thank you for it. Remember all that time spent working around browser bugs? Well with specification testing you get to turn that around, find the bugs instead of avoid them, and then wait as the browser vendors fix them. It&#8217;s Web developer payback time!</p>
<p>And there&#8217;s a host of things to be done for HTML 5.1 such as <a href="http://www.w3.org/community/fixing-appcache/">fixing AppCache</a> (with our friends from WebApps) or evaluating the various proposals for responsive images. There&#8217;s no point in waiting for a finished specification to start work on the next one, and one thing that I find particularly exciting is that a lot of the novel stuff is exciting tech that&#8217;s brought to us by the community.</p>
</dd>
<dt>It&#8217;s not all just mopping up, though, is it? You&#8217;re already looking at new features. For example, W3C is considering &lt;picture&gt; element; WHATWG isn&#8217;t. Is there a danger of differing specs for the same markup language?</dt>
<dd>I&#8217;m not really worried about differing specifications because there&#8217;s a reality test: what&#8217;s really implemented out there? If you have two specifications saying different things about the same feature, and that feature happens to be reasonably reliably implemented, then one of those specifications is wrong. And it&#8217;s pretty hard to stay relevant while being wrong.</p>
<p>I would actually like to see more variation in input rather than less. It can be rather daunting for a group of Web people who care a lot about one specific feature to start contributing to any standards group. A lot goes on there, there tends to be a fair bit of email, the mailing list&#8217;s culture can be hard to grasp even if it&#8217;s not downright aggressive. This puts a high bar on such contributions, high enough that it is too rarely turned into a reality.</p>
<p>At the same time, it is difficult for even seasoned Web hackers to draft specification text without input from browser vendors and experienced standardistas, which in turn can lead to frustration as carefully crafted and nurtured work is turned down.</p>
<p>So we need to figure out how to make this type of group working on a specific improvement work more easily, more often. We already have a lot of the technical infrastructure with Community Groups, but getting the human bits to work is always the hardest part. I think that the work going on in the <a href="http://www.w3.org/community/respimg/">Responsive Images Community Group</a> is a truly great experiment (even if it means occasional drama) and that the experience they are building up will serve to guide a lot of subsequent groups working in a similar fashion.</p>
<p>I bring this up because successful open projects are those that can keep bringing in new contributors over time. The Web standards community as a whole needs to do a better job there — and we will! So no, I&#8217;m not worried about differing specs. So long as we can figure out how to get all the browsers on the same page one way or another, the more input the sexier.</p>
</dd>
<dt>I recall someone saying that 20,000 test cases will be needed? That&#8217;s a lot &#8211; how are you going to do it all?</dt>
<dd>It&#8217;s probably a fair bit more than 20,000 since we already have over 11,000 and aren&#8217;t anywhere near satisfied yet. But the exact number is not as important as the fact that the number will be big. In order to pull this off, it would be tremendously helpful to benefit from broad community involvement.</p>
<p>And as it happens, that&#8217;s precisely something that&#8217;s been ramping up. You&#8217;re of course familiar with Move The Web Forward, the grassroots movement that&#8217;s pushing for a better Web. A part of that is <a href="http://testthewebforward.org/">Test The Web Forward</a>. It&#8217;s a series of events specifically dedicated to making the Web a better place for all through testing. There was a first event in San Francisco last summer, and we&#8217;ve just recently had one in Beijing this week, and another in Paris. The TestTWF folks are looking into more events in other locations, so if you&#8217;re interested in having one in your city make your voice heard.</p>
<p>What happens there is that we kick off with a few presentations to explain how testing works, and then we all get our hands dirty in a hackathon with ample help from testing experts. For developers it&#8217;s a<br />
great way to learn more about Web technologies and to get involved in a project that gives back to the Web. Plus: payback!</p>
<p>I was at the Paris TestTWF a couple weeks ago, and I have to say that I&#8217;ve been overwhelmed with how good the participants were. The turn-out was great, and people there just showed up, asked great questions, and immediately started crunching on tests. It&#8217;s not as if I didn&#8217;t already know that the Web community rocks, but it&#8217;s still amazing to see just how much people care and how dedicated so many are to improving the Web.</p>
</dd>
<dt>The w3c has &#8220;chopped up&#8221; HTML into modular specs; WHATWG hasn&#8217;t. Why?</dt>
<dd>A lot of people, including spec reviewers, test writers, and implementers have told us that they find it easier to handle smaller specifications because they&#8217;re easier to swap into one&#8217;s brain, and because you can more easily have someone work on a well-defined area. I think that <a href="http://www.w3.org/QA/2008/01/modularity.html">Tim Berners-Lee explained it well a few years ago</a>.</p>
<p>Of course, a lot of the Web platform is intricately meshed together so that cutting things into smaller pieces can be difficult, and at times risks hiding vital information. This is particularly true of existing features; for new features we certainly intend to try hard to make things as modular as possible. That&#8217;s why we expect a lot of the new features developed in the HTML WG to be created as extension<br />
specifications. This does not mean that they have lesser status that the “core” HTML specification, rather it becomes a logical, modular way of adding new functionality. It also makes it easier for third parties, such as smaller, more focused communities or even individuals with a good ideas, to provide very concrete input that can more readily be reviewed by the group. Great examples of this include the <a href="http://responsiveimages.org/">Responsive Images work</a> or the <a href="https://dvcs.w3.org/hg/html-extensions/raw-file/tip/maincontent/index.html">&lt;main&gt; element</a>.</p>
<p>At the end of the day a lot of it boils down to taste, or perhaps more importantly to how your work in relation to those specifications is organised. If you&#8217;re working on all of it at once, it may be simpler to keep it all in one place; but if you&#8217;re trying split work off in a larger team you might prefer some predefined boundaries between documents. At least that&#8217;s the impression I get from the input people provide whenever this topic crops up. As far as I&#8217;m concerned I find that the extension specification model is more conducive to community contributions and so it definitely has my preference.</p>
</dd>
<dt>Why do we need W3C snapshots and versions, instead of a &#8220;living standard&#8221;?</dt>
<dd>It&#8217;s a big Web out there and a lot of people are involved in it in different ways. Again, whether you prefer snapshots or the bleeding edge document likely depends on what you&#8217;re doing with it. If you&#8217;re continuously working on and with the spec, producing snapshots is a drag. At the other end of the spectrum if you&#8217;re burning the implementation into silicon and you need to interoperate with others who are doing the same, you want something that&#8217;s almost literally carved in stone. In between those extremes, the specifics of your situation as a user of the spec will make you fall on either side of the fence.</p>
<p>One of the notable costs of a document that changes continuously is that for any work you do with it you need to track it with equal continuity, which can be quite taxing. In order to enable more loosely coordinated work on improving the Web platform, producing snapshots (e.g. for test writing or implementing) can help a fair bit.</p>
<p>It&#8217;s important to notice that stability is important for legal reasons: companies like to know what their commitments are and what others have committed as well. W3C&#8217;s <a href="http://www.w3.org/2004/02/05-patentsummary.html">Royalty-Free patent policy</a> helps ensure that these commitments make it possible for anyone to implement Web standards without paying royalties. Snapshots help us keep the Web free.</p>
<p>That&#8217;s why we&#8217;re working on making both possible in parallel. The setup we&#8217;ve progressively been putting together enables us to have a continuously updated document and snapshots taken from it at regular intervals. This just might be one of those cases in which we can actually make everyone happy.</p>
</dd>
<dt>You&#8217;ve put the <a href="https://github.com/w3c/html">HTML spec on github</a>. Why?</dt>
<dd>We wanted to go with git anyway since its branching features are a great match for the approach we&#8217;re taking in which we have a stable branch that is used to produce snapshots and a more advanced branch into which new features go.</p>
<p>If you mix that with our desire to involve the community more in the standards process, then GitHub was the logical choice: that&#8217;s where our community is.</p>
</dd>
<dt>Do you communicate much with WHATWG? Some of them aren&#8217;t great fans of W3C.</dt>
<dd>Several of us hang out permanently on the #whatwg channel, and on the WHAT&#8217;s mailing lists. I can&#8217;t say that it has been anything other than friendly and pleasant.</p>
<p>Some people in the WHAT community have criticism of how the W3C operates. A lot of that criticism is constructive, and I am more than happy to relay it inside. W3C has a long history of doing the right thing with respect to opening up the standards process (e.g. with its RF policy or working in public). I&#8217;m confident that the consortium will continue in this vein, even if it can occasionally take time for some things to change.</p>
<p>And on the rare occasions when such criticism veers towards trolling, everyone&#8217;s experienced enough with online discussion not to bite.</p>
</dd>
<dt>Is it time for Hixie et al to disband WHATWG and return HTML to the W3C fold, now they&#8217;ve won?</dt>
<dd>You&#8217;d really have to ask them that!</p>
<p>The WHATWG has certainly done an astounding job of bringing HTML back to life and making it the biggest blip on anyone&#8217;s radar. I don&#8217;t think that that necessarily entails that it should close shop just yet, if ever. As I said, I believe we should ideally have more decentralised work on improvement, not less — even if it&#8217;s difficult.</p>
</dd>
<dt>Is it true that Tim Berners-Lee comes to you for tips on male grooming?</dt>
<dd>I can&#8217;t possibly disclose the list of those who come to me for advice, but it is certainly true that since my breakthrough feature in GQ France an increasing number of Web hackers have been asking how to approach the ruggedly handsome magnetism of these roguish good looks.</p>
</dd>
</dl>
<p>Thank you very much Robin. (Evidence of Robin&#8217;s &#8220;ruggedly handsome magnetism&#8221; may be seen in his <a href="http://vimeo.com/52750334">TPAC dance-off</a>.)
<div class="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/interview-steve-faulkner-html5-editor-new-doctor/" rel="bookmark" class="crp_title">Interview with Steve Faulkner: HTML5 editor and new doctor</a></li>
<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/interview-with-ian-hickson-html-editor/" rel="bookmark" class="crp_title">Interview with Ian Hickson, HTML editor</a></li>
<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/html5-adaptive-images-end-of-round-one/" rel="bookmark" class="crp_title">HTML5 adaptive images: end of round one</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/interview-with-robin-berjon-html5-editor/" rel="bookmark">Interview with Robin Berjon, HTML5 editor</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on November 13, 2012.</p>
<img src="http://feeds.feedburner.com/~r/html5doctor/~4/2SDlAnmgzjs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/interview-with-robin-berjon-html5-editor/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://html5doctor.com/interview-with-robin-berjon-html5-editor/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.423 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-26 03:37:50 -->
