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

<channel>
	<title>HTML5 Doctor &#187; html5</title>
	<atom:link href="http://html5doctor.com/tag/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:36:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Reviewing HTML5 for Web Designers</title>
		<link>http://html5doctor.com/reviewing-html5-for-web-designers/</link>
		<comments>http://html5doctor.com/reviewing-html5-for-web-designers/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 13:50:05 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[abookapart]]></category>
		<category><![CDATA[adactio]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jeremy keith]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=2213</guid>
		<description><![CDATA[<p><abbr>HTML</abbr>5 for Web Designers, written by Jeremy Keith, is the first book to be published under the A Book Apart brand, founded by Mandy Brown, Jason Santa Maria, and Jeffrey Zeldman.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p><a title="HTML5 for Web Designers" href="http://books.alistapart.com/product/html5-for-web-designers"><abbr>HTML</abbr>5 for Web Designers</a>, written by <a href="http://adactio.com" title="Jeremy Keith">Jeremy Keith</a>, is the first book to be published under the <a href="http://abookapart.com">A Book Apart</a> brand, founded by <a title="Mandy Brown" href="http://aworkinglibrary.com/">Mandy Brown</a>, <a title="Jason Santa Maria" href="http://jasonsantamaria.com">Jason Santa Maria</a>, and <a title="Jeffrey Zeldman" href="http://www.zeldman.com/">Jeffrey Zeldman</a>.</p>
<p>When the book first landed on my doorstep, I was a bit let down by its meagre length of around 85 pages. I have to be honest, however, and admit I had not done my research before its arrival. From the book&#8217;s inception, the publishers stated that they intended to produce something to fill the gap between a blog post and book, something that people would be able to pick up, read quickly, and start implementing straight away.</p>
<p>So I set aside my disappointment and started reading this beautifully crafted book.</p>
<p><figure><img title="HTML5 for Web Designers Book" src="http://html5doctor.com/wp-content/uploads/2010/07/html5-for-web-designers-shop.png" alt="" width="620" /><figcaption>HTML5 for Web Designers Book &mdash; <a href="http://books.alistapart.com/product/html5-for-web-designers">Image source &mdash; used with permission</a></figcaption></figure></p>
<p>After reading through it, my opinion has changed. I realise exactly what A Book Apart were aiming to create when they decided on a short format for the series. <cite><abbr>HTML</abbr>5 for Designers</cite> is split up into six bite-size chapters:</p>
<ol>
<li><strong>Chapter One</strong>: <a href="#chap-one">a brief history of markup</a></li>
<li><strong>Chapter Two</strong>: <a href="#chap-two">the design of HTML5</a></li>
<li><strong>Chapter Three</strong>: <a href="#chap-three">rich media</a></li>
<li><strong>Chapter Four</strong>: <a href="#chap-four">web forms 2.0</a></li>
<li><strong>Chapter Five</strong>: <a href="#chap-five">semantics</a></li>
<li><strong>Chapter Six</strong>: <a href="#chap-six">using HTML5 today</a></li>
</ol>
<p>To give you some insight each chapter&#8217;s topics, I&#8217;ve described them each briefly.</p>
<h3 id="chap-one">Chapter One</h3>
<p>The first chapter lays out the foundations of the book and explains how, as a community, we arrived at the latest iteration of our favorite markup language, <abbr>HTML</abbr>5. Keith discusses how <abbr>HTML</abbr> was born, the ill-fated transition from <abbr>HTML</abbr> to <abbr>XML</abbr> (which never happened), the suggestion of <abbr>XHTML</abbr>2, and why we write &#8220;<abbr>HTML</abbr>5&#8243; instead of &#8220;<abbr>HTML</abbr> 5&#8243;.</p>
<p>You might be tempted to skip straight to the second chapter, but I firmly believe that you should read this. It&#8217;s vital material, and you&#8217;ll almost certainly learn something. (I sure did!)</p>
<h3 id="chap-two">Chapter Two</h3>
<p>Chapter two discusses how to convert web pages from <abbr>XHTML</abbr> 1 to <abbr>HTML</abbr>5. It also touches on elements that changed in <abbr>HTML</abbr>5 and some elements that are absent from the specification.</p>
<h3 id="chap-three">Chapter Three</h3>
<p>In chapter three, the book delves into the realms of rich media and what it means for designers and developers. Keith hints that this chapter could have a whole book dedicated to it (perhaps hinting at an upcoming A Book Apart title?). He does a good job describing the possibilities of <code>&lt;canvas&gt;</code> and showing a few examples of its capabilities. Although some readers may wish for more depth, this book is of course written for designers, so detail is kept to a minimum.</p>
<p>Keith goes on to explain the possibilities of the <code>&lt;audio&gt;</code> and <code>&lt;video&gt;</code> elements, something which many argue will change the way we work with the web. Keith gives great examples on how to introduce these elements into your client work with various fallback options for browsers that lag behind.</p>
<h3 id="chap-four">Chapter Four</h3>
<p>In chapter one, it&#8217;s explained that <abbr>HTML</abbr>5 started life as Web Apps 1.0 and Web Forms 2.0, which were later merged. So as one might imagine, Web Forms were destined to become an integral part of the <abbr>HTML</abbr>5 specification.</p>
<p>Chapter four covers the new elements and attributes for use in forms, including <code>placeholder</code>, <code>required</code>, <code>autocomplete</code>, <code>datalist</code>, new input types, sliders/spinners, and dates and times.</p>
<h3 id="chap-five">Chapter Five</h3>
<p>Chapter five covers semantics (although I feel that this should have been one of the first chapters in the book). Elements discussed include <code>&lt;mark&gt;</code>, <code>&lt;time&gt;</code>, <code>&lt;meter&gt;</code>, and <code>&lt;progress&gt;</code>, as well as the usual structural elements that get used in nearly every site.</p>
<h3 id="chap-six">Chapter Six</h3>
<p>Finally, chapter six discusses the most important question about <abbr>HTML</abbr>5: Can we use it today? I trust, as you are on this website, that you will already know the answer to that question.</p>
<h2>My opinion of <cite><abbr>HTML</abbr>5 for Web Designers</cite></h2>
<p>After finishing this book, I discovered that it is in fact quite a gem for anyone starting on their <abbr>HTML</abbr>5 journey.</p>
<p>There are undoubtedly areas that could have been expanded further, but the limitations imposed by the authors meant merciless fat-trimming. This is the type of book that you would be happy to keep on your desk as a quick reference manual, a shortcut before diving into the full <abbr>HTML</abbr>5 specification.</p>
<p>I would definitely recommend buying this book if you haven&#8217;t already. It&#8217;s true that great things come in small packages!</p>
<p><a title="HTML5 for Web Designers" href="http://books.alistapart.com/product/html5-for-web-designers">Buy the book directly from A Book Apart</a></p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/web-directions-atmedia-2010/" rel="bookmark" class="crp_title">HTML5 Doctor at Web Directions @media</a></li>
<li><a href="http://html5doctor.com/dd-details-wrong-again/" rel="bookmark" class="crp_title">dd-details wrong again</a></li>
<li><a href="http://html5doctor.com/why-designers-should-care-about-html5/" rel="bookmark" class="crp_title">Why designers should care about HTML5</a></li>
<li><a href="http://html5doctor.com/happy-1st-birthday-us/" rel="bookmark" class="crp_title">Happy 1st Birthday us</a></li>
<li><a href="http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/" rel="bookmark" class="crp_title">How to use HTML5 in your client work right now</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Reviewing%20HTML5%20for%20Web%20Designers%20-%20http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;title=Reviewing%20HTML5%20for%20Web%20Designers&amp;bodytext=HTML5%20for%20Web%20Designers%2C%20written%20by%20Jeremy%20Keith%2C%20is%20the%20first%20book%20to%20be%20published%20under%20the%20A%20Book%20Apart%20brand%2C%20founded%20by%20Mandy%20Brown%2C%20Jason%20Santa%20Maria%2C%20and%20Jeffrey%20Zeldman." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;title=Reviewing%20HTML5%20for%20Web%20Designers" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;title=Reviewing%20HTML5%20for%20Web%20Designers&amp;notes=HTML5%20for%20Web%20Designers%2C%20written%20by%20Jeremy%20Keith%2C%20is%20the%20first%20book%20to%20be%20published%20under%20the%20A%20Book%20Apart%20brand%2C%20founded%20by%20Mandy%20Brown%2C%20Jason%20Santa%20Maria%2C%20and%20Jeffrey%20Zeldman." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;title=Reviewing%20HTML5%20for%20Web%20Designers" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Reviewing%20HTML5%20for%20Web%20Designers&amp;url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;t=Reviewing%20HTML5%20for%20Web%20Designers" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;title=Reviewing%20HTML5%20for%20Web%20Designers&amp;annotation=HTML5%20for%20Web%20Designers%2C%20written%20by%20Jeremy%20Keith%2C%20is%20the%20first%20book%20to%20be%20published%20under%20the%20A%20Book%20Apart%20brand%2C%20founded%20by%20Mandy%20Brown%2C%20Jason%20Santa%20Maria%2C%20and%20Jeffrey%20Zeldman." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Reviewing%20HTML5%20for%20Web%20Designers&amp;link=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;t=Reviewing%20HTML5%20for%20Web%20Designers" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;title=Reviewing%20HTML5%20for%20Web%20Designers&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=HTML5%20for%20Web%20Designers%2C%20written%20by%20Jeremy%20Keith%2C%20is%20the%20first%20book%20to%20be%20published%20under%20the%20A%20Book%20Apart%20brand%2C%20founded%20by%20Mandy%20Brown%2C%20Jason%20Santa%20Maria%2C%20and%20Jeffrey%20Zeldman." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;h=Reviewing%20HTML5%20for%20Web%20Designers" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Freviewing-html5-for-web-designers%2F&amp;t=Reviewing%20HTML5%20for%20Web%20Designers&amp;s=HTML5%20for%20Web%20Designers%2C%20written%20by%20Jeremy%20Keith%2C%20is%20the%20first%20book%20to%20be%20published%20under%20the%20A%20Book%20Apart%20brand%2C%20founded%20by%20Mandy%20Brown%2C%20Jason%20Santa%20Maria%2C%20and%20Jeffrey%20Zeldman." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/reviewing-html5-for-web-designers/" rel="bookmark">Reviewing HTML5 for Web Designers</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on July 27, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/reviewing-html5-for-web-designers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>You can still use div</title>
		<link>http://html5doctor.com/you-can-still-use-div/</link>
		<comments>http://html5doctor.com/you-can-still-use-div/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 13:30:37 +0000</pubDate>
		<dc:creator>Mike Robinson</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1853</guid>
		<description><![CDATA[
			
				
			
		
&#8220;Sorry, can you say that again?&#8221;, I hear you ask. Certainly: you can still use &#60;div&#62;! Despite HTML5 bringing us new elements like &#60;article&#62;, &#60;section&#62;, and &#60;aside&#62;, the &#60;div&#62; element still has its place. Let the HTML5 Doctor tell you why.

Status: Unchanged
In HTML 4, the &#60;div&#62; element was defined to be a generic element for [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>&#8220;Sorry, can you say that again?&#8221;, I hear you ask. Certainly: you can still use <code>&lt;div&gt;</code>! Despite <abbr title="HyperText Markup Language">HTML</abbr>5 bringing us new elements like <code>&lt;article&gt;</code>, <code>&lt;section&gt;</code>, and <code>&lt;aside&gt;</code>, the <code>&lt;div&gt;</code> element still has its place. Let the <abbr>HTML</abbr>5 Doctor tell you why.</p>
<p><span id="more-1853"></span></p>
<h2>Status: Unchanged</h2>
<p>In <abbr>HTML</abbr> 4, the <code>&lt;div&gt;</code> element was defined to be a generic element for structuring a page. Although you can allude to the nature of its content by assigning <code>id</code> and <code>class</code> attributes with meaningful names, a <code>&lt;div&gt;</code> has almost no semantic meaning. <a href="http://dev.w3.org/html5/spec/Overview.html#the-div-element">The <abbr>HTML</abbr>5 definition</a>is basically the same as in <abbr>HTML</abbr> 4:</p>
<blockquote>
<p>The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements.</p>
<p>  <footer><br />
    <cite><a href="http://dev.w3.org/html5/spec/Overview.html#the-div-element">W3C Specification</a></cite><br />
  </footer>
</p></blockquote>
<p><code>&lt;div&gt;</code> is literally a container for flow content*, a collection of (hopefully) more semantically marked-up content that may need to be grouped together. It lies at the opposite end of the semantic spectrum from the new <abbr>HTML</abbr>5 structural elements.</p>
<p><small>* For those who haven&#8217;t encountered this term before, <a href="http://dev.w3.org/html5/spec/Overview.html#flow-content-0">flow content</a> elements are the same as <abbr>HTML</abbr> 4&#8217;s block-level content elements.</small></p>
<h2><code>&lt;div&gt;</code> vs semantic elements</h2>
<p>The new semantic elements (<code>&lt;article&gt;</code>, <code>&lt;section&gt;</code>, and friends) justifiably capture a lot of <code>&lt;div&gt;</code>&#8217;s territory, but <code>&lt;div&gt;</code> still has a place in the <abbr>HTML</abbr>5 world. You should use <code>&lt;div&gt;</code> when there is no other more semantically appropriate element that suits your purpose. Its most common use will likely be for stylistic purposes — i.e., wrapping some semantically marked-up content in a <abbr>CSS</abbr>-styled container.</p>
<p>Ask yourself questions about your content: Is it part of the site&#8217;s navigation? Is the content secondary to its surrounding content? If this content were printed on a page with nothing else, would it make sense? You will need to evaluate your content carefully, thinking about what it is and pairing it with an appropriate element. I recommend taking a look at <a href="http://html5doctor.com/happy-1st-birthday-us/">The Amazing <abbr>HTML</abbr>5 Doctor Easily Confused <abbr>HTML</abbr>5 Element Flowchart of Enlightenment</a> to help you choose the right element for your flow content.</p>
<h2>Example Uses</h2>
<p>Below are a few examples of how you can still use <code>&lt;div&gt;</code> appropriately in your <abbr>HTML</abbr>5 sites.</p>
<h3>Site Wrapper</h3>
<p>While you can <a href="http://camendesign.com/code/developpeurs_sans_frontieres">use the <code>&lt;body&gt; element</code></a> as a &#8220;natural&#8221; wrapper for site content, many people like to use <code>&lt;div&gt;</code> as top-level container for styling the entire site. This is an appropriate use of <code>&lt;div&gt;</code>, as a site wrapper has no meaning or purpose other than to aid styling.</p>
<pre><code>&lt;body&gt;
  &lt;div id="wrapper"&gt;
    &lt;header&gt;
      &lt;h1&gt;My Happy Blog&lt;/h1&gt;
      &lt;nav&gt;
        &lt;!-- ... --&gt;
      &lt;/nav&gt;
    &lt;/header&gt;

    &lt;!-- ... rest of site content ... --&gt;
  &lt;/div&gt;
&lt;/body&gt;</code></pre>
<h3>Intro paragraph</h3>
<p>If you want to style a particular block of content, like the intro to an article, <code>&lt;div&gt;</code> is a perfectly suitable element:</p>
<pre><code>&lt;article&gt;
  &lt;h1&gt;Big announcement&lt;/h1&gt;
  &lt;div class="intro"&gt;
    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;
    &lt;p&gt;Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.&lt;/p&gt;
  &lt;/div&gt;
  &lt;p&gt;Sed massa metus, molestie nec facilisis non, lobortis ac orci. Suspendisse porttitor laoreet mi, at laoreet dolor rhoncus non. Sed ut massa quis mi placerat iaculis non sit amet odio. Cras tempus urna vitae felis rutrum porta.&lt;/p&gt;
  &lt;p&gt;Maecenas auctor lacus eget mauris tincidunt consectetur. Donec molestie malesuada ligula, sed feugiat massa consequat sit amet. Pellentesque orci metus, ultricies sit amet adipiscing eget, gravida fringilla dui. Vestibulum accumsan dui diam, eget venenatis urna. Sed eu lobortis justo. Aliquam erat volutpat. Aliquam erat volutpat.&lt;/p&gt;
&lt;/article&gt;</code></pre>
<p>The first two paragraphs aren&#8217;t really that different from the rest of the article, but by wrapping them in a <code>&lt;div&gt;</code>, they can be styled to capture the reader&#8217;s attention and draw them into the article. Of course, if you only want to style the first paragraph, you could use a <abbr>CSS</abbr> selector like <code>h1 + p {}</code> or <code>article p:first-child {}</code>. But if you want to style an article&#8217;s first paragraph only <em>sometimes</em>, or you need the style to work in older versions of Internet Explorer, or (as in this case) you want style more than one paragraph, a wrapper <code>&lt;div&gt;</code> is the way to go.</p>
<h3>Other uses for <code>&lt;div&gt;</code></h3>
<p>As previously stated, use of <code>&lt;div&gt;</code> will decline in favour of the new semantic elements. If you&#8217;re using lots of <code>&lt;div&gt;</code>s and only a few of the semantic elements in your <abbr>HTML</abbr>5 sites, then you&#8217;re really not taking advantage of what <abbr>HTML</abbr>5 has to offer.</p>
<p>That said, you may need to rely on <code>&lt;div&gt;</code> as you transition into the world of <abbr>HTML</abbr>5. For example, if many of your site&#8217;s visitors use Internet Explorer with JavaScript disabled, then you won&#8217;t be able to style the new elements for these users. A piece of advice we gave back in our article on <a href="http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/">how to use <abbr>HTML</abbr>5 in your client work right now</a> was to use <code>&lt;div&gt;</code> with classes named after the new semantic elements, getting you to think about how you would use the new semantic elements without actually using them.</p>
<pre><code>&lt;div class="article"&gt;
  &lt;div class="header"&gt;
    &lt;h1&gt;My blog post&lt;/h1&gt;
    &lt;p&gt;An example using divs with classes instead of the new elements.&lt;/p&gt;
  &lt;/div&gt;
  &lt;!-- ... content ... --&gt;
&lt;/div&gt;

&lt;article&gt;
  &lt;header&gt;
    &lt;h1&gt;My blog post&lt;/h1&gt;
    &lt;p&gt;The same article but switched to the new elements.&lt;/p&gt;
  &lt;/header&gt;
  &lt;!-- ... content ... --&gt;
&lt;/article&gt;</code></pre>
<p>This makes it simple to switch to the new elements when it becomes practical (think &#8220;search and replace&#8221;).</p>
<h2>Recap</h2>
<p>You will certainly use <code>&lt;div&gt;</code> less often in <abbr>HTML</abbr>5 than you did in <abbr>HTML</abbr> 4, but it&#8217;s still a valuable element to have in your toolkit. Sure, it&#8217;ll be picked last for the team because everyone else is better, but it&#8217;ll be the best damn generic container element there is!*</p>
<p>Look at the more semantically valuable elements and consider whether your content would benefit from what they offer. Need help deciding? Take a look at some of these articles right here on <abbr>HTML</abbr>5 Doctor:</p>
<ul>
<li><a href="http://html5doctor.com/the-header-element/">header</a></li>
<li><a href="http://html5doctor.com/the-footer-element/">footer</a></li>
<li><a href="http://html5doctor.com/aside-revisited/">aside</a></li>
<li><a href="http://html5doctor.com/the-article-element/">article</a></li>
<li><a href="http://html5doctor.com/the-section-element/">section</a></li>
<li><a href="http://html5doctor.com/the-figure-figcaption-elements/">figure</a></li>
<li><a href="http://html5doctor.com/nav-element/">nav</a></li>
</ul>
<p>For more, check our <a href="http://html5doctor.com/article-archive/">article archive</a>. And if all else fails, use a <code>&lt;div&gt;</code>!</p>
<p><small>* As it should be, it&#8217;s the only one apart from <code>&lt;span&gt;</code>. That said, if your content is just text, perhaps the oft-overlooked <code>&lt;p&gt;</code> would be more appropriate.</small>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/understanding-aside/" rel="bookmark" class="crp_title">Understanding aside</a></li>
<li><a href="http://html5doctor.com/aside-revisited/" rel="bookmark" class="crp_title">Aside Revisited</a></li>
<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-header-element/" rel="bookmark" class="crp_title">The header element</a></li>
<li><a href="http://html5doctor.com/the-section-element/" rel="bookmark" class="crp_title">The section element</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=You%20can%20still%20use%20div%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;title=You%20can%20still%20use%20div&amp;bodytext=%22Sorry%2C%20can%20you%20say%20that%20again%3F%22%2C%20I%20hear%20you%20ask.%20Certainly%3A%20you%20can%20still%20use%20%26lt%3Bdiv%26gt%3B%21%20Despite%20HTML5%20bringing%20us%20new%20elements%20like%20%26lt%3Barticle%26gt%3B%2C%20%26lt%3Bsection%26gt%3B%2C%20and%20%26lt%3Baside%26gt%3B%2C%20the%20%26lt%3Bdiv%26gt%3B%20element%20still%20has%20its%20place.%20Let%20the%20HTML5%20Do" title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;title=You%20can%20still%20use%20div" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;title=You%20can%20still%20use%20div&amp;notes=%22Sorry%2C%20can%20you%20say%20that%20again%3F%22%2C%20I%20hear%20you%20ask.%20Certainly%3A%20you%20can%20still%20use%20%26lt%3Bdiv%26gt%3B%21%20Despite%20HTML5%20bringing%20us%20new%20elements%20like%20%26lt%3Barticle%26gt%3B%2C%20%26lt%3Bsection%26gt%3B%2C%20and%20%26lt%3Baside%26gt%3B%2C%20the%20%26lt%3Bdiv%26gt%3B%20element%20still%20has%20its%20place.%20Let%20the%20HTML5%20Do" title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;title=You%20can%20still%20use%20div" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=You%20can%20still%20use%20div&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;t=You%20can%20still%20use%20div" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;title=You%20can%20still%20use%20div&amp;annotation=%22Sorry%2C%20can%20you%20say%20that%20again%3F%22%2C%20I%20hear%20you%20ask.%20Certainly%3A%20you%20can%20still%20use%20%26lt%3Bdiv%26gt%3B%21%20Despite%20HTML5%20bringing%20us%20new%20elements%20like%20%26lt%3Barticle%26gt%3B%2C%20%26lt%3Bsection%26gt%3B%2C%20and%20%26lt%3Baside%26gt%3B%2C%20the%20%26lt%3Bdiv%26gt%3B%20element%20still%20has%20its%20place.%20Let%20the%20HTML5%20Do" title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=You%20can%20still%20use%20div&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;t=You%20can%20still%20use%20div" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;title=You%20can%20still%20use%20div&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=%22Sorry%2C%20can%20you%20say%20that%20again%3F%22%2C%20I%20hear%20you%20ask.%20Certainly%3A%20you%20can%20still%20use%20%26lt%3Bdiv%26gt%3B%21%20Despite%20HTML5%20bringing%20us%20new%20elements%20like%20%26lt%3Barticle%26gt%3B%2C%20%26lt%3Bsection%26gt%3B%2C%20and%20%26lt%3Baside%26gt%3B%2C%20the%20%26lt%3Bdiv%26gt%3B%20element%20still%20has%20its%20place.%20Let%20the%20HTML5%20Do" title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;h=You%20can%20still%20use%20div" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fyou-can-still-use-div%2F&amp;t=You%20can%20still%20use%20div&amp;s=%22Sorry%2C%20can%20you%20say%20that%20again%3F%22%2C%20I%20hear%20you%20ask.%20Certainly%3A%20you%20can%20still%20use%20%26lt%3Bdiv%26gt%3B%21%20Despite%20HTML5%20bringing%20us%20new%20elements%20like%20%26lt%3Barticle%26gt%3B%2C%20%26lt%3Bsection%26gt%3B%2C%20and%20%26lt%3Baside%26gt%3B%2C%20the%20%26lt%3Bdiv%26gt%3B%20element%20still%20has%20its%20place.%20Let%20the%20HTML5%20Do" title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/you-can-still-use-div/" rel="bookmark">You can still use div</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on July 13, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/you-can-still-use-div/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered #10</title>
		<link>http://html5doctor.com/your-questions-answered-10/</link>
		<comments>http://html5doctor.com/your-questions-answered-10/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:45:00 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[block links]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[headings]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[outline]]></category>
		<category><![CDATA[section]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1991</guid>
		<description><![CDATA[<p>The clinic is getting busy with more  <abbr>HTML</abbr>5 ailments. This week, we'll cover using sections within a footer, <code>&#60;canvas&#62;</code> vs. Flash security, why <abbr>HTML</abbr>5 elements are treated as inline, using offline with storage, and marking up block quotes.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
			</a>
		</div><p><img src="http://html5doctor.com/wp-content/uploads/2009/07/html5doctor-treatment.gif" alt="Doctor treating a patient illustration" class="alignright size-full wp-image-424" /> The clinic is getting busy with more  <abbr>HTML</abbr>5 ailments. This week, we&#8217;ll cover using sections within a footer, <code>&lt;canvas&gt;</code> vs. Flash security, why <abbr>HTML</abbr>5 elements are treated as inline, using offline with storage, and marking up block quotes.</p>

<section>
<h2>Footer with sections</h2>

<p>Tommie asked:</p>
<blockquote><p>Hi, I&#8217;ll get to the point right away. I want to use, lets say 3 section elements inside a footer each floating left and inside each of this sections I have some standard information. Is this the right way to go, or should I put my section elements outside the footer and only put copyright text etc. inside the footer?</p>

<p>Thanks!</p></blockquote>

<p>You could use a <code>&lt;section&gt;</code> within <code>&lt;footer&gt;</code>. <del>but <code>&lt;footer&gt;</code> is a sectioning root anyway</del> <ins><code>&lt;footer&gt;</code> is flow content and can contain sectioning content.</ins> If you want them to appear in the outline within the footer, then it makes perfect sense to do as you suggest.</p>

<p>See more in Jack&#8217;s article on <a href="http://html5doctor.com/the-footer-element/">the <code>&lt;footer&gt;</code> element.</a> There are also some more examples in <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element">the spec</a>.</p>

<p>Cheers, Rich</p>
</section>

<section>
<h2><code>&lt;canvas&gt;</code> vs. Flash (security and copyright)</h2>
<p>John asked:</p>
<blockquote><p>I&#8217;m seeing lots of opinions that the <code>canvas</code> element might free us of the Adobe Flash monopoly, but what mechanisms can we use to protect our works when using straight HTML and JavaScript?</p>

<p>Right now I&#8217;m thinking about simple flash games, but I&#8217;m sure this is a concern for others wanting to use (free) <abbr>HTML</abbr> methods to perform functions now reserved more for flash.</p>

<p>Thanks for any input.</p></blockquote>

<p>I&#8217;m not sure of any security mechanisms that we can use to protect <code>&lt;canvas&gt;</code> content. It isn&#8217;t really any different than an image or any other type of resource. Having said that, decompilers can circumvent some of Flash&#8217;s security measures as well, so you may not be much worse off using <code>&lt;canvas&gt;</code>.</p>

<p>If we come across anything, we&#8217;ll be sure to let you know.</p>

<p>Cheers, Rich</p>
</section>

<section>
<h2><abbr>HTML</abbr>5 tags inline?</h2>
<p>Tami asked:</p>
<blockquote><p>So, I&#8217;ve been experimenting with the new <abbr>HTML</abbr>5 elements, and one frustration I have is understanding the native display of the new elements, and how it works within the document flow. So far, experimenting with them has shown them to be very unpredictable. At best, they&#8217;re kind of behaving like a bastard span. They seem to be behaving like inline elements but that seems like it is wrong. In some cases, setting to display: block gives the expected behavior, but on the footer tag, it&#8217;s not interacting with floated elements properly.</p>

<p>So, are these new elements inline or are browsers still just trying to catch up? I tried looking in in the <abbr>HTML</abbr>5 working draft spec, but so far I am not understanding the way its written (<abbr>HTML</abbr>4&#8217;s specs clearly spelled out whether an element was display or inline).</p></blockquote>

<p>Here&#8217;s an article from my personal blog that I wrote a while ago describing <a href="http://www.brucelawson.co.uk/2009/why-browsers-treat-html5-elements-as-inline/">why browsers treat <abbr>HTML</abbr>5 elements as inline</a>.</p>

<p>Thanks, Bruce.</p>
</section>

<section>
<h2>Offline + Storage</h2>
<blockquote><p>Dear Doctor, I&#8217;m trying to work out if <abbr>HTML</abbr>5 will be able to do the job that I want. I have a number of documents (<abbr>PDF</abbr>, <abbr>PPT</abbr>, etc.) that I want to share with people in my team. These documents may change from time to time. Also, the people may not always be connected online.</p>

<p>Would it be possible to &#8220;cache&#8221; documents in an offline database in the browser so that when they are not connected they can still view them but when they are, they get the latest versions (which also refresh the cache)?</p>

<p>That way I can do a fairly pretty interface for sorting these documents so that they can easily find them.</p>

<p>Thanks in advance for any help you can provide.</p></blockquote>

<p>You <em>can</em>, but I would strongly encourage you to think carefully about whether it&#8217;s worth it.</p>

<p>You can include these &#8220;assets&#8221; in the manifest, which will make the files available to the offline applications (note that this <strong>isn&#8217;t</strong> storage, just caching, which is what you&#8217;re after).</p>

<p>The problem is that when the visitor first hits the page with the manifest — which contains all the <abbr>PDF</abbr>s, <abbr>PPT</abbr>s, etc. — it will download <strong>all</strong> of these files. This is the bit that I&#8217;d encourage you to consider carefully. To compound that, I believe there&#8217;s a 5MB limit on the cache, so you might run into problems if you&#8217;re trying to cache more than that.</p>

<p>I&#8217;ve not covered offline cache on <abbr>HTML</abbr>5 Doctor yet (though it&#8217;s on the list), but I have described the process on my <a href="http://24ways.org/2009/breaking-out-the-edges-of-the-browser">24ways article</a>.</p> 

<p>If there are new versions of the cached files, you need to change the <em>contents</em> of the manifest — e.g., include a version number, which will trigger a download of <strong>all</strong> the assets again.  Not ideal, but that&#8217;s the current situation.</p>

<p>Hope that helps a bit, Remy</p>
</section>

<section>
<h2>Correct markup with blockquote</h2>
<p>Phil asked:</p>
<blockquote><p>Hi, in <abbr>HTML</abbr> 4.0 Strict and <abbr>XHTML</abbr> 1.0 Strict, text inside a <code>blockquote</code> element is required to be nested inside another block-level element, e.g. <code>p</code>.</p>

<p>In <abbr>HTML</abbr>5 that requirement seems to have been relaxed, as the following element validates successfully:</p>

<pre><code>&lt;blockquote&gt;This is a blockquote.&lt;/blockquote&gt;</code></pre>

<p>The HTML5 spec uses the <code>p</code> element in the usage examples, but does not mention whether it is required.</p>

<p>Can you please confirm if this requirement has now been deprecated?</p></blockquote>

<p>Great question. As I expected, this validates:</p>

<pre><code>&lt;!doctype html&gt;
&lt;meta charset=utf-8&gt;
&lt;title&gt;blockquote test&lt;/title&gt;
&lt;blockquote&gt;Tiger tiger burning bright&lt;/blockquote&gt;</code></pre>

<p>We double-checked with the <abbr>WHATWG</abbr> mailing list and confirmed that <code>&lt;blockquote&gt;</code> can contain &#8216;flow&#8217; content (i.e., text, paragraphs, etc.).</p>

<p>To summarise, it would be valid not to further mark up content within a <code>&lt;blockquote&gt;</code>, but authors are encouraged to use a <code>&lt;p&gt;</code> (or other more appropriate element).</p>

<p>Bruce</p>
</section>

<section>
<h2>Got a question for us?</h2>
<p>That wraps up this round of questions! If you&#8217;ve got a query about the <abbr>HTML</abbr>5 spec or how to implement it, you can <a href="http://html5doctor.com/ask-the-doctor/">get in touch</a> with us and we&#8217;ll do our best to help.</p>
</section><div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark" class="crp_title">Your Questions Answered 9</a></li><li><a href="http://html5doctor.com/your-questions-answered-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li><li><a href="http://html5doctor.com/your-questions-5/" rel="bookmark" class="crp_title">Your Questions Answered #5</a></li><li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li><li><a href="http://html5doctor.com/your-questions-answered-3/" rel="bookmark" class="crp_title">Your Questions Answered #3</a></li></ul></div>


Share and Save:


	<a rel="nofollow"  href="http://twitter.com/home?status=Your%20Questions%20Answered%20%2310%20-%20http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;title=Your%20Questions%20Answered%20%2310&amp;bodytext=The%20clinic%20is%20getting%20busy%20with%20more%20%20HTML5%20ailments.%20This%20week%2C%20we%27ll%20cover%20using%20sections%20within%20a%20footer%2C%20%26lt%3Bcanvas%26gt%3B%20vs.%20Flash%20security%2C%20why%20HTML5%20elements%20are%20treated%20as%20inline%2C%20using%20offline%20with%20storage%2C%20and%20marking%20up%20block%20quotes." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;title=Your%20Questions%20Answered%20%2310" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;title=Your%20Questions%20Answered%20%2310&amp;notes=The%20clinic%20is%20getting%20busy%20with%20more%20%20HTML5%20ailments.%20This%20week%2C%20we%27ll%20cover%20using%20sections%20within%20a%20footer%2C%20%26lt%3Bcanvas%26gt%3B%20vs.%20Flash%20security%2C%20why%20HTML5%20elements%20are%20treated%20as%20inline%2C%20using%20offline%20with%20storage%2C%20and%20marking%20up%20block%20quotes." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;title=Your%20Questions%20Answered%20%2310" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Your%20Questions%20Answered%20%2310&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;t=Your%20Questions%20Answered%20%2310" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;title=Your%20Questions%20Answered%20%2310&amp;annotation=The%20clinic%20is%20getting%20busy%20with%20more%20%20HTML5%20ailments.%20This%20week%2C%20we%27ll%20cover%20using%20sections%20within%20a%20footer%2C%20%26lt%3Bcanvas%26gt%3B%20vs.%20Flash%20security%2C%20why%20HTML5%20elements%20are%20treated%20as%20inline%2C%20using%20offline%20with%20storage%2C%20and%20marking%20up%20block%20quotes." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Your%20Questions%20Answered%20%2310&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;t=Your%20Questions%20Answered%20%2310" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;title=Your%20Questions%20Answered%20%2310&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=The%20clinic%20is%20getting%20busy%20with%20more%20%20HTML5%20ailments.%20This%20week%2C%20we%27ll%20cover%20using%20sections%20within%20a%20footer%2C%20%26lt%3Bcanvas%26gt%3B%20vs.%20Flash%20security%2C%20why%20HTML5%20elements%20are%20treated%20as%20inline%2C%20using%20offline%20with%20storage%2C%20and%20marking%20up%20block%20quotes." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;h=Your%20Questions%20Answered%20%2310" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fyour-questions-answered-10%2F&amp;t=Your%20Questions%20Answered%20%2310&amp;s=The%20clinic%20is%20getting%20busy%20with%20more%20%20HTML5%20ailments.%20This%20week%2C%20we%27ll%20cover%20using%20sections%20within%20a%20footer%2C%20%26lt%3Bcanvas%26gt%3B%20vs.%20Flash%20security%2C%20why%20HTML5%20elements%20are%20treated%20as%20inline%2C%20using%20offline%20with%20storage%2C%20and%20marking%20up%20block%20quotes." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>


<br/><br/><p><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark">Your Questions Answered #10</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on July 9, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-answered-10/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Happy 1st Birthday us</title>
		<link>http://html5doctor.com/happy-1st-birthday-us/</link>
		<comments>http://html5doctor.com/happy-1st-birthday-us/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 09:45:27 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[@media]]></category>
		<category><![CDATA[flowchart]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=2135</guid>
		<description><![CDATA[<p>It's our birthday and we'll cry if we want to, or so the song goes. Today marks HTML5 Doctors first birthday so we thought we'd let you in on the celebrations. This brief post takes us through a little recap of what we've done, looks at what's to come and we've even got a little birthday treat for you all - the HTML5 equivalent of bringing doughnuts to work.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
			</a>
		</div><p>It&#8217;s our birthday and we&#8217;ll cry if we want to, or so the song goes. Today marks HTML5 Doctors first birthday so we thought we&#8217;d let you in on the celebrations. This brief post takes us through a little recap of what we&#8217;ve done, looks at what&#8217;s to come and we&#8217;ve even got a little birthday treat for you all &#8211; the HTML5 equivalent of bringing doughnuts to work.</p>

<h2>What we&#8217;ve done</h2>

<p><img src="http://html5doctor.com/wp-content/uploads/2010/06/doc2.jpg" alt="Illustration of a doctor" width="200" height="337" class="alignright size-full wp-image-2161" />The site was launched publicly a year ago today and what a year it&#8217;s been. We could never have expected the level of interest we&#8217;ve had nor that the site would be so well received. We&#8217;d like to thank you all for reading, commenting and linking to our articles. We intended the site to have a community feel and feel we&#8217;re continuing to work towards that.</p>

<p>Having met through twitter and then in person at <a href="http://futureofwebdesign.com">FOWD</a> 2009 the idea was formed over a few beers. The name derives from a certain <a href="http://twitter.com/zeldman">Mr Zeldman&#8217;s</a> <a href="http://www.zeldman.com/about/">&#8220;Ask Dr Web&#8221; (&#8220;A complete guide to web design&#8221;)</a>. You can find a little more on our <a href="http://html5doctor.com/about/">history over on the about page</a>. </p>

<p>We started with five doctors (Jack, Tom, Mike, Bruce &amp; Rich), which became six just before launch when <a href="http://twitter.com/rem">Remy</a> came on board. We&#8217;ve since grown to seven with the indomitable <a href="http://twitter.com/boblet">Mr Studholme</a> joining our ranks several months ago. Extra credit should also go to <a href="http://bclennox.com">Brandan Lennox</a> who knuckles away in the background studiously editing our copy. Between us we&#8217;ve managed to crank out more than a post a week, which we hope will increase in the coming year. </p>

<p>We&#8217;ve also had several guest authors who have covered some great topics such as audio in the browser, why designers should care about <abbr>HTML</abbr>5 and data attributes so thanks to <a href="http://twitter.com/maboa">Mark</a>, <a href="http://twitter.com/cennydd">Cennydd</a> &amp; <a href="http://twitter.com/stompfrog">Chris</a>.

<p>Last November we launched the <a href="http://html5doctor.com/glossary">glossary</a> which offers an introductory view to <abbr>HTML</abbr>5 elements with code examples and links to our more in depth articles. It&#8217;s been a well used resource and we&#8217;re adding to it all the time, slowly building it up to be a complete resource.</p>

<p>In terms of events at least one of our team has spoken at a number of events in the past year, not least Bruce (with Martin Kliehm) being voted the 4th best talk at <abbr>SXSWi</abbr>. Also, earlier this month we ran a <abbr>HTML</abbr>5 clinic at Web Directions @Media in London. I think we managed to help quite a few people out down there. Remember to <a href="http://html5doctor.com/contact">get in touch</a> if you&#8217;re looking for someone to talk <abbr>HTML</abbr>5 at your event or you feel you need an emergency clinic setting up.</p>

<h2>Future Plans</h2>

<p>That&#8217;s enough looking back, now let&#8217;s start looking forward. We&#8217;ve got some cracking posts and super developments in the works for the coming months. I can&#8217;t say much more than that right now but I can tell you we&#8217;ll have articles on web forms, canvas, microdata and taking your applications offline in the not too distant future.</p>

<p>What we&#8217;d really love to do is to start writing articles that you, our readers want. So here&#8217;s your chance, if you&#8217;ve got a topic you&#8217;d like us to cover or an idea for the site then <em>please</em> leave a comment below. We&#8217;ll take a look through them and get writing.</p>

<h2>A small gift</h2>

<p>Everyone likes to receive a present on their birthday right? Well for our birthday we decided to give you a present, in the form of a handy flowchart to help you choose the most semantically appropriate <abbr>HTML</abbr>5 element. Those lucky folk who attended <a href="http://atmedia.webdirections.org/">@media</a> already received have a hard copy but here&#8217;s the electronic version you asked for.</p>

<p><img src="http://html5doctor.com/wp-content/uploads/2010/06/element-flowchart2-600.jpg" alt="HTML5 Doctor Element Selection Flowchart" /></p>

<p>Inspired by an original version sent in by <a href="http://twitter.com/riddle">Piotr</a> (one of our readers) and developed by <a href="http://twitter.com/boblet">Oli</a> the chart helps guide you through those tricky differences between <code>header</code>, <code>footer</code>, <code>aside</code>, <code>section</code>, <code>article</code>, <code>figure</code> and yes, <code>div</code>. It&#8217;s available in either <abbr>pdf</abbr> or <abbr>png</abbr> format.</p>

<div class="downloads">
<p><a href="http://html5doctor.com/wp-content/uploads/HTML5Doctor-sectioning-flowchart.pdf" target="_blank"><img src="http://html5doctor.com/wp-content/uploads/2010/06/icon-pdf.png" alt="PDF Flowchart Download" /><br />Download PDF [320kb]</a></p>

<p><a href="http://html5doctor.com/wp-content/uploads/HTML5Doctor-sectioning-flowchart.png" target="_blank"><img src="http://html5doctor.com/wp-content/uploads/2010/06/icon-png.png" alt="PNG Flowchart Download" /><br />Download PNG [110kb]</a></p>
</div>

<p style="clear:both;">We hope you find it useful and we&#8217;d love to hear any feedback you might have.</p>

<p>All that&#8217;s left for us to say is thanks for a great first year and here&#8217;s to the next one!</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/web-directions-atmedia-2010/" rel="bookmark" class="crp_title">HTML5 Doctor at Web Directions @media</a></li><li><a href="http://html5doctor.com/your-questions-5/" rel="bookmark" class="crp_title">Your Questions Answered #5</a></li><li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li><li><a href="http://html5doctor.com/your-questions-answered-10/" rel="bookmark" class="crp_title">Your Questions Answered #10</a></li><li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li></ul></div>


Share and Save:


	<a rel="nofollow"  href="http://twitter.com/home?status=Happy%201st%20Birthday%20us%20-%20http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;title=Happy%201st%20Birthday%20us&amp;bodytext=It%27s%20our%20birthday%20and%20we%27ll%20cry%20if%20we%20want%20to%2C%20or%20so%20the%20song%20goes.%20Today%20marks%20HTML5%20Doctors%20first%20birthday%20so%20we%20thought%20we%27d%20let%20you%20in%20on%20the%20celebrations.%20This%20brief%20post%20takes%20us%20through%20a%20little%20recap%20of%20what%20we%27ve%20done%2C%20looks%20at%20what%27s%20to%20come%20and%20we%27ve%20even%20got%20a%20little%20birthday%20treat%20for%20you%20all%20-%20the%20HTML5%20equivalent%20of%20bringing%20doughnuts%20to%20work." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;title=Happy%201st%20Birthday%20us" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;title=Happy%201st%20Birthday%20us&amp;notes=It%27s%20our%20birthday%20and%20we%27ll%20cry%20if%20we%20want%20to%2C%20or%20so%20the%20song%20goes.%20Today%20marks%20HTML5%20Doctors%20first%20birthday%20so%20we%20thought%20we%27d%20let%20you%20in%20on%20the%20celebrations.%20This%20brief%20post%20takes%20us%20through%20a%20little%20recap%20of%20what%20we%27ve%20done%2C%20looks%20at%20what%27s%20to%20come%20and%20we%27ve%20even%20got%20a%20little%20birthday%20treat%20for%20you%20all%20-%20the%20HTML5%20equivalent%20of%20bringing%20doughnuts%20to%20work." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;title=Happy%201st%20Birthday%20us" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Happy%201st%20Birthday%20us&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;t=Happy%201st%20Birthday%20us" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;title=Happy%201st%20Birthday%20us&amp;annotation=It%27s%20our%20birthday%20and%20we%27ll%20cry%20if%20we%20want%20to%2C%20or%20so%20the%20song%20goes.%20Today%20marks%20HTML5%20Doctors%20first%20birthday%20so%20we%20thought%20we%27d%20let%20you%20in%20on%20the%20celebrations.%20This%20brief%20post%20takes%20us%20through%20a%20little%20recap%20of%20what%20we%27ve%20done%2C%20looks%20at%20what%27s%20to%20come%20and%20we%27ve%20even%20got%20a%20little%20birthday%20treat%20for%20you%20all%20-%20the%20HTML5%20equivalent%20of%20bringing%20doughnuts%20to%20work." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Happy%201st%20Birthday%20us&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;t=Happy%201st%20Birthday%20us" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;title=Happy%201st%20Birthday%20us&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=It%27s%20our%20birthday%20and%20we%27ll%20cry%20if%20we%20want%20to%2C%20or%20so%20the%20song%20goes.%20Today%20marks%20HTML5%20Doctors%20first%20birthday%20so%20we%20thought%20we%27d%20let%20you%20in%20on%20the%20celebrations.%20This%20brief%20post%20takes%20us%20through%20a%20little%20recap%20of%20what%20we%27ve%20done%2C%20looks%20at%20what%27s%20to%20come%20and%20we%27ve%20even%20got%20a%20little%20birthday%20treat%20for%20you%20all%20-%20the%20HTML5%20equivalent%20of%20bringing%20doughnuts%20to%20work." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;h=Happy%201st%20Birthday%20us" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fhappy-1st-birthday-us%2F&amp;t=Happy%201st%20Birthday%20us&amp;s=It%27s%20our%20birthday%20and%20we%27ll%20cry%20if%20we%20want%20to%2C%20or%20so%20the%20song%20goes.%20Today%20marks%20HTML5%20Doctors%20first%20birthday%20so%20we%20thought%20we%27d%20let%20you%20in%20on%20the%20celebrations.%20This%20brief%20post%20takes%20us%20through%20a%20little%20recap%20of%20what%20we%27ve%20done%2C%20looks%20at%20what%27s%20to%20come%20and%20we%27ve%20even%20got%20a%20little%20birthday%20treat%20for%20you%20all%20-%20the%20HTML5%20equivalent%20of%20bringing%20doughnuts%20to%20work." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>


<br/><br/><p><a href="http://html5doctor.com/happy-1st-birthday-us/" rel="bookmark">Happy 1st Birthday us</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on June 29, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/happy-1st-birthday-us/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>The dl element</title>
		<link>http://html5doctor.com/the-dl-element/</link>
		<comments>http://html5doctor.com/the-dl-element/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 14:00:10 +0000</pubDate>
		<dc:creator>Mike Robinson</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[dl]]></category>
		<category><![CDATA[dt]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=725</guid>
		<description><![CDATA[
			
				
			
		
The &#60;dl&#62; element existed in HTML 4, but it&#8217;s been repurposed in HTML5. Let the Doctor explain what&#8217;s changed and how it can be used.

It’s all in the description
In HTML 4, &#60;dl&#62; was considered a “definition list”, containing groups of terms and their definitions. The terms and definitions were a many-to-many relationship: one or more [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>The <code>&lt;dl&gt;</code> element existed in <abbr title="Hypertext Mark-up Language">HTML</abbr> 4, but it&#8217;s been repurposed in <abbr>HTML</abbr>5. Let the Doctor explain what&#8217;s changed and how it can be used.</p>
<p><span id="more-725"></span></p>
<h2>It’s all in the description</h2>
<p>In <abbr>HTML</abbr> 4, <code>&lt;dl&gt;</code> was considered a “definition list”, containing groups of terms and their definitions. The terms and definitions were a many-to-many relationship: one or more terms to one or more definitions. The element was often misunderstood and therefore misused or not used at all in favour of more widely used and (perhaps) less semantic markup.</p>
<p>To address these issues, <code>&lt;dl&gt;</code>’s definition has been refined in <abbr>HTML</abbr>5 as a <a href="http://www.w3.org/TR/html-markup/dl.html#dl">description list</a>. From the spec:</p>
<blockquote><p>The dl element represents an association list consisting of zero or more name-value groups (a description list). Each group must consist of one or more names (dt elements) followed by one or more values (dd elements). Within a single dl element, there should not be more than one dt element for each name.</p>
</blockquote>
<p>It maintains the many-to-many relationship between names and values. These groupings use <a href="http://www.w3.org/TR/html-markup/dt.html#dt"><code>&lt;dt&gt;</code></a> to represent the term or name and <a href="http://www.w3.org/TR/html-markup/dd.html#dd"><code>&lt;dd&gt;</code></a> for the description. Also note the last line of the quote, stating that a name should not be used more than once within a single <code>&lt;dl&gt;</code>.</p>
<h2>Example Uses</h2>
<p>I&#8217;ve put together a couple of appropriate uses of <code>&lt;dl&gt;</code> to get your creative juices flowing.</p>
<h3>Glossary</h3>
<p><code>&lt;dl&gt;</code> can be used to mark-up a glossary of terms, although you must remember to use <code>&lt;dfn&gt;</code> to indicate that the word is defined here:</p>
<pre><code>&lt;article&gt;
  &lt;h1&gt;The article element&lt;/h1&gt;
  &lt;p&gt;An independent piece of content, one suitable for putting in an
    article element, is content that makes sense on it&rsquo;s own. This yardstick
    is up to your interpretation, but an easy smell test is would this make sense
    in an RSS feed? Of course weblog articles and static pages would make sense
    in a feed reader, and some sites have weblog comment feeds..&lt;/p&gt;
  ...
  &lt;aside&gt;
    &lt;h2&gt;Glossary&lt;/h2&gt;
    &lt;dl&gt;
      &lt;dt&gt;&lt;dfn&gt;RSS&lt;/dfn&gt;&lt;/dt&gt;
      &lt;dd&gt;An XML format for aggregating information from websites whose
        content is frequently updated.&lt;/dd&gt;
      &lt;dt&gt;&lt;dfn&gt;Weblog&lt;/dfn&gt;&lt;/dt&gt;
      &lt;dd&gt;Contraction of the term &quot;web log&quot;, a weblog is a
        website that is periodically updated, like a journal&lt;/dd&gt;
    &lt;/dl&gt;
  &lt;/aside&gt;
&lt;/aticle&gt;
</code></pre>
<p>The example content is from <a href="http://html5doctor.com/the-article-element/">our recent post on the article element</a>. In the example, I plucked out the terms &#8220;RSS&#8221; and &#8220;weblog&#8221; and defined them in a handy glossary. Since this information is supplementary to the article, the glossary has been placed in an <code>&lt;aside&gt;</code>.</p>
<h3>Metadata</h3>
<p><code>&lt;dl&gt;</code> is also appropriate for marking up content metadata, such as information about our article on <a href="http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/">how to use <abbr>HTML</abbr>5 in your client work right now</a>.</p>
<pre><code>&lt;dl&gt;
  &lt;dt&gt;Authors:&lt;/dt&gt;
  &lt;dd&gt;Remy Sharp&lt;/dd&gt;
  &lt;dd&gt;Rich Clark&lt;/dd&gt;
  &lt;dt&gt;Editor:&lt;/dt&gt;
  &lt;dd&gt;Brandan Lennox&lt;/dd&gt;
  &lt;dt&gt;Category:&lt;/dt&gt;
  &lt;dd&gt;Comment&lt;/dd&gt;
&lt;/dl&gt;
</code></pre>
<p>Since Remy and Richard contributed to that article, they are both listed as authors, showing the pairing of multiple values (<code>&lt;dd&gt;</code>) to one key (<code>&lt;dt&gt;</code>).</p>
<h3>Multiple keys (<code>&lt;dt&gt;</code>) to a single value</h3>
<p>As mentioned above, a <code>&lt;dl&gt;</code> may map many keys (<code>&lt;dt&gt;</code>) to many values (<code>&lt;dd&gt;</code>). This means that one term might have multiple descriptions, or there may be multiple terms that mean the same thing. Related <code>&lt;dt&gt;</code>s should follow each other immediately before their descriptive <code>&lt;dd&gt;</code>.</p>
<pre><code>&lt;dl&gt;
  &lt;dt lang="en-GB"&gt;&lt;dfn&gt;colour&lt;/dfn&gt;&lt;/dt&gt;
  &lt;dt lang="en-US"&gt;&lt;dfn&gt;color&lt;/dfn&gt;&lt;/dt&gt;
  &lt;dd&gt;The visual result of light in their emission, transmission and/or reflection. This perception is determined by the hue, brightness and saturation of the light at a specific point. &lt;/dd&gt;
&lt;/dl&gt;
</code></pre>
<p>Here I have indicated that there are two different spellings of &#8220;colour&#8221; and grouped these terms to match them with the same description.</p>
<p>It is not appropriate, however, to use the same key multiple times within a single <code>&lt;dl&gt;</code>. You can&#8217;t define &#8220;car&#8221; as one thing at the start of a <code>&lt;dl&gt;</code> and then define it again at the end of that same <code>&lt;dl&gt;</code>. If you have multiple descriptions for a single term, you should list both <code>&lt;dd&gt;</code>s directly under the same <code>&lt;dt&gt;</code>.</p>
<pre><code>&lt;dl&gt;
  &lt;dt&gt;&lt;dfn&gt;Chips&lt;/dfn&gt;&lt;/dt&gt;
  &lt;dd&gt;Strips of potato usually deep fried in fat. Commonly referred to as "french fries".&lt;/dd&gt;
  &lt;dd&gt;A small fragment that has been broken off from a larger body (e.g. stone).&lt;/dd&gt;
&lt;/dl&gt;
</code></pre>
<h2>What it should not be used for</h2>
<p>Dialogue was a suggested use for <code>&lt;dl&gt;</code> in <abbr>HTML</abbr> 4, which was widely debated and often considered inappropriate. This application of the element is no longer recommended in <abbr>HTML</abbr>5, and the new definition of the element does indeed back this up. When marking up a conversation, you&#8217;re not describing the speaker, but rather stating what they said. With the demise of <a href="http://html5doctor.com/a-little-more-conversation-with-dialog/"><code>&lt;dialog&gt;</code></a>, conversations have no specific markup element. Instead, the specification makes recommendations of <a href="http://dev.w3.org/html5/spec/Overview.html#conversations">how to mark up conversations</a>.</p>
<h2>Summary</h2>
<p>The changes to <code>&lt;dl&gt;</code> are fairly minor, but the new definition should clear up confusion and enable developers to use it more appropriately. You can use this element to represent key-value pairs semantically and couple it with other elements like <code>&lt;details&gt;</code> and <code>&lt;aside&gt;</code> to give context to this information.</p>
<p>Where do you see yourself using <code>&lt;dl&gt;</code> in <abbr>HTML</abbr>5? Perhaps details about a downloadable file? Or are you going to give your more technical blog articles a glossary? Let us know in the comments!</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/the-article-element/" rel="bookmark" class="crp_title">The article element</a></li>
<li><a href="http://html5doctor.com/a-little-more-conversation-with-dialog/" rel="bookmark" class="crp_title">A little more conversation with dialog</a></li>
<li><a href="http://html5doctor.com/html5-doctor-glossary/" rel="bookmark" class="crp_title">HTML5 Doctor Glossary</a></li>
<li><a href="http://html5doctor.com/aside-revisited/" rel="bookmark" class="crp_title">Aside Revisited</a></li>
<li><a href="http://html5doctor.com/understanding-aside/" rel="bookmark" class="crp_title">Understanding aside</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=The%20dl%20element%20-%20http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;title=The%20dl%20element&amp;bodytext=The%20%26lt%3Bdl%26gt%3B%20element%20existed%20in%20HTML%204%2C%20but%20it%27s%20been%20repurposed%20in%20HTML5.%20Let%20the%20Doctor%20explain%20what%27s%20changed%20and%20how%20it%20can%20be%20used.%0D%0A%0D%0A%0D%0A%0D%0AIt%E2%80%99s%20all%20in%20the%20description%0D%0A%0D%0AIn%20HTML%204%2C%20%26lt%3Bdl%26gt%3B%20was%20considered%20a%20%E2%80%9Cdefinition%20list%E2%80%9D%2C%20containin" title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;title=The%20dl%20element" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;title=The%20dl%20element&amp;notes=The%20%26lt%3Bdl%26gt%3B%20element%20existed%20in%20HTML%204%2C%20but%20it%27s%20been%20repurposed%20in%20HTML5.%20Let%20the%20Doctor%20explain%20what%27s%20changed%20and%20how%20it%20can%20be%20used.%0D%0A%0D%0A%0D%0A%0D%0AIt%E2%80%99s%20all%20in%20the%20description%0D%0A%0D%0AIn%20HTML%204%2C%20%26lt%3Bdl%26gt%3B%20was%20considered%20a%20%E2%80%9Cdefinition%20list%E2%80%9D%2C%20containin" title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;title=The%20dl%20element" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=The%20dl%20element&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;t=The%20dl%20element" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;title=The%20dl%20element&amp;annotation=The%20%26lt%3Bdl%26gt%3B%20element%20existed%20in%20HTML%204%2C%20but%20it%27s%20been%20repurposed%20in%20HTML5.%20Let%20the%20Doctor%20explain%20what%27s%20changed%20and%20how%20it%20can%20be%20used.%0D%0A%0D%0A%0D%0A%0D%0AIt%E2%80%99s%20all%20in%20the%20description%0D%0A%0D%0AIn%20HTML%204%2C%20%26lt%3Bdl%26gt%3B%20was%20considered%20a%20%E2%80%9Cdefinition%20list%E2%80%9D%2C%20containin" title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=The%20dl%20element&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;t=The%20dl%20element" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;title=The%20dl%20element&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=The%20%26lt%3Bdl%26gt%3B%20element%20existed%20in%20HTML%204%2C%20but%20it%27s%20been%20repurposed%20in%20HTML5.%20Let%20the%20Doctor%20explain%20what%27s%20changed%20and%20how%20it%20can%20be%20used.%0D%0A%0D%0A%0D%0A%0D%0AIt%E2%80%99s%20all%20in%20the%20description%0D%0A%0D%0AIn%20HTML%204%2C%20%26lt%3Bdl%26gt%3B%20was%20considered%20a%20%E2%80%9Cdefinition%20list%E2%80%9D%2C%20containin" title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;h=The%20dl%20element" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fthe-dl-element%2F&amp;t=The%20dl%20element&amp;s=The%20%26lt%3Bdl%26gt%3B%20element%20existed%20in%20HTML%204%2C%20but%20it%27s%20been%20repurposed%20in%20HTML5.%20Let%20the%20Doctor%20explain%20what%27s%20changed%20and%20how%20it%20can%20be%20used.%0D%0A%0D%0A%0D%0A%0D%0AIt%E2%80%99s%20all%20in%20the%20description%0D%0A%0D%0AIn%20HTML%204%2C%20%26lt%3Bdl%26gt%3B%20was%20considered%20a%20%E2%80%9Cdefinition%20list%E2%80%9D%2C%20containin" title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/the-dl-element/" rel="bookmark">The dl element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on June 3, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-dl-element/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>HTML5 Custom Data Attributes (data-*)</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/</link>
		<comments>http://html5doctor.com/html5-custom-data-attributes/#comments</comments>
		<pubDate>Thu, 27 May 2010 13:50:08 +0000</pubDate>
		<dc:creator>Chris Bewick</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1874</guid>
		<description><![CDATA[<p>Have you ever found yourself using element <code>class</code> names or <code>rel</code> attributes to store arbitrary snippets of metadata for the sole purpose of making your JavaScript simpler? If you have, then I have some exciting news for you! If you haven&#39;t and you&#39;re thinking, <q>Wow, that&#39;s a great idea!</q> I implore you to rid your mind of that thought immediately and continue reading.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
			</a>
		</div><p>Have you ever found yourself using element <code>class</code> names or <code>rel</code> attributes to store arbitrary snippets of metadata for the sole purpose of making your JavaScript simpler? If you have, then I have some exciting news for you! If you haven&#39;t and you&#39;re thinking, <q>Wow, that&#39;s a great idea!</q> I implore you to rid your mind of that thought immediately and continue reading.</p>

<p>Thanks to <abbr>HTML</abbr>5, we now have the ability to embed custom data attributes on all <abbr>HTML</abbr> elements. These new custom data attributes consist of two parts:</p>

<dl> <dt>Attribute Name</dt> <dd>The data attribute name must be at least one character long and must be prefixed with &#39;<code>data-</code>&#39;. It should not contain any uppercase letters.</dd> <dt>Attribute Value</dt> <dd>The attribute value can be any string.</dd></dl>

<p>Using this syntax, we can add application data to our markup as shown below:</p>

<pre><code>&lt;ul id="vegetable-seeds"&gt;
  &lt;li data-spacing="10cm" data-sowing-time="March to June"&gt;Carrots&lt;/li&gt;
  &lt;li data-spacing="30cm" data-sowing-time="February to March"&gt;Celery&lt;/li&gt;
  &lt;li data-spacing="3cm" data-sowing-time="March to September"&gt;Radishes&lt;/li&gt;
&lt;/ul&gt; </code></pre>

<p>We can now use this stored data in our site&#8217;s JavaScript to create a richer, more engaging user experience. Imagine that when a user clicks on a vegetable a new layer opens up in the browser displaying the additional seed spacing and sowing instructions. Thanks to the <code>data-</code> attributes we&#8217;ve added to our <code>&lt;li&gt;</code> elements, we can now display this information instantly without having to worry about making any Ajax calls and without having to make any server-side database queries.</p>

<p>Prefixing the custom attributes with <code>data-</code> ensures that they will be completely ignored by the user agent. As far as the browser and indeed the website&#8217;s end user are concerned, this data does not exist.</p>

<p>The spec says (emphasis ours):</p>

<blockquote><p><strong>Custom data attributes are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.</strong></p>

<p>These attributes are not intended for use by software that is independent of the site that uses the attributes.</p>

<p>Every HTML element may have any number of custom data attributes specified, with any value.</p>

<cite><a href="http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data">W3C Specification</a></cite></blockquote>


<h2>How can I use data attributes?</h2>

<p>As custom data attributes are valid <abbr>HTML</abbr>5, they can be used in any browser that supports <abbr>HTML</abbr>5 doctypes. Thankfully, this is pretty much all of them. In addition to aiding backwards compatibility, this also ensures that custom data attributes will remain a scalable, cross-platform solution well into the future.</p>

<p>Now that we have a broad understanding of what data attributes are, let&#39;s take a look at how they can be used:</p>

<ul>
	<li>To store the initial height or opacity of an element which might be required in later JavaScript animation calculations</li>
	<li>To store parameters for a Flash movie that&#8217;s loaded via JavaScript</li>
	<li>To store custom web analytics tagging data as demonstrated by <a title="Google Analytics Tagging with HTML5 data-* Attributes" href="http://jasonkarns.com/blog/2010/03/10/google-analytics-tagging/">Jason Karns</a></li>
	<li>To store data about the health, ammo, or lives of an element in a JavaScript game</li>
	<li>To power accessible JavaScript <code>&lt;video&gt;</code> subtitles as demonstrated by <a title="Accessible HTML5 Video with JavaScripted captions" href="http://dev.opera.com/articles/view/accessible-html5-video-with-javascripted-captions/">Bruce Lawson</a></li>
</ul>



<h2>What shouldn&#8217;t I use data attributes for?</h2>

<p>Although flexible, data attributes aren&#8217;t an appropriate solution for all problems.</p>

<ul>
	<li>Data attributes should not be used if there is a existing attribute or element which is more appropriate for storing your data. For example, date/time data should probably be presented semantically in a time element instead rather than stored in custom data attributes.</li>
	<li>Custom data attributes are not intended to compete with microformats. It is clearly stated in the spec that the data is not intended to be publicly usable. External software should not interact with it. Marking up contact details or event details using custom data attributes would be wrong, unless of course it is only intended to be used by your own internal scripts.</li>
	<li>The presence/absence of a particular data attribute should not be used as a <abbr>CSS</abbr> hook for any styling. Doing so would suggest that the data you are storing is of immediate importance to the user and should be marked up in a more semantic and accessible manner.</li>
</ul>



<h2>Using <code>data-</code> attributes with JavaScript</h2>

<p>Now that we understand what custom <code>data-</code> attributes are and when we can use them, we should probably take a look at how we can interact with them using JavaScript.</p>

<p>If we wanted to retrieve or update these attributes using existing, native JavaScript, then we can do so using the <code>getAttribute</code> and <code>setAttribute</code> methods as shown below:</p>

<pre><code>&lt;div id='strawberry-plant' data-fruit='12'&gt;&lt;/div&gt;

&lt;script&gt;
// 'Getting' data-attributes using getAttribute
var plant = document.getElementById('strawberry-plant');
var fruitCount = plant.getAttribute('data-fruit'); // fruitCount = '12'

// 'Setting' data-attributes using setAttribute
plant.setAttribute('data-fruit','7'); // Pesky birds
&lt;/script&gt;</code></pre>

<p>This method will work in all modern browsers, but it is not how <code>data-</code> attributes are intended to be used. The second (new and improved) way to achieve the same thing is by accessing an element&#8217;s <code>dataset</code> property. This <code>dataset</code> property — part of the new <abbr>HTML</abbr>5 JavaScript <abbr>API</abbr>s — will return a <code>DOMStringMap</code> object of all the selected element&#39;s <code>data-</code> attributes. When using this approach, rather than using the full attribute name, you can ditch the <code>data-</code> prefix and refer to the custom data directly using the name you have assigned to it. Data attribute names which contain hyphens will be stripped of their hyphens and converted to <a href="http://en.wikipedia.org/wiki/CamelCase">CamelCase</a>.</p>

<pre><code>&lt;div id='sunflower' data-leaves='47' data-plant-height='2.4m'&gt;&lt;/div&gt;

&lt;script&gt;
// 'Getting' data-attributes using dataset 
var plant = document.getElementById('sunflower');
var leaves = plant.dataset.leaves; // leaves = 47;

// 'Setting' data-attributes using dataset
var tallness = plant.dataset.plantHeight; // 'plant-height' -&gt; 'plantHeight'
plant.dataset.plantHeight = '3.6m';  // Cracking fertiliser
&lt;/script&gt;</code></pre>

<p>If, at some point in your script, a specific <code>data-</code> attribute becomes redundant and is no longer needed, it is also possible to completely remove that attribute from the DOM element by setting it to a value of <code>null</code>.</p>

<pre><code>plant.dataset.leaves = null; // Caterpillars attack!</code></pre>

<p>Unfortunately, the new <code>dataset</code> property has not yet been implemented in any browser, so in the meantime it&#8217;s best to use <code>getAttribute</code> and <code>setAttribute</code> as demonstrated earlier.</p>

<p>While developing your application, you may find it useful to be able to select elements based on the presence of — or indeed the specific values of — their custom <code>data-</code> attributes. This can be achieved quickly and easily using <code>querySelectorAll</code> as shown below:</p>

<pre><code>// Select all elements with a 'data-flowering' attribute
document.querySelectorAll('[data-flowering]');

// Select all elements with red leaves
document.querySelectorAll('[data-foliage-colour="red"]');</code></pre>



<h2>A word of warning</h2>

<p>As data attributes become more widely used, the potential for clashes in naming conventions becomes much greater. If you use an unimaginative attribute name such as <code>data-height</code>, then it is likely you will eventually come across a library or plugin that uses the same attribute name. Multiple scripts getting and setting a common <code>data-</code> attribute will probably cause chaos. In order to avoid this, I encourage people to choose a standard string (perhaps the site/plugin name) to prefix all their <code>data-</code> attributes — e.g. <code>data-html5doctor-height</code> or <code>data-my-plugin-height</code>.</p>



<h2>Summary</h2>

<p>Custom <code>data-</code> attributes are a great way to simplify the storage of application data in your web pages. Although you can&#8217;t utilise the new JavaScript <abbr>API</abbr>s just yet, you can enjoy great success using <code>getAttribute</code> and <code>setAttribute</code> safe in the knowledge that they will work in all major browsers.</p>



<h2>Homework</h2>

<p>If you&#8217;re super keen to have a play with the new <code>dataset</code> property but disappointed that it hasn&#8217;t been implemented, fear not!, for there is a light at the end of the tunnel. You might be interested in looking at <a href="/author/remys/">Dr Remy&#8217;s</a>  <a title="Code to enable dataset functionality in some browsers" href="http://gist.github.com/362081">experimental code</a>, which partially enables the <code>dataset</code> functionality in some browsers by editing the <code>Element.prototype</code>.</p>

<p>The code supports the retrieval of <code>data-</code> attributes in the latest versions of Firefox, Safari, Opera, and Chrome, but sadly will not work in any version of <abbr>IE</abbr> (since <abbr>IE</abbr> does not expose the Element object). This code also partially supports the setting of data attributes, but it will only store the new attribute values within the JavaScript and will not update the <abbr>DOM</abbr> element as a full, native implementation of the <code>dataset</code> property would. Although this code is mainly a proof of concept, it may be useful for mobile application or intranet development in closed environments where cross-browser (<abbr>IE</abbr>) compatibility is not an issue.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark" class="crp_title">Your Questions Answered #8</a></li><li><a href="http://html5doctor.com/native-drag-and-drop/" rel="bookmark" class="crp_title">Native Drag and Drop</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/video-the-track-element-and-webm-codec/" rel="bookmark" class="crp_title">Video: the track element and webM codec</a></li><li><a href="http://html5doctor.com/the-video-element/" rel="bookmark" class="crp_title">The video element</a></li></ul></div>


Share and Save:


	<a rel="nofollow"  href="http://twitter.com/home?status=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29%20-%20http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;bodytext=Have%20you%20ever%20found%20yourself%20using%20element%20class%20names%20or%20rel%20attributes%20to%20store%20arbitrary%20snippets%20of%20metadata%20for%20the%20sole%20purpose%20of%20making%20your%20JavaScript%20simpler%3F%20If%20you%20have%2C%20then%20I%20have%20some%20exciting%20news%20for%20you%21%20If%20you%20haven%26%2339%3Bt%20and%20you%26%2339%3Bre%20thinking%2C%20Wow%2C%20that%26%2339%3Bs%20a%20great%20idea%21%20I%20implore%20you%20to%20rid%20your%20mind%20of%20that%20thought%20immediately%20and%20continue%20reading." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;notes=Have%20you%20ever%20found%20yourself%20using%20element%20class%20names%20or%20rel%20attributes%20to%20store%20arbitrary%20snippets%20of%20metadata%20for%20the%20sole%20purpose%20of%20making%20your%20JavaScript%20simpler%3F%20If%20you%20have%2C%20then%20I%20have%20some%20exciting%20news%20for%20you%21%20If%20you%20haven%26%2339%3Bt%20and%20you%26%2339%3Bre%20thinking%2C%20Wow%2C%20that%26%2339%3Bs%20a%20great%20idea%21%20I%20implore%20you%20to%20rid%20your%20mind%20of%20that%20thought%20immediately%20and%20continue%20reading." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;t=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;annotation=Have%20you%20ever%20found%20yourself%20using%20element%20class%20names%20or%20rel%20attributes%20to%20store%20arbitrary%20snippets%20of%20metadata%20for%20the%20sole%20purpose%20of%20making%20your%20JavaScript%20simpler%3F%20If%20you%20have%2C%20then%20I%20have%20some%20exciting%20news%20for%20you%21%20If%20you%20haven%26%2339%3Bt%20and%20you%26%2339%3Bre%20thinking%2C%20Wow%2C%20that%26%2339%3Bs%20a%20great%20idea%21%20I%20implore%20you%20to%20rid%20your%20mind%20of%20that%20thought%20immediately%20and%20continue%20reading." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;t=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;title=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=Have%20you%20ever%20found%20yourself%20using%20element%20class%20names%20or%20rel%20attributes%20to%20store%20arbitrary%20snippets%20of%20metadata%20for%20the%20sole%20purpose%20of%20making%20your%20JavaScript%20simpler%3F%20If%20you%20have%2C%20then%20I%20have%20some%20exciting%20news%20for%20you%21%20If%20you%20haven%26%2339%3Bt%20and%20you%26%2339%3Bre%20thinking%2C%20Wow%2C%20that%26%2339%3Bs%20a%20great%20idea%21%20I%20implore%20you%20to%20rid%20your%20mind%20of%20that%20thought%20immediately%20and%20continue%20reading." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;h=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fhtml5-custom-data-attributes%2F&amp;t=HTML5%20Custom%20Data%20Attributes%20%28data-%2A%29&amp;s=Have%20you%20ever%20found%20yourself%20using%20element%20class%20names%20or%20rel%20attributes%20to%20store%20arbitrary%20snippets%20of%20metadata%20for%20the%20sole%20purpose%20of%20making%20your%20JavaScript%20simpler%3F%20If%20you%20have%2C%20then%20I%20have%20some%20exciting%20news%20for%20you%21%20If%20you%20haven%26%2339%3Bt%20and%20you%26%2339%3Bre%20thinking%2C%20Wow%2C%20that%26%2339%3Bs%20a%20great%20idea%21%20I%20implore%20you%20to%20rid%20your%20mind%20of%20that%20thought%20immediately%20and%20continue%20reading." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>


<br/><br/><p><a href="http://html5doctor.com/html5-custom-data-attributes/" rel="bookmark">HTML5 Custom Data Attributes (data-*)</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 27, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-custom-data-attributes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The article element</title>
		<link>http://html5doctor.com/the-article-element/</link>
		<comments>http://html5doctor.com/the-article-element/#comments</comments>
		<pubDate>Tue, 18 May 2010 14:00:27 +0000</pubDate>
		<dc:creator>Tom Leadbetter</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[pubdate]]></category>
		<category><![CDATA[section]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1364</guid>
		<description><![CDATA[<p>We’ve discussed a lot of new elements here at HTML5Doctor, but the <code>article</code> element has somehow escaped the microscope… until now! <code>article</code> is one of the new sectioning elements. It is often confused with <code>section</code> and <code>div</code> but don't worry we'll explain the difference between them.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
			</a>
		</div><p>We’ve discussed a lot of new elements here at HTML5Doctor, but the <code>article</code> element has somehow escaped the microscope… until now! <code>article</code> is one of the new sectioning elements. It is often confused with <code>section</code> and <code>div</code> but don&#8217;t worry we&#8217;ll explain the difference between them.</p>

<section>
<h2>What the spec says</h2>
<p>Thankfully, <a href="http://www.w3.org/TR/html5/semantics.html#the-article-element">the spec is short and sweet</a>:</p>

<blockquote><p>The <code>article</code> element represents a component of a page that consists of a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.</p><footer><cite><a href="http://www.w3.org/TR/html5/semantics.html#the-article-element">W3C Specification</a></cite></footer></blockquote>

<p>In addition to it’s content, an <code>&lt;article&gt;</code> element typically has a heading (often in a header element), and sometimes a footer. The easiest way to conceptualise <code>&lt;article&gt;</code> is to think of it’s use in a weblog, as mentioned in the spec’s examples “a blog entry” and “user-submitted comments.” Here at <abbr>HTML</abbr>5 Doctor, we wrap each weblog entry inside an <code>&lt;article&gt;</code> element. We also use <code>&lt;article&gt;</code> on ‘static’ content pages, like the About and Contact pages, as <code>&lt;article&gt;</code> can be used for “any other independent item of content.” The tricky part is, what exactly is an <em>independent item of content</em>?</p>
</section>

<section>
<h2>The smell test for going independent</h2>
<p>An <em>independent</em> piece of content, one suitable for putting in an <code>&lt;article&gt;</code> element, is content that <em>makes sense on it’s own</em>. This yardstick is up to your interpretation, but an easy smell test is <em>would this make sense in an RSS feed?</em> Of course weblog articles and static pages would make sense in a feed reader, and some sites have weblog comment feeds. On the other hand, a feed with each paragraph of this article as a separate post wouldn’t be very useful. The key point here is that the content has to make sense <em>independent of its context</em>, i.e. when all the surrounding content is stripped away.</p>
</section>

<section>
<h2>Examples of <code>&lt;article&gt;</code> in use</h2>
<section>
<h3>A bare-bones <code>&lt;article&gt;</code></h3>

<p>We only have a title and some content, but it’s enough to make sense on it’s own (assume there’s <a href="http://en.wikipedia.org/wiki/Apples" title="Apple - Wikipedia, the free encyclopedia">a lot more content about apples</a> <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<pre><code>&lt;article&gt;
	&lt;h1&gt;Apple&lt;/h1&gt;
	&lt;p&gt;The &lt;b&gt;apple&lt;/b&gt; is the pomaceous fruit of the apple tree...&lt;/p&gt;
	...
&lt;/article&gt;
</code></pre>
</section>

<section>
<h3>A weblog-style <code>&lt;article&gt;</code></h3>
<p>A published date leads us to add a <code>&lt;header&gt;</code>, and there’s also content that would be suitable in a <code>&lt;footer&gt;</code> elements.</p>

<pre><code>&lt;article&gt;
  &lt;header&gt;
    &lt;h1&gt;Apple&lt;/h1&gt;
    &lt;p&gt;Published: &lt;time pubdate="pubdate"&gt;2009-10-09&lt;/time&gt;&lt;/p&gt;
  &lt;/header&gt;
  &lt;p&gt;The &lt;b&gt;apple&lt;/b&gt; is the pomaceous fruit of the apple tree...&lt;/p&gt;
  ...
  &lt;footer&gt;
    &lt;p&gt;&lt;small&gt;Creative Commons Attribution-ShareAlike License&lt;/small&gt;&lt;/p&gt;
  &lt;/footer&gt;
&lt;/article&gt;</code></pre>
</section>

<section>
<h3>An <code>&lt;article&gt;</code> with comments as nested <code>&lt;article&gt;</code>s</h3>
<p>This example shows a weblog entry with comments. Each comment can be marked up as an <code>&lt;article&gt;</code> within the containing <code>&lt;article&gt;</code>.</p>  

<pre><code>&lt;article&gt;
  &lt;header&gt;
    &lt;h1&gt;Apple&lt;/h1&gt;
    &lt;p&gt;Published: &lt;time pubdate datetime="2009-10-09"&gt;9th October, 2009&lt;/time&gt;&lt;/p&gt;
  &lt;/header&gt;
  &lt;p&gt;The &lt;b&gt;apple&lt;/b&gt; is the pomaceous fruit of the apple tree...&lt;/p&gt;
  ...
  
  &lt;section&gt;
    &lt;h2&gt;Comments&lt;/h2&gt;
    &lt;article&gt;
      &lt;header&gt;
      &lt;h3&gt;Posted by: Apple Lover&lt;/h3&gt;
      &lt;p&gt;&lt;time pubdate datetime="2009-10-10T19:10-08:00"&gt;~1 hour ago&lt;/time&gt;&lt;/p&gt;
    &lt;/header&gt;
    &lt;p&gt;I love apples, my favourite kind are Granny Smiths&lt;/p&gt;
    &lt;/article&gt;
    
    &lt;article&gt;
      &lt;header&gt;
        &lt;h3&gt;Posted by: Oranges are king&lt;/h3&gt;
        &lt;p&gt;&lt;time pubdate datetime="2009-10-10T19:15-08:00"&gt;~1 hour ago&lt;/time&gt;&lt;/p&gt;
      &lt;/header&gt;
      &lt;p&gt;Urgh, apples!? you should write about ORANGES instead!!1!&lt;/p&gt;
    &lt;/article&gt;
  &lt;/section&gt;
&lt;/article&gt;</code></pre>
</section>

<section>
<h3>An <code>&lt;article&gt;</code> with <code>&lt;section&gt;</code>s</h3>
<p>You can use <a href="http://html5doctor.com/the-section-element/">the <code>&lt;section&gt;</code> element</a> to split the article into logical groups of content with headings:</p>

<pre><code>&lt;article&gt;
  &lt;h1&gt;Apple varieties&lt;/h1&gt;
  &lt;p&gt;The apple is the pomaceous fruit of the apple tree...&lt;/p&gt;

  &lt;section&gt;
    &lt;h2&gt;Red Delicious&lt;/h2&gt;
    &lt;p&gt;These bright red apples are the most common found in many supermarkets...&lt;/p&gt;
  &lt;/section&gt;

  &lt;section&gt;
    &lt;h2&gt;Granny Smith&lt;/h2&gt;
    &lt;p&gt;These juicy, green apples make a great filling for apple pies...&lt;/p&gt;
  &lt;/section&gt;
    
&lt;/article&gt;</code></pre>
</section>

<section>
<h3>A <code>&lt;section&gt;</code> containing <code>&lt;article&gt;</code>s</h3>
<p>Where appropriate a <code>&lt;section&gt;</code> element can contain <code>&lt;article&gt;</code> elements. We already saw this in the comment section example above, and other common examples are the homepage or category pages of a weblog:</p>

<pre><code>&lt;section&gt;
  &lt;h1&gt;Articles on: Fruit&lt;/h1&gt;

  &lt;article&gt;
    &lt;h2&gt;Apple&lt;/h2&gt;
    &lt;p&gt;The apple is the pomaceous fruit of the apple tree...&lt;/p&gt;
  &lt;/article&gt;

  &lt;article&gt;
    &lt;h2&gt;Orange&lt;/h2&gt;
    &lt;p&gt;The orange is a hybrid of ancient cultivated origin, possibly between pomelo and tangerine...&lt;/p&gt;
  &lt;/article&gt;

  &lt;article&gt;
    &lt;h2&gt;Banana&lt;/h2&gt;
    &lt;p&gt;Bananas come in a variety of sizes and colors when ripe, including yellow, purple, and red...&lt;/p&gt;
  &lt;/article&gt;
    
&lt;/section&gt;</code></pre>
</section>

<section>
<h3>Using <code>&lt;article&gt;</code> for a widget</h3>
<p>The specification also mentions that an interactive widget can also be an <code>&lt;article&gt;</code>. The example below shows how the markup might look for an embedded widget from somewhere like <a href="http://www.widgetbox.com/">Widgetbox</a>.</p>

<pre><code>&lt;article&gt;
  &lt;h1&gt;My Fruit Spinner&lt;/h1&gt;
  &lt;object&gt;
    &lt;param name="allowFullScreen" value="true"&gt;
    &lt;embed src="#" width="600" height="395"&gt;&lt;/embed&gt;
  &lt;/object&gt;
&lt;/article&gt;</code></pre>
</section>
</section>

<section>
<h2>The <code>pubdate</code> attribute</h2>
<p>You may have noticed the <code>pubdate</code> attribute in these examples. <code>pubdate</code> is an optional <em>boolean attribute</em> that may be added to one <a href="http://html5doctor.com/the-time-element"><code>time</code> element</a> within the <code>&lt;article&gt;</code>. If present it indicates that the <code>&lt;time&gt;</code> element is the date the <code>&lt;article&gt;</code> was published. It can be written in several ways, the most popular being:</p>

<pre><code>pubdate
pubdate="pubdate"</code></pre>

<p>You could think of these as HTML and XHTML-style — the end result is the same so use the style you like. Note that <code>pubdate</code> applies only to the parent <code>&lt;article&gt;</code> element, or to the document as a whole.</p>
</section>

<section>
<h2>The difference between <code>&lt;article&gt;</code> and <code>&lt;section&gt;</code></h2>
<p>There&#8217;s been <a href="http://adactio.com/journal/1654/">a lot of confusion</a> over the difference (or perceived lack of a difference) between the <code>&lt;article&gt;</code> and <code>&lt;section&gt;</code> elements in <abbr>HTML</abbr>5. The <code>&lt;article&gt;</code> element is a specialised kind of <code>&lt;section&gt;</code>; it has a more specific semantic meaning than <code>&lt;section&gt;</code> in that it is <strong>an independent, self-contained</strong> block of related content. We <em>could</em> use <code>&lt;section&gt;</code>, but using <code>&lt;article&gt;</code> gives more semantic meaning to the content.</p>

<p>By contrast <code>&lt;section&gt;</code> is only a block of <em>related</em> content, and <code>&lt;div&gt;</code> is only a block of content. Also as mentioned above the <code>pubdate</code> attribute doesn’t apply to <code>&lt;section&gt;</code>. To decide which of these three elements is appropriate, choose the first suitable option:</p>

<ol>
<li>Would the content would make sense on it’s own in a feed reader? If so use <code>&lt;article&gt;</code></li>
<li>Is the content related? If so use <code>&lt;section&gt;</code></li>
<li>Finally if there’s no semantic relationship use <code>&lt;div&gt;</code></li>
</ol>

<p><a href="http://html5doctor.com/author/brucel">Dr Bruce</a> has written <a href="http://www.brucelawson.co.uk/2010/html5-articles-and-sections-whats-the-difference/">HTML5 <code>&lt;article&gt;</code>s and <code>&lt;section&gt;</code>s, what’s the difference?</a>, so we recommend reading that if you are still fuzzy on when to use <code>&lt;article&gt;</code>.</p>
</section>

<section>
<h2>Summary</h2>
<p>Hopefully this post has given you some insight into the correct use of the <code>&lt;article&gt;</code> element. Do you have any other examples that you can share for using <code>&lt;article&gt;</code> in your <abbr>HTML</abbr>5 markup?</p>

<p>I&#8217;m also keen to hear your thoughts on the confusion between the <code>&lt;article&gt;</code> and <code>&lt;section&gt;</code> elements. Do you think the distinction between the two is clear?</p>
</section><div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/the-dl-element/" rel="bookmark" class="crp_title">The dl element</a></li><li><a href="http://html5doctor.com/the-time-element/" rel="bookmark" class="crp_title">The time element (and microformats)</a></li><li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li><li><a href="http://html5doctor.com/the-section-element/" rel="bookmark" class="crp_title">The section element</a></li><li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li></ul></div>


Share and Save:


	<a rel="nofollow"  href="http://twitter.com/home?status=The%20article%20element%20-%20http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;title=The%20article%20element&amp;bodytext=We%E2%80%99ve%20discussed%20a%20lot%20of%20new%20elements%20here%20at%20HTML5Doctor%2C%20but%20the%20article%20element%20has%20somehow%20escaped%20the%20microscope%E2%80%A6%20until%20now%21%20article%20is%20one%20of%20the%20new%20sectioning%20elements.%20It%20is%20often%20confused%20with%20section%20and%20div%20but%20don%27t%20worry%20we%27ll%20explain%20the%20difference%20between%20them." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;title=The%20article%20element" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;title=The%20article%20element&amp;notes=We%E2%80%99ve%20discussed%20a%20lot%20of%20new%20elements%20here%20at%20HTML5Doctor%2C%20but%20the%20article%20element%20has%20somehow%20escaped%20the%20microscope%E2%80%A6%20until%20now%21%20article%20is%20one%20of%20the%20new%20sectioning%20elements.%20It%20is%20often%20confused%20with%20section%20and%20div%20but%20don%27t%20worry%20we%27ll%20explain%20the%20difference%20between%20them." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;title=The%20article%20element" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=The%20article%20element&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;t=The%20article%20element" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;title=The%20article%20element&amp;annotation=We%E2%80%99ve%20discussed%20a%20lot%20of%20new%20elements%20here%20at%20HTML5Doctor%2C%20but%20the%20article%20element%20has%20somehow%20escaped%20the%20microscope%E2%80%A6%20until%20now%21%20article%20is%20one%20of%20the%20new%20sectioning%20elements.%20It%20is%20often%20confused%20with%20section%20and%20div%20but%20don%27t%20worry%20we%27ll%20explain%20the%20difference%20between%20them." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=The%20article%20element&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;t=The%20article%20element" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;title=The%20article%20element&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=We%E2%80%99ve%20discussed%20a%20lot%20of%20new%20elements%20here%20at%20HTML5Doctor%2C%20but%20the%20article%20element%20has%20somehow%20escaped%20the%20microscope%E2%80%A6%20until%20now%21%20article%20is%20one%20of%20the%20new%20sectioning%20elements.%20It%20is%20often%20confused%20with%20section%20and%20div%20but%20don%27t%20worry%20we%27ll%20explain%20the%20difference%20between%20them." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;h=The%20article%20element" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fthe-article-element%2F&amp;t=The%20article%20element&amp;s=We%E2%80%99ve%20discussed%20a%20lot%20of%20new%20elements%20here%20at%20HTML5Doctor%2C%20but%20the%20article%20element%20has%20somehow%20escaped%20the%20microscope%E2%80%A6%20until%20now%21%20article%20is%20one%20of%20the%20new%20sectioning%20elements.%20It%20is%20often%20confused%20with%20section%20and%20div%20but%20don%27t%20worry%20we%27ll%20explain%20the%20difference%20between%20them." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>


<br/><br/><p><a href="http://html5doctor.com/the-article-element/" rel="bookmark">The article element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 18, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-article-element/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered 9</title>
		<link>http://html5doctor.com/your-questions-answered-9/</link>
		<comments>http://html5doctor.com/your-questions-answered-9/#comments</comments>
		<pubDate>Fri, 14 May 2010 14:15:57 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[figcaption]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[offline]]></category>

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

		<guid isPermaLink="false">http://html5doctor.com/?p=1745</guid>
		<description><![CDATA[<p>The <code>&#60;ruby&#62;</code>, <code>&#60;rt&#62;</code> and <code>&#60;rp&#62;</code> elements allow us to add ‘ruby’ phonetic annotations in languages like Japanese and Chinese. Despite the terrors of internationalisation and patchy browser support — with a little fiddling and a lot of caution — this sexy threesome with adorable accents are ready to use now.</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" />
			</a>
		</div><p><a href="http://en.wikipedia.org/wiki/Ruby_character" title="Ruby character - Wikipedia, the free encyclopedia">Ruby text</a> is a short annotation for some base text. It’s typically used to give pronunciation guidance in a phonetic script for kanji in Chinese, Japanese, and Korean (<abbr title="Chinese, Japanese and Korean">CJK</abbr>) languages. It’s named after an old printers’ term for the very small size of 5.5 points.</p>

<blockquote cite="http://dev.w3.org/html5/markup/ruby">
<p>The ruby element allows spans of phrasing content to be marked with ruby annotations.</p>
<cite><a href="http://dev.w3.org/html5/markup/ruby" title="HTML5: ruby — ruby annotation (NEW)">W3C Specification</a></cite>
</blockquote>

<p>As the name implies, ruby text is small<!-- IE=6pt, Webkit=60% -->, displayed by default above the base text in horizontal text and to the right in vertical text. Browsers without <code>&lt;ruby&gt;</code> support put the ruby text inline after the base text.</p>

<p>These are the elements used in creating ruby text in <abbr>HTML</abbr>5:</p>

<ul>
<li><code>&lt;ruby&gt;</code> — an inline element that contains base text with ruby annotations</li>
<li><code>&lt;rt&gt;</code> — ruby text, coming after the base text it defines</li>
<li><code>&lt;rp&gt;</code> — ruby parentheses, an element used to wrap opening and closing parentheses around <code>&lt;rt&gt;</code> ruby text. These are for user agents that don’t support ruby text, so that it makes sense when displayed inline. Browsers that support <code>&lt;ruby&gt;</code> hide <code>&lt;rp&gt;</code> via <code>{display:none;}</code>.</li>
</ul>

<section id="examples">
<h2>Examples</h2>

<p>If you’ve never seen ruby in action you’re probably wondering what I’m talking about, so here are some examples:</p>

<figure>
<img src="/wp-content/uploads/2010/05/vagabond.jpg" width="279" height="250" alt="Vagabond">
<figcaption><i lang="ja-latn">Furigana</i> ruby text in the Japanese manga <a href="http://en.wikipedia.org/wiki/Vagabond_(manga)" title="Vagabond (manga) - Wikipedia, the free encyclopedia">Vagabond</a></figcaption>
</figure>

<figure>
<img src="/wp-content/uploads/2010/05/bopomofo-newspaper.png" width="38" height="147" alt="Bopomofo Newspaper" />
<figcaption>Snippet of a <a href="http://wss.djes.tp.edu.tw/report/Lists/Photos/951222%E5%9C%8B%E8%AA%9E%E6%97%A5%E5%A0%B1/%E5%9C%8B%E8%AA%9E%E6%97%A5%E5%A0%B1.jpg" title="Image of a Taiwanese newspaper with bopomofo ruby for students">Taiwanese newspaper for students</a>, with <i lang="zh-latn">bopomofo</i> ruby</figcaption>
</figure>

<figure>
<img src="/wp-content/uploads/2010/05/chosun.png" width="405" height="72" alt="Typical Korean usage of hanji in a Korean news website" />
<figcaption>Korean <i lang="kr-latn">hangul</i> followed by <i lang="kr-latn">hanja</i> in an editorial on <a href="http://news.chosun.com/site/data/html_dir/2010/04/19/2010041902457.html">Chosun.com</a></figcaption>
</figure>

</section>

<section id="browser-support">
<h2>Browser support</h2>

<p>As is often the way with internationalisation features, browser support is — well, sparse. In a break from your expectations, Internet Explorer has supported <code>&lt;ruby&gt;</code> since <abbr>IE</abbr>5 — three years before the actual 2001 <a href="http://www.w3.org/TR/ruby/" title="Ruby Annotation">W3C Ruby Annotation</a> specification! While this specification was incorporated into <a href="http://www.w3.org/TR/xhtml11/changes.html#a_changes" title="XHTML 1.1 - Changes from XHTML 1.0 Strict"><abbr>XHTML</abbr> 1.1</a>, no browser ever implemented it.</p>

<p><code>&lt;ruby&gt;</code> in <abbr>HTML</abbr>5 is based on a reverse-engineering of <abbr>IE</abbr>’s implementation. It also lacks Ruby Annotation’s ‘complex <code>&lt;ruby&gt;</code>’, as these can normally be accomplished via nesting. (Please submit feedback if you have a real-world example that can’t be.) <a href="http://webkit.org/blog/948/ruby-rendering-in-webkit/" title="Surfin’ Safari - Blog Archive  » Ruby Rendering in WebKit">Webkit</a> added <abbr>HTML</abbr>5 <code>&lt;ruby&gt;</code> support at the start of 2010. At the time of writing, <code>&lt;ruby&gt;</code> has made it into Chrome but not Safari. Firefox and Opera have yet to implement <code>&lt;ruby&gt;</code> natively, although there are Firefox extensions for <code>&lt;ruby&gt;</code> support (<a href="http://htmlruby.codeplex.com/" title="HTML Ruby"><abbr>HTML</abbr> Ruby (basic ruby including <abbr>HTML</abbr>5)</a> and <a href="http://piro.sakura.ne.jp/xul/_rubysupport.html.en" title="XUL Apps &gt; XHTML Ruby Support - outsider reflex"><abbr>XHTML</abbr> Ruby (complex ruby)</a>).</p>

<p>On the styling side, there’s the <a href="http://www.w3.org/TR/css3-ruby/" title="CSS3 Ruby Module">W3C <abbr>CSS</abbr>3 Ruby Module</a> (2003). It’s based on Ruby Annotation’s ‘complex ruby’ and is being updated for <abbr>HTML</abbr>5 <code>&lt;ruby&gt;</code>. Because of this, it’s also yet to be implemented beyond the default <abbr>IE</abbr>-level formatting. Ruby text will be used in combination with the <a href="http://dev.w3.org/csswg/css3-text-layout/" title="CSS Text Layout Module Level 3">W3C <abbr>CSS</abbr> Text Layout Module Level 3</a> properties <code>direction</code>, <code>block-flow</code>, and <code>writing-mode</code> for alternative text flow (such as vertical text), but again these have <a href="http://www.zachleat.com/web/2010/02/12/css3-text-writing-mode/" title="CSS 3 Text: A Tale of writing-mode Woe">poor implementation</a>.</p>

<table>
<caption>Summary of browser support for <code>&lt;ruby&gt;</code> display &amp; styling in the five main browsers</caption>
<thead>
<tr>
<th>Browser</th>
<th>Basic <code>&lt;ruby&gt;</code></th>
<th><code>writing-mode</code></th>
<th>‘Complex <code>&lt;ruby&gt;</code>’</th>
<th><abbr>CSS</abbr>3 Ruby (2003)</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Internet Explorer</th>
<td><abbr>IE</abbr>5.5+</td>
<td><abbr>IE</abbr>6+<a href="#css-note1">*</a></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<th scope="row">Firefox</th>
<td>(via plugin)</td>
<td>-</td>
<td>(via plugin)</td>
<td>-</td>
</tr>
<tr>
<th scope="row">Chrome</th>
<td>Chrome5+</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<th scope="row">Safari</th>
<td>Safari5+</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<th scope="row">Opera</th>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<p id="css-note1">Note: <code>writing-mode</code> support in <abbr>IE</abbr>6 was <code>lr-tb</code> and <code>tb-rl</code> only. <a href="http://blogs.msdn.com/ie/archive/2009/05/29/the-css-corner-writing-mode.aspx" title="IEBlog : The CSS Corner: writing-mode"><abbr>IE</abbr>8 added support for all possible combinations</a>.</p>

<section id="usable-css">
<h3><abbr>CSS</abbr> we <em>can</em> use</h3>

<p>Having said that no browsers support the <abbr>CSS</abbr>3 Ruby module yet, there are still a few things we can do to style <code>&lt;ruby&gt;</code> and friends. Default browser styles use <code>font-size</code> and <code>display</code>, so we can safely change these to affect display in both supporting and non-supporting browsers.</p>

<p>If you want to de-emphasise the <code>&lt;rt&gt;</code> ruby text when it’s displayed inline in non-supporting browsers, you could do this via setting the size of <code>&lt;rt&gt;</code> and <code>&lt;rp&gt;</code>, as <abbr>IE</abbr> and Webkit do:</p>

<pre><code>rt, rp {font-size: 60%;} /* = Webkit value */</code></pre>

<p>You can also move ruby text and parentheses to after the base text, mimicking non-supporting browser rendering on supporting browsers:</p>

<pre><code>rt, rp {display: inline; font-size: 100%;}</code></pre>

<p>Finally, if you’re brave/foolish, you can implement ruby display yourself via <abbr>CSS</abbr> <code>inline-table</code> (<a href="http://sideshowbarker.net/2009/11/13/html5-ruby/#comment-3388" title="Carl’s ‘faking ruby’ comment on Mike Smith’s weblog"><abbr>CSS</abbr> with explanation</a> and <a href="http://hiragana.jp/" title="Hiragana Megane (How to Read Japanese)">demonstration (Hiragana.jp)</a>). Note that <a href="https://bugs.webkit.org/show_bug.cgi?id=36803">this currently doesn’t work in Chrome</a> because of a bug with <code>display:inline-table</code> on <code>&lt;ruby&gt;</code> (fixed in trunk), and as you’ll probably need per-browser style tweaks, I recommend against it.</p>

</section>
</section>

<section id="code-samples">
<h2>Code samples and output</h2>

<p><a href="http://oli.jp/example/ruby/" title="Ruby examples ❧ Oli.jp (@boblet)">These code samples</a> (with notes and <abbr>CSS</abbr>) are also available separately.</p>

<section id="ja">
<h3><code>&lt;ruby&gt;</code> in Japanese — <i lang="ja-latn">furigana</i> and <i lang="ja-latn" title="romaji">rōmaji</i></h3>

<section id="without-rp">
<h4>Using <code>&lt;ruby&gt;</code> without <code>&lt;rp&gt;</code></h4>
<figure>
<pre><code>&lt;ruby&gt;攻殻&lt;rt&gt;こうかく&lt;/rt&gt;機動隊&lt;rt&gt;きどうたい&lt;/rt&gt;&lt;/ruby&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/gits.png" width="100" height="50" alt="Furigana example using ruby in a supporting browser (displayed above base text)" />
<img src="/wp-content/uploads/2010/05/gits-inline.png" width="235" height="50" alt="Furigana example using ruby in a non-supporting browser (displayed inline after base text)">
<figcaption>Using <code>&lt;ruby&gt;</code> to indicate the pronunciation of the Japanese name of the <a href="http://en.wikipedia.org/wiki/Ghost_in_the_shell" title="Ghost in the Shell - Wikipedia, the free encyclopedia">Ghost in the Shell anime series</a> in <i lang="ja-latn">furigana</i>. Notice that the lack of <code>&lt;rp&gt;</code> makes it pretty unreadable in a non-supporting browser (you may have to trust me on this!).<!-- this could be faked in browsers supporting generated content via rt:before {content: "(";} and rt:after {content: ")";}, but you can’t then turn it off for supporting browsers --></figcaption>
</figure>
</section>

<section id="with-rp">
<h4>Using <code>&lt;ruby&gt;</code> with <code>&lt;rp&gt;</code></h4>
<figure>
<pre><code>&lt;ruby&gt;攻殻&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;こうかく&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;機動隊&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;きどうたい&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;&lt;/ruby&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/gits.png" width="100" height="50" alt="Furigana example using ruby in a supporting browser (displayed above base text)" />
<img src="/wp-content/uploads/2010/05/gits-parentheses.png" width="300" height="50" alt="Furigana example using ruby in a non-supporting browser (displayed inline with parentheses)" />
<figcaption>The above example with <code>&lt;rt&gt;</code> text surrounded by <code>&lt;rp&gt;</code> parentheses degrades gracefully on non-supporting browsers.</figcaption>
</figure>
</section>

<section id="nested-ruby">
<h4>Nested <code>&lt;ruby&gt;</code> for multiple ruby texts</h4>
<figure>
<pre><code>&lt;ruby&gt;&lt;ruby&gt;攻&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;こう&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;殻&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;かく&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;機&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;き&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;動&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;どう&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;隊&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;たい&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;&lt;/ruby&gt;&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;Kōkakukidōtai&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;&lt;/ruby&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/gits-two-ruby.png" width="110" height="50" alt="Two ruby texts in a supporting browser (both displayed above base text)">
<img src="/wp-content/uploads/2010/05/gits-two-ruby-paren.png" width="520" height="36" alt="Two ruby texts in a non-supporting browser (displayed inline in source order)">
<figcaption>The scope of <code>&lt;rt&gt;</code> depends on the amount of base text before it, from one character to an entire phrase. <code>&lt;ruby&gt;</code> can also be nested to provide multiple ruby texts for one base text — in this case <i lang="ja-latn">furigana</i> and <i lang="ja-latn" title="romaji">rōmaji</i>. Although per-kanji <code>&lt;ruby&gt;</code> is more informative, it degrades somewhat poorly in non-supporting browsers. Copy &amp; paste support is also poor, as browsers just use source order, for example “攻こう殻かく機き動どう隊たい Kōkakukidōtai”. It’s also a <abbr title="pain in the arse">PITA</abbr> to code <img src='http://html5doctor.com/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </figcaption>
</figure>
</section>

<!-- Example of vertical text? -->

<section id="jp-glossary">
<h4>Japanese glossary</h4>

<p><i lang="ja-latn">Furigana</i> is the name given to using <i lang="ja-latn">hiragana</i> phonetic script beside words written in kanji to aid reading. It’s used extensively in education for learners of Japanese, and in reading material for children. It’s also sometimes used when writing kanji a literate adult may not be able to read.</p>

<p><i lang="ja-latn" title="romaji">Rōmaji</i> is the romanisation of Japanese into the latin alphabet. <i lang="ja-latn" title="romaji">Rōmaji</i> is generally used for those who don’t know Japanese, especially in signage and tourism information.</p>
</section>

</section>

<section id="zh">
<h3><code>&lt;ruby&gt;</code> in Chinese — <i lang="zh-latn" title="pinyin">Pīnyīn</i> and <i lang="zh-latn" Title="Zhuyin Fuhao">zhùyīn fúhào</i> (<i lang="zh-latn">bopomofo</i>)</h3>

<p>Ruby is used to some extent in China (<i lang="zh-latn" title="pinyin">pīnyīn</i>), and more so in Taiwan (<i lang="zh-latn" Title="Zhuyin Fuhao">zhùyīn fúhào</i>), especially in textbooks and signage.</p>

<section id="pinyin">
<h4><i lang="zh-latn" title="pinyin">Pīnyīn</i></h4>
<figure>
<pre><code>&lt;p&gt;The &lt;b&gt;Grass mud horse&lt;/b&gt; — &lt;ruby&gt;草泥馬&lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;Cǎo Ní Mǎ&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;&lt;/ruby&gt; — is … characterised as “lively, intelligent and tenacious”. However, their existence is said to be threatened by the “river crabs” — &lt;ruby class="styled"&gt;河蟹&lt;rp&gt; (&lt;/rp&gt;&lt;rt&gt;héxiè&lt;/rt&gt;&lt;rp&gt;) &lt;/rp&gt;&lt;/ruby&gt; — which are invading their habitat.&lt;/p&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/gmh.png" width="570" height="100" alt="Ruby text in a paragraph of text in a supporting browser, leading to significant line-height differences">
<img src="/wp-content/uploads/2010/05/gmh-combo.png" width="570" height="80" alt="Ruby text in a non-supporting browser, with font-size set on rt and rp elements for the second ruby instance">
<figcaption>In this example of <i lang="zh-latn">pinyin</i> you can see how <code>&lt;ruby&gt;</code> significantly affects the leading (<code>&lt;line-height&gt;</code>) of text blocks in supporting browsers. Setting <code>font-size</code> for <code>&lt;rt&gt;</code> and <code>&lt;rp&gt;</code> can de-emphasise ruby text in non-supporting browsers, as demonstrated in the second <code>&lt;ruby&gt;</code> in the second image.</figcaption>
</figure>
</section>

<section id="bopomofo">
<h4><i lang="zh-latn" Title="Zhuyin Fuhao">Zhùyīn fúhào</i></h4>
<figure>
<pre><code>&lt;ruby&gt;&lt;ruby&gt;世&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄕˋ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;上&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄕㄤˋ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;無&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄨˊ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;難&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄋㄢˊ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;事&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄕˋ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;只&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄓˇ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;怕&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄆㄚˋ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;有&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄧㄡˇ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;心&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄒㄧㄣ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;人&lt;rp&gt;（&lt;/rp&gt;&lt;rt&gt;ㄖㄣˊ&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;&lt;/ruby&gt;&lt;rp&gt; （&lt;/rp&gt;&lt;rt&gt;Anything can be done with enough perseverance&lt;/rt&gt;&lt;rp&gt;）&lt;/rp&gt;&lt;/ruby&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/bopomofo.png" width="471" height="56" alt="How this bopomofo *should* look in a supporting browser (which doesn’t exist as far as I know)" />
<img src="/wp-content/uploads/2010/05/bopomofo-chrome.png" width="230" height="55" alt="This bopomofo example in Chrome" />
<img src="/wp-content/uploads/2010/05/bopomofo-firefox.png" width="467" height="84" alt="This bopomofo example in Firefox" />
<!-- http://en.wikiquote.org/wiki/Chinese_proverbs -->
<figcaption>Unfortunately, no browser can render this example of <i lang="zh-latn" Title="Zhuyin Fuhao">Zhùyīn fúhào</i> (<i lang="zh-latn">bopomofo</i>) ruby on horizontal Mandarin Chinese correctly. I’ve included an ideal rendering and how it appears in both a browser supporting simple ruby (with incorrectly rendered <i lang="zh-latn">bopomofo</i>) and a non-supporting browser.</figcaption>
</figure>
</section>

<section id="zh-glossary">
<h4>Chinese glossary</h4>
<p><a href="http://en.wikipedia.org/wiki/Pinyin" title="Pinyin - Wikipedia, the free encyclopedia"><i lang="zh-latn" title="pinyin">Pīnyīn</i></a> is a romanised phonetic system for Chinese, generally written above or after the word. <a href="http://en.wikipedia.org/wiki/Bopomofo" title="Bopomofo - Wikipedia, the free encyclopedia"><i lang="zh-latn">Bopomofo</i> (<i lang="zh-latn" Title="Zhuyin Fuhao">Zhùyīn fúhào</i>)</a> is a phonetic script for transcribing Chinese, especially Mandarin. It is generally written (in both horizontal and vertical scripts) vertically to the right of each <i lang="ja-latn">hanzi</i> character.</p>
</section>
</section>

<section id="ko">
<h3>Korean ruby</h3>
<p>While the use of <i lang="ko-latn">hanja</i> (kanji) is decreasing in South Korea, they are still used for disambiguation and proper names.</p>

<figure>
<pre><code>&lt;ruby&gt;한자&lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;漢字&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;&lt;/ruby&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/hanja.png" alt="Hangul followed inline by hanja in brackets">
<figcaption>Current Korean ruby use is to have the <i lang="kr-latn">hangul</i> coming <em>before</em> the <i lang="kr-latn">hanja</i> in parentheses (the opposite way from the default fallback style). For styling use: <code>rt, rp {display: inline; font-size: 100%;}</code>. This formatting is also used when foreign words such as English are included in Korean text.</figcaption>
</figure>

<section id="ko-glossary">
<h4>Korean glossary</h4>
<p><a href="http://en.wikipedia.org/wiki/Hangul" title="Hangul - Wikipedia, the free encyclopedia"><i lang="kr-latn">Hangul</i></a> is the Korean script, and <a href="http://en.wikipedia.org/wiki/Hanja" title="Hanja - Wikipedia, the free encyclopedia"><i lang="kr-latn">hanja</i></a> is Korean for Chinese characters. Traditionally written Korean used <i lang="kr-latn">hanja</i>, but now it’s mainly used in academic texts and occasionally for disambiguation.</p>
</section>
</section>

<section id="en">
<h3>Using <code>&lt;ruby&gt;</code> for English</h3>

<p>Not everyone is using East Asian languages, but any short annotation is (theoretically) applicable. While English doesn’t typically have pronunciation guidance, phonetic annotations are used in dictionaries:</p>

<!-- styled to make rt appear inline -->
<figure>
<pre><code>&lt;ruby&gt;&lt;strong&gt;cromulent&lt;/strong&gt; &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;crôm-yü-lənt&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;&lt;/ruby&gt;</code></pre>
<img src="/wp-content/uploads/2010/05/cromulent.png" width="570" height="80" alt="Displaying ruby text after the base text for an English dictionary">
<figcaption>Using ruby text for a dictionary definition by displaying the ruby text inline after the base text</figcaption>
</figure>
</section>
</section>

<section id="use-it">
<h2><code>&lt;ruby&gt;</code>: to use or not to use</h2>

<p>The main use case of <code>&lt;ruby&gt;</code> is marking up pronunciation in Asian writing, such as <i lang="zh-latn" title="phonetic system for transcribing Chinese">bopomofo</i> for traditional Chinese and <i lang="ja-latn" title="addition of small kana next to kanji to aid reading">furigana</i> for Japanese. I don’t know whether Arabic diacritics like Taškīl, Hebrew Niqqud, or other non-<abbr title="Chinese, Japanese and Korean languages">CJK</abbr> languages would use <code>&lt;ruby&gt;</code> for marking up phonetic annotations or diacritics. The <abbr>WHATWG</abbr> specification says:</p>

<blockquote>
<p>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</p>
<footer><cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-ruby-element" title="4.6 Text-level semantics &mdash; HTML5 (including next generation additions still in development)">WHATWG specification</a></cite></footer>
</blockquote>

<p>As someone who uses tools like <a href="http://www.popjisyo.com/WebHint/Portal_e.aspx" title="POPjisyo.com - Dictionary Translation Japanese/Chinese/Korean/Kanji/Hanzi">Popjisyo</a> to add pop-up readings and translations to kanji, I definitely see <code>&lt;ruby&gt;</code> as semantic (and valuable) for ‘phonetic annotation,’ in the same way that <code>&lt;abbr&gt;</code> provides extra information on potentially confusing content. Outside of this usage, however, <code>&lt;ruby&gt;</code> could be seen as a presentational hack. Oh noes! I believe the Korean and English examples above are valid uses, but much like <code>&lt;q&gt;</code> some people think the extra code of using <code>&lt;ruby&gt;</code> is not justified when the default presentation is the same as plain text.</p>

<p>To further muddy the waters, the 2001 W3 Ruby specification included an <a href="http://www.w3.org/TR/ruby/#fig1.6" title="Ruby Annotation">abbreviated word marked up with a visible definition via <code>&lt;ruby&gt;</code></a>, and <a href="http://www.w3.org/TR/ruby/#fig1.9" title="Ruby Annotation">a use-by date where the day, month, and year are added via <code>&lt;ruby&gt;</code></a>. These uses seem like presentational hacks to me, and while they’re not forbidden, the lack of such examples in <abbr>HTML</abbr>5 indicate they’re not exactly blessed either <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
</section>

<section id="conclusion">
<h2>In conclusion…</h2>

<p>The most important thing is that the <code>&lt;ruby&gt;</code>, <code>&lt;rt&gt;</code>, and <code>&lt;rp&gt;</code> elements are <em>valid <abbr>HTML</abbr>5</em>, and even if they’re not officially supported, they will by default display <em>as if they were <code>&lt;span&gt;</code>s</em> in non-supporting browsers. Because of this, <strong>if you actually need to use <code>&lt;ruby&gt;</code>, especially for phonetic annotations, do it</strong>! It might not look perfect yet in non-supporting browsers, but this will change, and hey, at least you don’t have <abbr>IE</abbr> support to worry about! <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p>For non-phonetic annotation, consider using <code>&lt;abbr&gt;</code> to give an expanded reading via mouse-over for an abbreviation or acronym, unless displaying the reading by default is important. Consider <code>&lt;small&gt;</code> for <em>phrasing content</em>-level side comments, if the comment placement is not important and the association with the relevant content doesn’t need to be explicit.</p>
</section>

<section id="ref">
<h2>Further reading</h2>

<ul>
<li><a href="http://webkit.org/blog/948/ruby-rendering-in-webkit/" title="Surfin&#8217; Safari - Blog Archive  &raquo; Ruby Rendering in WebKit">Ruby rendering in Webkit</a> announcement on the Safari weblog</li>
<li><a href="http://my.opera.com/tagawa/blog/the-html5-ruby-element-in-words-of-one-syllable-or-less" title="Daniel Davis - The HTML5 &lt;ruby&gt; element in words of one syllable or less">The <abbr>HTML</abbr>5 &lt;ruby&gt; element in words of one syllable or less</a> by the unstoppable <a href="http://twitter.com/ourmaninjapan" title="Daniel Davis on Twitter @ourmaninjapan">Daniel Davis</a> of Opera</li>
</ul>
</section>

<section id="feedback">
<h2>Feedback please!</h2>

<p>So what do you think of <code>&lt;ruby&gt;</code> and friends? Let us know in the comments! If you know about the use of annotations like this in other languages, or have used <code>&lt;ruby&gt;</code>, tell us about it too!</p>

<!-- Bonus for source readers…

Questions to Hixie:
* would the expiry date would still be valid
* why was complex ruby dropped? no use case?
* would the WWW abbr-as-ruby would still be valid (what about <ruby><abbr>WWW</abbr><rt>world wide web</rt></ruby>)

Answers:
* HTML5 ruby is basically what IE supports
* complex ruby may return in future if there’s a definite use case for it that can’t be solved by nested ruby
* Hixie thought the non-language uses were a bit dodgy <img src='http://html5doctor.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  -->
</section><div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://html5doctor.com/i-b-em-strong-element/" rel="bookmark" class="crp_title">The i, b, em, &amp; strong elements</a></li><li><a href="http://html5doctor.com/small-hr-element/" rel="bookmark" class="crp_title">The small &amp; hr elements</a></li><li><a href="http://html5doctor.com/html-5-reset-stylesheet/" rel="bookmark" class="crp_title">HTML5 Reset Stylesheet</a></li><li><a href="http://html5doctor.com/how-to-get-html5-working-in-ie-and-firefox-2/" rel="bookmark" class="crp_title">How to get HTML5 working in IE and Firefox 2</a></li><li><a href="http://html5doctor.com/summary-figcaption-element/" rel="bookmark" class="crp_title">Hello, summary and figcaption elements</a></li></ul></div>


Share and Save:


	<a rel="nofollow"  href="http://twitter.com/home?status=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp%20-%20http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;bodytext=The%20%26lt%3Bruby%26gt%3B%2C%20%26lt%3Brt%26gt%3B%20and%20%26lt%3Brp%26gt%3B%20elements%20allow%20us%20to%20add%20%E2%80%98ruby%E2%80%99%20phonetic%20annotations%20in%20languages%20like%20Japanese%20and%20Chinese.%20Despite%20the%20terrors%20of%20internationalisation%20and%20patchy%20browser%20support%20%E2%80%94%20with%20a%20little%20fiddling%20and%20a%20lot%20of%20caution%20%E2%80%94%20this%20sexy%20threesome%20with%20adorable%20accents%20are%20ready%20to%20use%20now." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;notes=The%20%26lt%3Bruby%26gt%3B%2C%20%26lt%3Brt%26gt%3B%20and%20%26lt%3Brp%26gt%3B%20elements%20allow%20us%20to%20add%20%E2%80%98ruby%E2%80%99%20phonetic%20annotations%20in%20languages%20like%20Japanese%20and%20Chinese.%20Despite%20the%20terrors%20of%20internationalisation%20and%20patchy%20browser%20support%20%E2%80%94%20with%20a%20little%20fiddling%20and%20a%20lot%20of%20caution%20%E2%80%94%20this%20sexy%20threesome%20with%20adorable%20accents%20are%20ready%20to%20use%20now." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;t=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;annotation=The%20%26lt%3Bruby%26gt%3B%2C%20%26lt%3Brt%26gt%3B%20and%20%26lt%3Brp%26gt%3B%20elements%20allow%20us%20to%20add%20%E2%80%98ruby%E2%80%99%20phonetic%20annotations%20in%20languages%20like%20Japanese%20and%20Chinese.%20Despite%20the%20terrors%20of%20internationalisation%20and%20patchy%20browser%20support%20%E2%80%94%20with%20a%20little%20fiddling%20and%20a%20lot%20of%20caution%20%E2%80%94%20this%20sexy%20threesome%20with%20adorable%20accents%20are%20ready%20to%20use%20now." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;t=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;title=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=The%20%26lt%3Bruby%26gt%3B%2C%20%26lt%3Brt%26gt%3B%20and%20%26lt%3Brp%26gt%3B%20elements%20allow%20us%20to%20add%20%E2%80%98ruby%E2%80%99%20phonetic%20annotations%20in%20languages%20like%20Japanese%20and%20Chinese.%20Despite%20the%20terrors%20of%20internationalisation%20and%20patchy%20browser%20support%20%E2%80%94%20with%20a%20little%20fiddling%20and%20a%20lot%20of%20caution%20%E2%80%94%20this%20sexy%20threesome%20with%20adorable%20accents%20are%20ready%20to%20use%20now." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;h=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fruby-rt-rp-element%2F&amp;t=The%20ruby%20element%20and%20her%20hawt%20friends%2C%20rt%20and%20rp&amp;s=The%20%26lt%3Bruby%26gt%3B%2C%20%26lt%3Brt%26gt%3B%20and%20%26lt%3Brp%26gt%3B%20elements%20allow%20us%20to%20add%20%E2%80%98ruby%E2%80%99%20phonetic%20annotations%20in%20languages%20like%20Japanese%20and%20Chinese.%20Despite%20the%20terrors%20of%20internationalisation%20and%20patchy%20browser%20support%20%E2%80%94%20with%20a%20little%20fiddling%20and%20a%20lot%20of%20caution%20%E2%80%94%20this%20sexy%20threesome%20with%20adorable%20accents%20are%20ready%20to%20use%20now." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>


<br/><br/><p><a href="http://html5doctor.com/ruby-rt-rp-element/" rel="bookmark">The ruby element and her hawt friends, rt and rp</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on May 11, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/ruby-rt-rp-element/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Your Questions Answered #8</title>
		<link>http://html5doctor.com/your-questions-answered-8/</link>
		<comments>http://html5doctor.com/your-questions-answered-8/#comments</comments>
		<pubDate>Wed, 05 May 2010 13:00:55 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[outline]]></category>

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