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

<channel>
	<title>HTML 5</title>
	<atom:link href="http://www.htmlfive.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.htmlfive.net</link>
	<description>A central location for HTML5 news and updates</description>
	<lastBuildDate>Tue, 31 Aug 2010 10:55:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>XHTML5 in a nutshell</title>
		<link>http://www.htmlfive.net/xhtml5-in-a-nutshell/</link>
		<comments>http://www.htmlfive.net/xhtml5-in-a-nutshell/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:51:58 +0000</pubDate>
		<dc:creator>Sergey Mavrody</dc:creator>
				<category><![CDATA[Syntax]]></category>
		<category><![CDATA[WHATWG]]></category>
		<category><![CDATA[What's Next]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=2878</guid>
		<description><![CDATA[The WHATWG Wiki portal has a nice section describing HTML vs. XHTML differences, as well as specifics of a polyglot HTML document that also would be able to serve HTML5 document as valid XML document. I'd like to review what it takes to transform an HTML5 polyglot document into a valid XHTML5 document: it appears, [...]]]></description>
			<content:encoded><![CDATA[<p>The WHATWG Wiki portal has a nice section describing HTML vs. XHTML differences, as well as specifics of a polyglot HTML document that also would be able to serve HTML5 document as valid XML document. I'd like to review what it takes to transform an HTML5 polyglot document into a valid XHTML5 document: it appears, finally the 'XHTML5' has become an official name.</p>

<p>The W3C first public working draft of "Polyglot Markup" recommendation describes <em>polyglot </em>HTML document as a document that conforms to both the HTML and XHTML syntax by using a common subset of both the HTML and XHTML and in a nutshell the HTML5 polyglot document is:</p>
<ul>
	<li>HTML5 doctype/namespace</li>
	<li>XHTML well-formed syntax</li>
</ul>
Polyglot document could serve as either HTML or XHTML, depending on browser support and MIME type. A polyglot HTML5 code essentially becomes XHTML5 document if it is served with the XML MIME type <code>application/xhtml+xml</code> .

In a nutshell the XHTML5 document is:
<ul>
	<li>HTML doctype/namespace: The <code>&lt;!DOCTYPE html&gt;</code>
definition is optional, but it would be useful in a polyglot document by  preventing browser quirks mode.</li>
	<li>XHTML well-formed syntax</li>
	<li>XML MIME type: <code> application/xhtml+xml</code>.
This MIME declaration is not visible in the source code, but it would appear in the HTTP Content-Type header that could be configured on the server. Of course, the XML MIME type is not yet supported by the current version Internet Explorer though IE can render XHTML documents.</li>
	<li>Default XHTML namespace: <code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</code></li>
	<li>Secondary namespace such as SVG, MathML, Xlink, etc. To me this is like a test, if you don’t have a need for these namespaces  in your document, then the use of XHTML is overkill in the first place.</li>
</ul>
Finally, the basic XHTML5 document would look like this:
<div style="margin-top: 15px;padding: 0 40px">
<blockquote><code> </code>
<div><span style="color: #888888">&lt;!DOCTYPE html&gt;</span></div>
<code> </code>
<div>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</div>
<code> </code>
<div style="padding-left: 15px">&lt;head&gt;</div>
<code> </code>
<div style="padding-left: 30px">&lt;title&gt;&lt;/title&gt;</div>
<div style="padding-left: 30px"><span style="color: #888888">&lt;meta charset="UTF-8" /&gt;</span></div>
<p style="padding-left: 15px">&lt;/head&gt;</p>
<code> </code>
<div style="padding-left: 15px">&lt;body&gt;</div>
<div>
<div>
<div style="padding-left: 30px"><span style="color: #888888">&lt;svg xmlns="http://www.w3.org/2000/svg"&gt;</span></div>
<div style="padding-left: 60px"><span style="color: #999999">&lt;rect stroke="black" fill="blue" x="45px" y="45px" width="200px" height="100px" stroke-width="2" /&gt;</span></div>
<div style="padding-left: 30px"><span style="color: #888888">&lt;/svg&gt;</span></div>
</div>
</div>
<div style="padding-left: 15px">&lt;/body&gt;</div>
<div>&lt;/html&gt;</div></blockquote>
</div>
<p>The XML declaration <code>&lt;?xml version=”1.0” encoding=”UTF-8”?&gt;</code> is not required if the default UTF-8 encoding is used: an XHTML5 validator would not mind if it is omitted. However it is strongly recommended to configure the encoding using server HTTP <code>Content-Type</code> header, otherwise this character encoding could be included in the document as part of a meta tag <code>&lt;meta charset="UTF-8" /&gt;</code>. This encoding declaration would be needed for a polyglot document so that it will be treated as UTF-8 if served as either HTML or XHTML.</p>

<p>The <em>Total Validator Tool</em> - Firefox plugin/desktop app has now the user-selectable option for XHTML5-specific  validation.</p>
<p style="margin-bottom: 40px">I would say that the main advantage of using XHTML5 would be the ability to extend HTML5 to XML-based technologies such as SVG and MathML. The disadvantage is the lack of Internet Explorer support, more verbose code, and error handling. Unless we need that extensibility, HTML5 is the way to go.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/xhtml5-in-a-nutshell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Rationale document</title>
		<link>http://www.htmlfive.net/html5-rationale-document/</link>
		<comments>http://www.htmlfive.net/html5-rationale-document/#comments</comments>
		<pubDate>Mon, 10 May 2010 17:15:46 +0000</pubDate>
		<dc:creator>Eitan Adler</dc:creator>
				<category><![CDATA[Syntax]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=2443</guid>
		<description><![CDATA[I've started a page on the wiki to document the rationale for the decisions made about the HTML specification. There are two goals for this document: Explain why things are the way they are Explain the difference between multiple similar elements by providing example usages. One person can not possibly write the entire thing so [...]]]></description>
			<content:encoded><![CDATA[<p>I've started a page on the wiki to document the <a href="http://wiki.whatwg.org/wiki/index.php?title=Rationale">rationale</a> for the decisions made about the HTML specification. </p>

<p>There are two goals for this document:
<ol>
<li>Explain why things are the way they are</li>
<li>Explain the difference between multiple similar elements by providing example usages.</li>
</ol>
</p>

<p>One person can not possibly write the entire thing so I hope that this becomes a group process where anyone interested can contribute so go <a href="http://wiki.whatwg.org/index.php?title=Special:UserLogin&amp;type=signup">sign up</a>, <a href="http://wiki.whatwg.org/index.php?title=Special:UserLogin">log in,</a> and <a href="http://wiki.whatwg.org/index.php?title=Rationale&amp;action=edit">edit</a><!--???,PROFIT-->.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/html5-rationale-document/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s next in HTML, episode 2: who&#8217;s been peeing in my sandbox?</title>
		<link>http://www.htmlfive.net/whats-next-in-html-episode-2-whos-been-peeing-in-my-sandbox/</link>
		<comments>http://www.htmlfive.net/whats-next-in-html-episode-2-whos-been-peeing-in-my-sandbox/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 08:01:44 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[What's Next]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1238</guid>
		<description><![CDATA[The topic this week is sandboxing untrusted content.]]></description>
			<content:encoded><![CDATA[<p>Welcome back to &#8220;What&#8217;s Next in HTML,&#8221; where I&#8217;ll try to summarize the major activity in the ongoing standards process in the WHAT Working Group. With <a href="http://blog.whatwg.org/html5-at-last-call">HTML5 in Last Call</a>, the WHATWG has <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-January/024708.html">moved to an unversioned development model</a> for HTML. While browser vendors <a href="http://blog.chromium.org/2010/01/more-resources-for-developers.html">are busy implementing HTML5</a>, let&#8217;s talk about what&#8217;s next.</p>

<p>The big news in HTML this week is <a href="http://html5.org/tools/web-apps-tracker?from=1642&amp;to=1643">r1643</a>. ... Well, technically that revision is over 20 months old, but there have been a flurry of updates that affect the underlying feature. What feature, you might ask? <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox">Sandboxing untrusted content</a>.</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox">
<p>The <code>sandbox</code> attribute, when specified [on an <code>&lt;iframe></code> element], enables a set of extra restrictions on any content hosted by the iframe. ... When the attribute is set, the content [hosted by the iframe] is treated as being from a unique origin, forms and scripts are disabled, links are prevented from targeting other browsing contexts, and plugins are disabled.</p>
</blockquote>

<p>This could be useful for all kinds of scenarios. The HTML5 spec lists some examples of blog comments, but I think that&#8217;s mostly a red herring. Think about what&#8217;s hosted in iframes today: third-party advertising and <a href="http://www.google.com/ig">third-party widgets</a>. In each case, a web author wants to embed something on their page that they have little or no control over. In practice, that usually works fine. Advertising iframes don&#8217;t do anything (except display ads). Most widgets are well-behaved, and most widget frameworks (like <a href="http://www.google.com/ig/directory?synd=open">Google Gadgets</a>) enforce terms of service that forbid widgets from &#8220;taking over&#8221; the parent page in which they are embedded. Still, that&#8217;s a social/legal solution, not a technical one. Sandboxing is a complementary technical solution, where the parent page can actually tell the browser &#8220;Hey, I don&#8217;t fully trust this thing, but I&#8217;m embedding it anyway. Can you reduce its privileges?&#8221;</p>

<p>What privileges? Well, by default, &#8220;sandboxed&#8221; iframes can not</p>

<ul>
<li>access the <abbr title="Document Object Model">DOM</abbr> of the parent page (technically speaking, because the iframe is relegated to a different &#8220;origin&#8221; than the parent page)</li>
<li>execute scripts</li>
<li>embed their own forms, or manipulate forms via script</li>
<li>read or write cookies, local storage, or local SQL databases</li>
</ul>

<p>There are ways for the parent page to add back each of these privileges, if the third-party content needs it.</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox">
<p>[The <code>sandbox</code> attribute&#8217;s] value must be an unordered set of unique space-separated tokens. The allowed values are <code>allow-same-origin</code>, <code>allow-forms</code>, and <code>allow-scripts</code>. The <code>allow-same-origin</code> keyword allows the content to be treated as being from the same origin instead of forcing it into a unique origin, and the <code>allow-forms</code> and <code>allow-scripts</code> keywords re-enable forms and scripts respectively (though scripts are still prevented from creating popups).</p>
</blockquote>

<p>So it&#8217;s a security feature. You could restrict an advertising iframe to have no privileges whatsoever, but you could give a widget iframe privileges to execute its own scripts or embed its own forms.</p>

<h4 id="security-is-hard-lets-go-shopping">If it&#8217;s a security feature, won&#8217;t older browsers still be insecure?</h4>

<p>Yes. Well, no more than they are now. In fact, very few browsers support the <code>sandbox</code> attribute today, so we&#8217;re not just talking about users of older browsers &mdash; we&#8217;re talking about pretty much everyone. But that&#8217;s OK. The <code>sandbox</code> attribute is designed to be an incremental security feature. It&#8217;s an <em>additional</em> layer of security, not the only layer. Browsers have supported iframes for a long time, and thousands of web authors are using them despite the very real risks of embedding untrusted content. Advertising networks can and have been hacked; malicious widgets can and have been published; bad actors can and do try to do bad things to as many people as possible until they&#8217;re caught and taken down. You need to keep doing all the things you&#8217;re doing now to prevent iframe-based attacks. Then add <code>sandbox</code>, too.</p>

<h4 id="only-defense">I can&#8217;t do any filtering or sanitizing. Can I rely solely on browser-based sandboxing?</h4>

<p>Someday, you might &mdash; <em>might!</em> &mdash; be able to throw out all your sanitizing code and rely solely on the <code>sandbox</code> attribute. Of course, you can&#8217;t do that today, because users of older browsers would still be vulnerable. So we need a &#8220;clean break&#8221; solution &mdash; a way to serve untrusted content to supporting browsers while absolutely, positively, 100% ensuring that older browsers never render the untrusted content under any circumstances. Enter the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/iana.html#text/html-sandboxed"><code>text/html-sandboxed</code> MIME type</a>.</p>

<p>All HTML pages are served with the <code>text/html</code> MIME type. It&#8217;s part of the HTTP headers, normally invisible to end users, but nevertheless sent by web servers every time a client requests a page. Every resource type (images, scripts, CSS files) has its own MIME type. <em>Untrusted content could have its own MIME type.</em> And this is where <code>text/html-sandboxed</code> comes in. If my web server serves up an HTML page with a MIME type of <code>text/html</code>, your browser will render it. If my web server serves up the same HTML page with a MIME type of <code>text/html-sandboxed</code>, you browser will download it (or offer to download it). Your browser doesn&#8217;t recognize that MIME type, so it falls back to the default action, which is to download it and save it as a file on your local disk. We can use this behavior to our advantage.</p>

<p>As browsers start supporting the <code>sandbox</code> attribute, they can also start supporting the <code>text/html-sandboxed</code> MIME type. What does it mean to &#8220;support&#8221; this new MIME type? If a user navigates directly to a page served with the new MIME type, don&#8217;t do anything special. Just download it, which is what happens already. BUT... if the user navigates to a page that includes an <code>&lt;iframe></code> element, AND the iframe has a <code>sandbox</code> attribute, AND the <code>src</code> of the iframe points to an HTML page that is served with the <code>text/html-sandboxed</code> MIME type, THEN render the iframe as normal (but still subject to the restrictions listed in the <code>sandbox</code> attribute).</p>

<p>Older browsers will download (or offer to download) the untrusted content. From a security perspective, that&#8217;s a good thing &mdash; at least, it means the content won&#8217;t be rendered as HTML. From a usability perspective, that&#8217;s terrible. Who wants to go to a page and suddenly have the browser offering to download a bunch of useless files? That means that you won&#8217;t really be able to use this technique until all users have upgraded to a browser that supports both the <code>sandbox</code> attribute and the <code>text/html-sandboxed</code> MIME type. That will be... a while. But it might happen someday!</p>

<h4 id="inlining-is-hard-lets-go-shopping">Iframes suck. Can&#8217;t I just include the untrusted content inline?</h4>

<p>There have been a number of proposals for a <code>&lt;sandbox></code> <em>element</em>, which you could wrap around untrusted content. All such proposals suffer fatal flaws, stemming from how today&#8217;s browsers parse HTML markup. You, the author who wants to &#8220;wrap&#8221; untrusted content, would need to ensure that the content did not &#8220;break out&#8221; of the sandbox. For instance, it could include an <code>&lt;/sandbox></code> element. (Hey, it&#8217;s untrusted! That&#8217;s why we&#8217;re here in the first place.) There are a surprising number of variations of markup that are recognized as end tags (having to do with inserting whitespace characters in strange places), and you would be responsible for sanitizing all of these variations. Furthermore, you would need to ensure that the untrusted content did not include a script that called <code>document.write()</code>, which could be used for writing out a matching <code>&lt;/sandbox></code> end tag programmatically. Think about the number of ways that script could be obfuscated, and pretty soon you&#8217;re asking individual web authors to solve <a href="http://en.wikipedia.org/wiki/Halting_problem">the halting problem</a> just to wrap some untrusted content.</p>

<p>If a wrapper element is the wrong solution, what&#8217;s the right one? This is where the &#8220;flurry of updates&#8221; has been happening. The current solution is <a href="http://html5.org/tools/web-apps-tracker?from=4618&amp;to=4619">r4619: the <code>srcdoc</code> attribute</a> (with minor updates in <a href="http://html5.org/tools/web-apps-tracker?from=4622&#038;to=4623">r4623</a>, <a href="http://html5.org/tools/web-apps-tracker?from=4623&amp;to=4624">r4624</a>, and <a href="http://html5.org/tools/web-apps-tracker?from=4625&amp;to=4626">r4626</a>). The best way to explain it is by example:</p>

<pre><code>&lt;iframe sandbox srcdoc="&lt;p>Markup in an attribute, woohoo!&lt;/p>">&lt;/iframe></code></pre>

<p>Yeah, that&#8217;s pretty janky. But it has the following nice qualities:</p>

<ul>
<li>The &#8220;sandbox&#8221; is an attribute value, not children of a wrapper element. That means the only thing you need to escape is quotation marks.</li>
<li>Legacy browsers just ignore it and render nothing at all.</li>
</ul>

<p>It also has the following not-so-nice qualities:</p>

<ul>
<li>The &#8220;sandbox&#8221; is an attribute value. Markup in an attribute? Srsly? Puke.</li>
<li>Legacy browsers render nothing at all.</li>
<li>When you&#8217;re assembling this markup on the server side, there&#8217;s no way to know in advance whether the browser will render it or not. Except User-Agent sniffing... ick.</li>
</ul>

<p>There is one exception to that last rule. There are <a href="http://bitworking.org/news/2009/07/comment-system-review">a few comment systems that are entirely client-side</a>. That is, the comments are not part of the page markup that comes down from the web server; they are programmatically added after the page is rendered. Such comment systems could use JavaScript-based feature detection to check whether the browser supported the <code>srcdoc</code> attribute, and write out the appropriate markup either way. I wrote the book on HTML5 feature detection. (<a href="http://diveintohtml5.org/detect.html">No really! A whole fscking book!</a>) Detecting <code>srcdoc</code> support would use <a href="http://diveintohtml5.org/detect.html#techniques">detection technique #2</a>:</p>

<pre><code>if ("srcdoc" in document.createElement("iframe")) { ... }</code></pre>

<p>But this would only help in the case where you were adding untrusted content to the page at runtime, on the client side. Server-side cases will have to wait until everybody upgrades.</p>

<h4 id="when-can-i-use">So when can I use all this stuff?</h4>

<p>Hahahahahaha. You must be new here.</p>

<h4 id="no-really-when-can-i-use">No really, when?</h4>

<p>There are several pieces here, each with their own compatibility story.</p>

<ol>
<li><b>The <code>sandbox</code> attribute</b>, for reducing privileges of untrusted content. Chromium and Google Chrome support the <code>sandbox</code> attribute (I tested the dev channel version 4.0.302.3); Safari, Firefox, Internet Explorer, and Opera ignore it. So you can start using the <code>sandbox</code> attribute today &mdash; just be sure to test in Chromium or Google Chrome to ensure you&#8217;ve set the sandbox privileges properly. It won&#8217;t have any effect in other browsers, but that&#8217;s OK. Remember, the <code>sandbox</code> attribute isn&#8217;t designed to be your only line of defense; it&#8217;s a complement to your existing defenses. Keep doing whatever you&#8217;re doing now (sanitizing input, auditing code, enforcing legal terms with your partners, etc), then add <code>sandbox</code> for extra protection.</li>
<li><b>The <code>text/html-sandboxed</code> MIME type</b>, for ensuring that users can&#8217;t navigate to untrusted content. There are two parts to this. First, browsers must not render pages served with a <code>text/html-sandboxed</code> MIME type, if you navigate to the page directly. This part works in all browsers, today; they all download (or offer to download) the page markup instead of rendering it. Second, browsers that support the <code>sandbox</code> attribute need to render iframes served with the <code>text/html-sandboxed</code> MIME type (subject to the privilege restrictions listed in the <code>sandbox</code> attribute). No browser supports this yet, not even Google Chrome. (It renders the parent page but downloads the iframe content instead of rendering it within the frame.) So you can&#8217;t use this technique yet, until Google updates Chrome to support it. (In theory, other browser vendors will implement support for this at the same time they implement support for the <code>sandbox</code> attribute, but I suppose we&#8217;ll just have to wait and see.)</li>
<li><b>The <code>srcdoc</code> attribute</b>, for including untrusted content inline. Since the fallback behavior in legacy browsers for this feature is &#8220;render nothing at all&#8221; (by design), this attribute won&#8217;t be useful until pretty much all of your visitors upgrade to browsers that support the attribute. At the moment, no current browser supports the <code>srcdoc</code> attribute, so it&#8217;ll be a while. If I had to guess, I&#8217;d say January 29, 2022, at 4:37pm. Plus or minus 10 years.</li>
</ol>

<p>And now you know &#8220;What&#8217;s Next in HTML.&#8221;</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/whats-next-in-html-episode-2-whos-been-peeing-in-my-sandbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Next in HTML, episode 1</title>
		<link>http://www.htmlfive.net/whats-next-in-html-episode-1/</link>
		<comments>http://www.htmlfive.net/whats-next-in-html-episode-1/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 15:18:10 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[What's Next]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1203</guid>
		<description><![CDATA[HTML5 is so last week.]]></description>
			<content:encoded><![CDATA[<p>Welcome to "What's Next in HTML," where I'll try to summarize the major activity in the ongoing standards process in the WHAT Working Group. Wait... what happened to <a href="http://blog.whatwg.org/category/weekly-review">This Week in HTML5</a>? Hell, what happened to HTML5? Well, nothing. It took over five years to create, but <a href="http://blog.whatwg.org/html5-at-last-call">it's in Last Call now</a>. By all measures, it has already been wildly successful. Browser vendors are implementing it, <a href="http://diveintohtml5.org/">books are being written</a>, <a href="http://validator.nu/?doc=http://blog.whatwg.org/whats-next-in-html-episode-1">we have a kick-ass validator</a>, web developers are slowly catching on, and there's still plenty of time to <a href="http://lists.whatwg.org/listinfo.cgi/whatwg-whatwg.org">send us your feedback</a>. But in the meantime, the WHAT Working Group has begun work on new, experimental features for the next version of HTML.</p>

<p>The next version of HTML doesn't have a name yet. In fact, it may never have a name, because the working group is <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-January/024708.html">switching to an unversioned development model</a>. Various parts of the specification will be at varying degrees of stability, as noted in each section. But if all goes according to plan, there will never be One Big Cutoff that is frozen in time and dubbed "HTML6." <a href="http://diveintomark.org/archives/2009/11/02/why-do-we-have-an-img-element">HTML is an unbroken line</a> stretching back almost two decades, and version numbers are a vestige of an older development model for standards that never really matched reality very well anyway. HTML5 is so last week. Let's talk about what's next.</p>

<p>The big news in HTML is <a href="http://html5.org/tools/web-apps-tracker?from=4438&amp;to=4439">r4439</a>, which adds <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#devices">the <code>device</code> element</a>. What's a <code>&lt;device></code>? I'm glad you asked.</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#devices">
<p>The <code>device</code> element represents a device selector, to allow the user to give the page access to a device, for example a video camera.</p>
<p>The <code>type</code> attribute allows the author to specify which kind of device the page would like access to.</p>
</blockquote>

<p>So it's for video conferencing, something you can currently only do with Adobe Flash or other proprietary plugins that sit on top of your browser. In fact, most of the pieces for browser-based video chat are already in place. The idea is that a <code>device</code> element would go hand in hand with <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video">a <code>video</code> element</a> and a <a href="http://dev.w3.org/html5/websockets/">web socket</a>. The <code>device</code> records a video stream (using the also-newly-defined <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#stream-api">Stream API</a>) and sends the stream of video along a web socket to the other party (perhaps via an intermediate server) which renders the stream in a <code>video</code> element. And like the <code>video</code> element, the <code>device</code> element would be native to your browser, so browser vendors would not have to wait for third parties to add specific support for their platform.</p>

<p>Does all that work yet? Hell no. We don't even have a standard video codec yet! Google Chrome is the only browser that has shipped an implementation of web sockets (although it's part of WebKit, so presumably Apple could ship it in a future version of Safari if they choose). And the entire <code>device</code> API is still in its infancy. Nobody has even started implementing a prototype of that piece yet, and the whole idea might be scrapped by my next episode. But that's life on the bleeding edge.</p>

<p>And now you know "What's Next in HTML."</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/whats-next-in-html-episode-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementation progress on the HTML5 &lt;ruby&gt; element</title>
		<link>http://www.htmlfive.net/implementation-progress-on-the-html5-ruby-element/</link>
		<comments>http://www.htmlfive.net/implementation-progress-on-the-html5-ruby-element/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 02:51:00 +0000</pubDate>
		<dc:creator>MikeSmith</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Elements]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1119</guid>
		<description><![CDATA[If you don't know what the HTML5 ruby element is, you might want to take a minute to first read the section about the ruby element in the HTML5 specification and/or the Wikipedia article on ruby characters. To quote from the HTML5 description of the ruby element: The ruby element allows one or more spans [...]]]></description>
			<content:encoded><![CDATA[<p> If you don't know what the HTML5 <b>ruby</b> element is, you might want to take a minute to first read <a href="http://dev.w3.org/html5/spec/text-level-semantics.html#the-ruby-element">the section about the <b>ruby</b> element in the HTML5 specification</a> and/or the Wikipedia article on <a href="http://en.wikipedia.org/wiki/Ruby_character">ruby characters</a>. To quote from the HTML5 description of the <b>ruby</b> element:</p>

<blockquote cite="http://dev.w3.org/html5/spec/text-level-semantics.html#the-ruby-element">
<p>The <b>ruby</b> element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as <em>furigana</em>.</p>
</blockquote>

<p>I give a specific example further down, but for now I want to first say that the really great news about the <b>ruby</b> element is that last week, Google Chrome developer Roland Steiner <a href="http://trac.webkit.org/changeset/50495">checked in a change</a> (r50495, and see also related <a href="https://bugs.webkit.org/show_bug.cgi?id=28420">bug 28420</a>) that adds <b>ruby</b> support to the trunk of the WebKit source repository, thus making the ruby feature available in WebKit nightlies and Chrome dev-channel releases.</p>

<h3 id="example">A simple example</h3>
<p>The following is a simple example of what you can do with the <b>ruby</b> element; make sure to view it in a recent WebKit nightly or Chrome dev-channel release. Note that the text is an excerpt from the source of a ruby-annotated <a href="http://www.aozora.gr.jp/cards/000035/files/1567_14913.html">online copy of the short story <i>Run, Melos, Run</i></a> by the writer Osamu Dazai, which I came across by way of Piro's info page for his <a href="http://piro.sakura.ne.jp/xul/_rubysupport.html.en">XHTML Ruby add-on for Firefox</a> (and which I mention a bit more about further below).</p>

<pre>
きのうの豪雨で山の水源地は&lt;ruby>氾濫&lt;rp>（&lt;/rp>
&lt;rt><span style="background-color: yellow">はんらん</span>&lt;/rt>&lt;rp>）&lt;/rp>&lt;/ruby>し、濁流
&lt;ruby>滔々&lt;rp>（&lt;/rp>&lt;rt><span style="background-color: yellow">とうとう</span>&lt;/rt>&lt;rp>）&lt;/rp>
&lt;/ruby>と下流に 集り、猛勢一挙に橋を破壊し、どうどうと 
響きをあげる激流が、&lt;ruby>木葉微塵&lt;rp>（&lt;/rp>
&lt;rt><span style="background-color: yellow">こっぱみじん</span>&lt;/rt>&lt;rp>）&lt;/rp>&lt;/ruby>に&lt;ruby>橋桁
&lt;rp>（&lt;/rp>&lt;rt><span style="background-color: yellow">はしげた</span>&lt;/rt>&lt;rp>）&lt;/rp>&lt;/ruby>
を跳ね飛ばしていた。
</pre>

<p>If you don't happen to have Japanese fonts installed, here's a screenshot of the source for reference:</p>

<p><img id="ruby-markup" src="http://sideshowbarker.net/wp-content/uploads/2009/11/source.png" alt="ruby source markup" /></p>

<p>Notice that the actual annotative ruby text (which I've highlighted in yellow in the source just for the sake of emphasis) is marked up using the <b>rt</b> element as a child of the <b>ruby</b> element, and the text being annotated is the node that's a previous sibling to that <b>rt</b> content as a child of the <b>ruby</b> element. The final new element in the mix is the <b>rp</b> element, which is simply a way to mark up the annotative ruby text with parenthesis, for graceful fallback in browsers that don't support ruby.</p>

<p>So here's the rendered view of that same text:</p>

<blockquote cite="http://www.aozora.gr.jp/cards/000035/files/1567_14913.html">
<p>見よ、前方の川を。きのうの豪雨で山の水源地は<ruby>氾濫<rp>（</rp><rt>はんらん</rt><rp>）</rp></ruby>し、濁流<ruby>滔々<rp>（</rp><rt>とうとう</rt><rp>）</rp></ruby>と下流に集り、猛勢一挙に橋を破壊し、どうどうと響きをあげる激流が、<ruby>木葉微塵<rp>（</rp><rt>こっぱみじん</rt><rp>）</rp></ruby>に<ruby>橋桁<rp>（</rp><rt>はしげた</rt><rp>）</rp></ruby>を跳ね飛ばしていた。</p>
</blockquote>

<p>And here is a screenshot of how it should look in a recent WebKit nightly or Chrome dev-channel release:</p>

<p><img id="image60" src="http://sideshowbarker.net/wp-content/uploads/2009/11/rendered.png" alt="ruby rendered view" /></p>

<p>Notice that the annotative ruby text is displayed above the ruby base it annotates. If you instead view this page in a browser that doesn't support the ruby feature, you'll see that the ruby text is just shown inline, in parenthesis following the ruby base it annotates. So the feature falls back gracefully in older browsers.</p>

<h3 id="other-browsers">Support in other browsers</h3>
<p>Current versions of Microsoft Internet Explorer also have native support for ruby, and you can also get ruby support in Firefox by installing Piro's <a href="https://addons.mozilla.org/en-US/firefox/addon/1935">XHTML Ruby add-on</a> (and for more details, see his <a href="http://piro.sakura.ne.jp/xul/_rubysupport.html.en">XHTML ruby add-on info page</a>) — so we are well on the way to seeing the HTML5 ruby feature supported across a range of browsers. If you're not accustomed to reading printed books and magazines and such in Japanese, that might not sound like such a big deal. But for authors and developers and content providers in Japan who want to finally be able to use on the Web this very common feature of Japanese page layout from the print world, getting ruby support into another major browser engine is a huge win, and something to be very excited about.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/implementation-progress-on-the-html5-ruby-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 at Last Call</title>
		<link>http://www.htmlfive.net/html5-at-last-call/</link>
		<comments>http://www.htmlfive.net/html5-at-last-call/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 21:52:17 +0000</pubDate>
		<dc:creator>Ian Hickson</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1100</guid>
		<description><![CDATA[For a brief period today, there were no outstanding e-mails or bugs on the specs, and so I took that opportunity to transition us here at the WHATWG to the next stage of HTML5's development: Last Call! This affects three specs at the WHATWG: HTML5 Web Workers Microdata vocabularies There's also a version of the [...]]]></description>
			<content:encoded><![CDATA[<p>For a brief period today, there were no outstanding e-mails or bugs on the specs, and so I took that opportunity to transition us here at the WHATWG to the next stage of HTML5's development: Last Call! This affects three specs at the WHATWG:</p>
<ul>
 <li><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML5</a>
 </li><li><a href="http://www.whatwg.org/specs/web-workers/current-work/">Web Workers</a>
 </li><li><a href="http://www.whatwg.org/specs/vocabs/current-work/">Microdata vocabularies</a>
</li></ul>
<p>There's also a version of the spec called <a href="http://www.whatwg.org/specs/web-apps/current-work/complete.html">Web Applications 1.0</a> (for nostalgic reasons) that has all of the above as well as a number of other specs, namely Web Storage, Web Database, Server-sent Events, and the Web Sockets API and protocol, all together in one document. With the exception of the Web Database spec, they're all now in last call at the WHATWG.</p>
<p>So if you've been waiting to see if someone else would report the problem that you had seen, well, if it's not fixed, they didn't! So you should now send that feedback in yourself.</p>
<p>There's two ways to send feedback. If your feedback is something short and simple, you can just load up the spec in your browser, click on the section with the problem, then type in your message using the review comments box that appears at the bottom of the window, and hit the "Submit Review Comments" button. This works for the HTML5 and Web Applications 1.0 specs. (Thanks to the W3C HTML Working Group for making their bug database available to us for this purpose.)</p>
<p>If your feedback is more elaborate, then you should <a href="http://www.whatwg.org/mailing-list#specs">subscribe to the mailing list</a> and then send your feedback there.</p>
<p><i>Note: Lest there be any confusion, the W3C HTML WG has not yet transitioned HTML5 to Last Call at the W3C. HTML5 is a joint effort of W3C and WHATWG groups, but we have different issues lists and different criteria for going to Last Call. For more details on the W3C HTML WG's processes, see the <a href="http://www.w3.org/2007/03/HTML-WG-charter.html">W3C HTML WG charter</a>.</i></p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/html5-at-last-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in HTML5 &#8211; Episode 38</title>
		<link>http://www.htmlfive.net/this-week-in-html5-episode-38/</link>
		<comments>http://www.htmlfive.net/this-week-in-html5-episode-38/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 19:03:22 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[Weekly Review]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1094</guid>
		<description><![CDATA[Topics this week include microdata, video and audio, and spec licensing.]]></description>
			<content:encoded><![CDATA[<p>Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group.</p>

<p>This week, there were some more refinements to microdata. <a href="http://html5.org/tools/web-apps-tracker?from=4138&#038;to=4139">r4139</a> changes the names of the <abbr>DOM</abbr> properties that reflect microdata markup. <a href="http://html5.org/tools/web-apps-tracker?from=4139&#038;to=4140">r4140</a> renames the <code>content</code> property to <code>itemValue</code> Since no browser has actually implemented this <abbr>API</abbr> yet, these changes shouldn't make any difference. Standards are like sex; one mistake, and you're stuck supporting it forever! <a href="http://html5.org/tools/web-apps-tracker?from=4140&#038;to=4141">r4141</a> and <a href="http://html5.org/tools/web-apps-tracker?from=4146&#038;to=4147">r4147</a> fix up some microdata examples, in particular <a href="http://gavin.carothers.name/2009/08/13/trying-to-understand-microdata-rdfa/">this example from Gavin Carothers</a> about marking up O'Reilly's book catalog. Hooray for real-world examples!</p>

<p>There were also some noteworthy changes to the <code>&lt;video></code> and <code>&lt;audio></code> <abbr>API</abbr>. <a href="http://html5.org/tools/web-apps-tracker?from=4130&#038;to=4131">r4131</a> says that setting the <code>src</code> attribute on one of those elements should call its <code>load()</code> method. <a href="http://html5.org/tools/web-apps-tracker?from=4131&#038;to=4132">r4132</a> removes the <code>load</code> event for multimedia elements, and <a href="http://html5.org/tools/web-apps-tracker?from=4132&#038;to=4133">r4133</a> removes the "in progress" events (<code>loadstart</code>, <code>loadend</code>, and <code>progress</code>) that used to be fired while the video/audio file was downloading.</p>

<p>Other noteworthy changes this week:</p>

<ul>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4096&#038;to=4097">r4097</a> defines fallback content for the obsolete <code>&lt;applet></code> element.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4097&#038;to=4098">r4098</a> "dramatically simplifies <code>&lt;script defer></code> and <code>&lt;script async></code> handling." [Background: <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7792">bug 7792</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4105&#038;to=4106">r4106</a> makes the <var>step</var> argument to the <code>&lt;input></code> element's <code>stepUp()</code> and <code>stepDown()</code> methods optional.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4110&#038;to=4111">r4111</a> removes <code>&lt;link rel=feed></code>. As <a href="http://blog.whatwg.org/the-road-to-html-5-link-relations#rel-feed">I documented earlier this year</a>, <code>rel=feed</code> was a reasonable idea that never took off. Only one browser ever implemented it, and in a survey of 3 billion pages I could only find a single page that used it.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4125&#038;to=4126">r4126</a> lists suggested default encodings for different locales. [Background: <a href="http://lists.w3.org/Archives/Public/public-html/2009Oct/thread.html#msg86">RE: HTML5 Issue 11 (encoding detection): I18N WG response...</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4137&#038;to=4138">r4138</a> drops support for non-UTF-8 encodings in <a href="http://www.whatwg.org/specs/web-workers/current-work/">Web Workers</a>. [Background: <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-September/thread.html#23197">[whatwg] Please always use utf-8 for Web Workers</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4098&#038;to=4099">r4099</a> marks the creation of <a href="http://www.whatwg.org/specs/web-apps/current-work/complete.html">Web Applications 1.0</a>, a super-spec that contains <a href="http://whatwg.org/specs/web-apps/current-work/">HTML5</a>, <a href="http://www.whatwg.org/specs/vocabs/current-work/">pre-defined microdata vocabularies</a>, <a href="http://www.whatwg.org/specs/web-workers/current-work/">Web Workers</a>, <a href="http://dev.w3.org/html5/webstorage">Web Storage</a>, <a href="http://dev.w3.org/html5/webdatabase/">Web Database</a>, <a href="http://dev.w3.org/html5/eventsource/">Server-sent Events</a>, and <a href="http://dev.w3.org/html5/websockets/">Web Sockets</a>. This marks the first time that some of those specs have been published by the WHATWG, rather than the W3C, and therefore the first time that said specs have been published under a Free-Software-compatible license. (<a href="http://lists.w3.org/Archives/Public/public-html/2009Oct/0002.html">The W3C is still deciding whether to use such a license</a>.)</li>
</ul>

<p>Around the web:</p>

<ul>
<li><a href="http://robertnyman.com/2009/10/14/an-introduction-to-html5/">An Introduction to HTML5</a> covers a lot of ground</li>
<li><a href="http://diveintohtml5.org/video.html">Video on the Web</a> is the latest chapter from <a href="http://www.amazon.com/HTML5-Up-Running-Mark-Pilgrim/dp/0596806027">my upcoming book on HTML5</a>.</li>
</ul>

<p>Tune in next week for another exciting edition of "This Week in HTML5."</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/this-week-in-html5-episode-38/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in HTML5 &#8211; Episode 37</title>
		<link>http://www.htmlfive.net/this-week-in-html5-episode-37/</link>
		<comments>http://www.htmlfive.net/this-week-in-html5-episode-37/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 19:59:09 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[Weekly Review]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1063</guid>
		<description><![CDATA[Topics this week include microdata, events, and document.head.]]></description>
			<content:encoded><![CDATA[<p>The big news this week is microdata. Google <a href="http://blog.whatwg.org/usability-testing-html5">sponsored a usability study on microdata syntax</a>, which resulted in significant changes to the spec [<a href="http://html5.org/tools/web-apps-tracker?from=4065&amp;to=4066">r4066</a>]. Also related: <a href="http://html5.org/tools/web-apps-tracker?from=4066&amp;to=4067">r4067</a> fixes a microdata example, <a href="http://html5.org/tools/web-apps-tracker?from=4067&amp;to=4068">r4068</a> updates the algorithm for extracting RDF triples from microdata, <a href="http://html5.org/tools/web-apps-tracker?from=4068&amp;to=4069">r4069</a> does some spec cleanup, and <a href="http://html5.org/tools/web-apps-tracker?from=4069&amp;to=4070">r4070</a> splits out the predefined microdata syntaxes into their own specs:</p>

<ul>
<li><a href="http://dev.w3.org/html5/mdvcard/">Microdata vocabularies: vCard</a></li>
<li><a href="http://dev.w3.org/html5/mdvevent/">Microdata vocabularies: vEvent</a></li>
<li><a href="http://dev.w3.org/html5/mdwork/">Microdata vocabularies: Licensing Works</a></li>
</ul>

<p>There was also work on events this week. <a href="http://html5.org/tools/web-apps-tracker?from=4031&amp;to=4032">r4032</a> defines what events are involved in copy and paste, closing <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7668">bug 7668</a>. <a href="http://html5.org/tools/web-apps-tracker?from=4036&amp;to=4037">r4037</a> defines when the <code>reset</code> event fires, closing <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7699">bug 7699</a>. <a href="http://html5.org/tools/web-apps-tracker?from=4038&amp;to=4039">r4039</a> defines when the <code>abort</code> event fires, closing <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7700">bug 7700</a>.</p>

<p>This week brings another milestone, one which went mostly unremarked in mailing lists, blogs, and IRC chatter. As with any large project, Ian Hickson has maintained an informal wishlist of things he would like to clarify, define, or otherwise include in HTML5. The list has grown and shrunk over the years. The list was stored in HTML comments, so it has never been visible unless you viewed the source of the HTML5 specification itself. And as with any large project, there comes a time when you realize you're not going to get to everything on your wishlist.</p>

<p>This week, the wishlist shrunk a lot, as Ian finally "punted" on several issues. Some of them may be tackled in HTML6. (Of course, if someone feels strongly enough, they can certainly argue that an issue still needs to be tackled in HTML5.) <a href="http://html5.org/tools/web-apps-tracker?from=4022&amp;to=4023">r4023</a> shows the deletions from the wishlist, including: "ability for a web app to save a file to the local disk," proposals for new attributes on the <code>&lt;title></code> element, partial form validation, multi-column select widgets, auto-formatting of number fields (like many spreadsheet programs do), relative dates, input controls for repeating dates (like anniversaries or other repeating events), and input controls for currency.</p>

<p>Other noteworthy changes this week:</p>

<ul>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4010&amp;to=4011">r4011</a> syncs with the latest <a href="http://tools.ietf.org/html/draft-abarth-origin">Origin spec</a>, closing <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7599">bug 7599</a>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4030&amp;to=4031">r4031</a> allows user agents to explicitly disable <code>&lt;canvas></code> support.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4041&amp;to=4042">r4042</a> limits <code>PUT</code> and <code>DELETE</code> actions on web forms to the same origin as the page. This is similar to the restriction on <code>XMLHttpRequest</code>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4056&amp;to=4057">r4057</a> defines <code>&lt;applet></code>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4075&amp;to=4076">r4076</a> disallows the backtick (<code>`</code>) character in unquoted attribute values, because Internet Explorer will treat it as an attribute value delimiter.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4081&amp;to=4082">r4082</a> adds the <code>document.head</code> property, which <a href="http://blog.whatwg.org/this-week-in-html5-episode-36#interesting-discussions">makes me very happy</a>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4082&amp;to=4083">r4083</a> states that an <code>&lt;audio></code> element without controls should always be hidden. (You can still make a visible <code>&lt;audio></code> element; just give it a <code>controls</code> attribute.)</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4085&amp;to=4086">r4086</a> tries to clarify the ever-elusive <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-windowproxy-object"><code>WindowProxy</code> object</a>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4090&amp;to=4091">r4091</a> registers the various HTTP headers that are used in the new features of HTML5, including <a href="http://www.whatwg.org/specs/web-apps/current-work/#ping-from"><code>Ping-From</code></a> and <a href="http://www.whatwg.org/specs/web-apps/current-work/#ping-to"><code>Ping-To</code></a>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=4091&amp;to=4092">r4092</a> and <a href="http://html5.org/tools/web-apps-tracker?from=4093&amp;to=4094">r4094</a> add a non-normative <a href="http://www.whatwg.org/specs/web-apps/current-work/#index">index of HTML elements and attributes</a>. Think of it as an "HTML5 cheat sheet." Various third parties have attempted such a list, but none have been able to keep up with the maintenance required as HTML5 evolved.</li>
</ul>

<p>Around the web:</p>

<ul>
<li><a href="http://blog.whatwg.org/content-sniffing-still-sucks">Sniffing for RSS 1.0 feeds served as text/html</a>, my original research into how browsers treat mis-labeled RSS feeds. My proposal was accepted and incorporated into <a href="http://tools.ietf.org/html/draft-abarth-mime-sniff">the latest draft of the Content Sniffing spec</a>.</li>
<li><a href="http://code.google.com/p/mimesniff/">mimesniff</a>, my implementation of the Content Sniffing draft spec. Requires Python 3.1 or later.</li>
<li><a href="http://googlecode.blogspot.com/2009/10/svg-at-google-and-in-internet-explorer.html">SVG at Google and in Internet Explorer</a>, by my friend and colleague Brad Neuberg (the mastermind behind <a href="http://code.google.com/p/svgweb/">SVGWeb</a>).</li>
<li><a href="http://cs.helsinki.fi/u/ilmarihe/canvas_animation_demo/mozcampeu09.html">A cute animated cartoon about HTML5 and <code>&lt;canvas></code></a>, using HTML5 and <code>&lt;canvas></code>.</li>
<li>I will be speaking on HTML5 at two upcoming Google Developer Days. The first is in <a href="http://code.google.com/intl/cs/events/developerday/2009/home.html">Prague on November 6</a>; the second is in <a href="http://code.google.com/intl/ru/events/developerday/2009/home.html">Moscow on November 10</a>.</li>
</ul>

<p>Tune in next week for another exciting edition of "This Week in HTML5."</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/this-week-in-html5-episode-37/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usability testing HTML5</title>
		<link>http://www.htmlfive.net/usability-testing-html5/</link>
		<comments>http://www.htmlfive.net/usability-testing-html5/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 04:18:10 +0000</pubDate>
		<dc:creator>Ian Hickson</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1030</guid>
		<description><![CDATA[Over the past few weeks, Google has been preparing and then running a usability study to test the microdata feature of HTML5. Methodology We first created three different variants based on the original microdata proposal: One based on what the spec said (documentation) One trying to put types in an explicit itemtype="" attribute and moving [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks, Google has been preparing and then running a usability study to test the microdata feature of HTML5.</p>
<h3>Methodology</h3>
<p>We first created three different variants based on the original microdata proposal:</p>
<ol>
 <li>One based on what the spec said (<a href="http://damowmow.com/playground/microdata/001/">documentation</a>)</li>
 <li>One trying to put types in an explicit <code>itemtype=""</code> attribute and moving "about" to <code>item=""</code>, and replacing <code>itemfor=""</code> with just having multiple <code>item=""</code>s with the same name (<a href="http://damowmow.com/playground/microdata/002/">documentation</a>)</li>
 <li>One trying to remove types altogether and using <code title="">item</code> as a boolean attribute. (<a href="http://damowmow.com/playground/microdata/003/">documentation</a>)</li>
</ol>
<p>Our plan was to run six studies, two for each variant, with each participant running through the following steps:</p>
<ol>
 <li>Read and comment on a couple of motivating slides explaining why one would care about microdata</li>
 <li>Read the provided documentation for the variant being tested</li>
 <li>Look at and comment on the <a href="http://damowmow.com/playground/microdata/001/animals-annotated.html">animals example with microdata</a> (<a href="http://damowmow.com/playground/microdata/002/animals-annotated.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/animals-annotated.html">variant 3</a>)</li>
 <li>Exercise: try to extract the data from <a href="http://damowmow.com/playground/microdata/001/flickr-annotated.html">the "flickr" example</a> (<a href="http://damowmow.com/playground/microdata/002/flickr-annotated.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/flickr-annotated.html">variant 3</a>)</li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/001/blog.html">blog example</a> (<a href="http://damowmow.com/playground/microdata/002/blog.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/blog.html">variant 3</a>)</li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/001/review.html">review example</a> (<a href="http://damowmow.com/playground/microdata/002/review.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/review.html">variant 3</a>)</li>
 <li>Compare and contrast the <a href="http://damowmow.com/playground/microdata/001/yelp-annotated.html">"yelp" example with microdata</a> to the equivalent of one of the other two variants (<a href="http://damowmow.com/playground/microdata/002/yelp-annotated.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/yelp-annotated.html">variant 3</a>)</li>
</ol>
<p>We made some changes along the way. After the first three, it became clear that "about" was a very confusing term to use for giving the item's global identifier, and so we changed the documentation and examples to use "itemid" instead (which turned out to be much less confusing). Early on we also introduced some documentation text to explain the differences between the variants in the last exercise, because just showing them the two side by side wasn't getting us anything useful (<a href="http://damowmow.com/playground/microdata/001-003">1 to 3</a>, <a href="http://damowmow.com/playground/microdata/002-001">2 to 1</a>, <a href="http://damowmow.com/playground/microdata/002-003">2 to 3</a>, <a href="http://damowmow.com/playground/microdata/003-001">3 to 1</a>).</p>
<p>After our sixth participant canceled on us, we decided to create a fourth variant (<a href="http://damowmow.com/playground/microdata/004/introduction">documentation</a>) based on what we'd learnt with the first five, and to get two more participants to test this variant specifically. For these participants, we used the following methodology:</p>
<ol>
 <li>Read and comment on a couple of motivating slides explaining why one would care about microdata</li>
 <li>Read the provided documentation for the variant being tested</li>
 <li>Look at and comment on the <a href="http://damowmow.com/playground/microdata/004/animals-annotated.html">animals example with microdata</a></li>
 <li>Exercise: try to extract the data from <a href="http://damowmow.com/playground/microdata/004/flickr-annotated.html">the "flickr" example</a></li>
 <li>Exercise: try to extract the data from <a href="http://damowmow.com/playground/microdata/004/review-annotated.html">the review example</a></li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/004/blog.html">blog example</a></li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/004/yelp.html">"yelp" example</a></li>
</ol>
<h3>Conclusions</h3>
<p>Some interesting things came out of this study. First, as mentioned above, the term "about" turns out to be highly non-intuitive. I originally took the word from RDFa, on the principle that they knew more about this than I did, but our participants had a lot of trouble with that term. When we changed it to "itemid", there was a marked improvement in people's understanding of the concept.</p>
<p>Second, people were much less confused about types than I thought they would be. In preparing for this study I discussed microdata with a number of people, and I found that one major area of confusion was the concept of types vs the concept of properties. This is why variant 3 has no types: I wanted to find out whether people had trouble with them or not. Well, not only did people not have problems with types, several participants went out of their way to specify the type of an item, for example using the attribute name "type" instead of "item" in variant 1.</p>
<p>It seems that while reasoning about types at the theoretical level is somewhat confusing, it isn't so confusing that the concept should be kept out of the language. Instead, types should just be more explicitly mentioned. This is why we renamed "item" to "itemtype".</p>
<p>Third, people were confused by the scoping nature of the "item" attribute. Some of our participants never understood scoping at all, and most of the participants who understood the concept were still quite confused by the "item" attribute. We were encouraged, however, by one variant 1 participant's sudden enlightenment when they saw variant 3's "itemscope" attribute, and by the reaction of the variant 3 participant to the "itemscope" attribute compared to the reactions that the other two variants' participants had to their "item" attributes. This is why we split "item" into "itemtype" and "itemscope", instead of just using "itemtype".</p>
<p>We found that people who understood microdata's basic features also understood "itemfor", but while we were doing the study, it was pointed out on the WHATWG list that "itemfor" makes it impossible to find the properties of an item without scanning the whole document. This is why we tested the &lt;itemref> idea in variant 4. People were at least as able to understand this as "itemfor".</p>
<p>In general, the changes we made for variant 4 were all quite successful. With one exception, that's what HTML5 now says. The one exception is that I hoisted the "itemid" property to an attribute like "itemtype", based on the argument that if people want to scan a document for the item with a particular "itemid", &lt;itemref> would make it impossible to do it for the property without creating the microdata graph for the entire page.</p>
<p>One thing we weren't trying to test but which I was happy to see is that people really don't have any problems dealing with URLs as property names. In fact, they didn't even complain about URLs being long, which reassured me that microdata's lack of URL shortening mechanisms is probably not an issue.</p>
<p>Overall, this was a good and useful experience. I hope we can use usability studies to test other parts of HTML5 in the future.</p>
<h3>Update</h3>
<p>(Added based on Twitter feedback.) Some people have asked to see the raw data we collected in this study. I've uploaded <a href="http://damowmow.com/playground/microdata/results/">the raw files</a> as they were at the end of each participant's one-hour session. This data on its own isn't especially useful; what matters is how the participants reached their conclusions. There are seven hours' worth of video to document that, but we can't publish the video online, since that would be a violation of the legal agreement we have with the participants to protect their privacy.</p>
<p>The study was conducted by one of Google's usability study moderators, and the participants were screened and recruited by a separate team of usability study recruiters specifically for this study. Our criteria were intended to find Web developers who were somewhat comfortable with HTML and who had at most a passing knowledge of the HTML5 effort.</p>
<p>Bear in mind, when looking at the raw data, that the participants had just one hour to go from not knowing about this at all, to being expected to read and write code in a new syntax, with no hints other than the examples and the documentation (which most only glanced at!).</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/usability-testing-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sniffing for RSS 1.0 feeds served as text/html</title>
		<link>http://www.htmlfive.net/sniffing-for-rss-1-0-feeds-served-as-texthtml/</link>
		<comments>http://www.htmlfive.net/sniffing-for-rss-1-0-feeds-served-as-texthtml/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 22:42:37 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1023</guid>
		<description><![CDATA[It is unlikely that we will adopt IE's algorithm, since it seems unnecessarily pathological.]]></description>
			<content:encoded><![CDATA[<p>I recently found myself testing how browsers sniff for RSS 1.0 feeds that are served with an incorrect MIME type. (Yes, my life is full of delicious irony.) I thought I'd share my findings so far.</p>

<h3 id=firefox>Firefox</h3>

<p>Firefox's feed sniffing algorithm is located in <a href="http://mxr.mozilla.org/mozilla-central/source/browser/components/feeds/src/nsFeedSniffer.cpp"><code>nsFeedSniffer.cpp</code></a>. As you can see, <a href="http://mxr.mozilla.org/mozilla-central/source/browser/components/feeds/src/nsFeedSniffer.cpp#353">starting at line 353</a>, it takes the first 512 bytes of the page, looks for a root tag called <code>rss</code> (for RSS 2.0), <code>atom</code> (for Atom 0.3 and 1.0), or <code>rdf:RDF</code> (for RSS 1.0). The RSS 1.0 marker is really a generic RDF marker, so it then does some additional checks for the two required namespaces of an RSS 1.0 feed, <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code> and <code>http://purl.org/rss/1.0/</code>. This check is quite simple; it literally just checks for the presence of both strings, not caring whether they are the value of an <code>xmlns</code> attribute (or indeed any attribute at all).</p>

<p>Firefox has an additional feature which tripped up my testing until I understood it. IE and Safari both have a mode where they essentially say "I detected this page as a feed and tried to parse it, but I failed, so now I'm giving up, and here's an error message describing why I gave up." Firefox does not have a mode like this. As far as I can tell, if it decides that a resource is a feed but then fails to parse the resource as a feed, it reparses the resource with feed handling disabled. So an non-well-formed feed served as <code>application/rss+xml</code> will actually trigger a "Do you want to download this file" dialog, because Firefox tried to parse it as a feed, failed, then reparsed it as some-random-media-type-that-I-don't-handle. A non-well-formed feed served as <code>text/html</code> will actually render as HTML, but only after Firefox silently tries (and fails) to parse it as a feed.</p>

<p>There's nothing wrong with this approach; in fact, it seems much more end-user-friendly than throwing up an incomprehensible error message. I just mention it because it tripped me up while testing.</p>

<h3 id=ie>Internet Explorer</h3>

<p>Internet Explorer's feed sniffing algorithm is <a href="http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx">documented by the Windows RSS team</a>. About RSS 1.0, it states:</p>

<blockquote cite="http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx">
<p>IE7 detects a RSS 1.0 feed using the content types <code>application/xml</code> or <code>text/xml</code>. ... The document is checked for the strings <code>&lt;rdf:RDF</code>, <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code> and <code>http://purl.org/rss/1.0/</code>.  IE7 detects that it is a feed if all three strings are found within the first 512 bytes of the document. ... IE7 also supports other generic <code>Content-Type</code>s by checking the document for specific Atom and RSS strings.</p>
</blockquote>

<p>Now that I understand IE's algorithm, I have to concede that this documentation is 100% accurate. However, it doesn't tell the full story. Here's what actually happens. If the <code>Content-Type</code> is</p>

<ul>
<li><code>application/xml</code></li>
<li><code>text/xml</code></li>
<li><code>application/octet-stream</code></li>
<li><code>text/plain</code></li>
<li><code>text/html</code></li>
<li>the empty string, or</li>
<li>missing altogether</li>
</ul>

<p>...then IE will trigger its feed sniffing. Once IE triggers its feed sniffing, it will never change its mind (unlike Firefox). If feed parsing fails, IE will throw up an error message complaining of feed coding errors or an unsupported feed format. The presence or absence of a <code>charset</code> parameter in the <code>Content-Type</code> header made absolutely no difference in any of the cases I tested.</p>

<p>And how exactly does IE detect an RSS 1.0 feed, once it decides to sniff? The documentation on MSDN is literally true: "The document is checked for the strings <code>&lt;rdf:RDF</code>, <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code> and <code>http://purl.org/rss/1.0/</code>.  IE7 detects that it is a feed if all three strings are found within the first 512 bytes of the document." Combined with our knowledge of which <code>Content-Type</code>s IE considers "generic," we can conclude that the following page, served as <code>text/html</code>, will be treated as a feed in IE:</p>

<blockquote>
<pre><code>&lt;!-- &lt;rdf:RDF -->
&lt;!-- http://www.w3.org/1999/02/22-rdf-syntax-ns# -->
&lt;!-- http://purl.org/rss/1.0/ -->
&lt;script>alert('Hi!');&lt;/script></code></pre>
</blockquote>

<p>[<a href="http://wearehugh.com/public/2009/09/feeds/comment/index.html">live demonstration</a>]</p>

<h3 id="why-bother">Why Bother?</h3>

<p>I am working with Adam Barth and Ian Hickson to update <a href="http://tools.ietf.org/html/draft-abarth-mime-sniff-01">draft-abarth-mime-sniff-01</a> (the content sniffing algorithm referenced by HTML5) to sniff RSS 1.0 feeds served as <code>text/html</code>. It is unlikely that we will adopt IE's algorithm, since it seems unnecessarily pathological. I am proposing the following change, which would bring the content sniffing specification in line with Firefox's sniffing algorithm:</p>

<blockquote>
<p>In the "Feed or HTML" section, insert the following steps between step 10 and step 11:</p>
<p>10a. Initialize /RDF flag/ to 0.</p>
<p>10b. Initialize /RSS flag/ to 0.</p>
<p>10c. If the bytes with positions pos to pos+23 in s are exactly equal to 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x70, 0x75, 0x72, 0x6C, 0x2E, 0x6F, 0x72, 0x67, 0x2F, 0x72, 0x73, 0x73, 0x2F, 0x31, 0x2E, 0x30, 0x2F respectively (ASCII for "http://purl.org/rss/1.0/"), then:</p>
<ol>
<li>Increase pos by 23.</li>
<li>Set /RSS flag/ to 1.</li>
</ol>
<p>10d. If the bytes with positions pos to pos+42 in s are exactly equal to 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x33, 0x2E, 0x6F, 0x72, 0x67, 0x2F, 0x31, 0x39, 0x39, 0x39, 0x2F, 0x30, 0x32, 0x2F, 0x32, 0x32, 0x2D, 0x72, 0x64, 0x66, 0x2D, 0x73, 0x79, 0x6E, 0x74, 0x61, 0x78, 0x2D, 0x6E, 0x73, 0x23 respectively (ASCII for "http://www.w3.org/1999/02/22-rdf-syntax-ns#"), then:</p>
<ol>
<li>Increase pos by 42.</li>
<li>Set /RDF flag/ to 1.</li>
</ol>
<p>10e. Increase pos by 1.</p>
<p>10f. If /RDF flag/ is 1, and /RSS flag/ is 1, then the /sniffed type/ of the resource is "application/rss+xml". Abort these steps.</p>
<p>10g. If pos points beyond the end of the byte stream s, then continue to step 11 of this algorithm.</p>
<p>10h. Jump back to step 10c of this algorithm.</p>
</blockquote>

<h3 id="further-reading">Further Reading</h3>

<p>You can <a href="http://wearehugh.com/public/2009/09/rss10-sniffing.txt">see the results of my research to date</a> and <a href="http://wearehugh.com/public/2009/09/feeds/">test the feeds for yourself</a>. Because my research results are plain text with embedded HTML tags, I have added 512 bytes of leading whitespace to the page to foil browsers' plain-text-or-HTML content sniffing. Mmmm -- delicious, delicious irony.</p>

<ins datetime="2010-08-31T10:54Z"><p>Update: <a href="http://pc.de/pages/content-sniffing-still-sucks-be">Belorussian translation</a> is available, provided by <a href="http://pc.de/">PC</a>.</p></ins>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/sniffing-for-rss-1-0-feeds-served-as-texthtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
