<?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; footer</title>
	<atom:link href="http://html5doctor.com/tag/footer/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Wed, 16 May 2012 11:31:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>HTML5 Simplequiz 6: Zeldman&#8217;s fat footer</title>
		<link>http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/</link>
		<comments>http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 14:30:20 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Simplequiz]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[zeldman]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=2883</guid>
		<description><![CDATA[For the last couple of years, it's been fashionable to have “fat footers” in websites. Take, for example, Jeffrey Zeldman’s footer...]]></description>
			<content:encoded><![CDATA[<p>A few years ago, <a href="http://www.simplebits.com/">Dan Cederholm</a> published a series of articles called <a href="http://simplebits.com/categories/simplequiz/">Simplequiz</a> in which he posed some options for marking up a specified piece of content and invited readers to choose the one they felt was the best way to mark that up. The value was in the comments in which people said why they made that choice and debated the options (which means it is <em>THE LAW</em> that you read the preceeding comments before adding your own). With Dan&#8217;s blessing, we&#8217;re running an occasional series of <a href="/category/simplequiz/">HTML5 Simplequizzes</a>. </p>
<p>For the last couple of years, it&#8217;s been fashionable to have <a href="http://www.smashingmagazine.com/2009/06/17/informative-and-usable-footers-in-web-design/">&#8220;fat footers&#8221; in websites</a>. Take, for example, <a href="http://www.zeldman.com/#footer">Jeffrey Zeldman&#8217;s footer</a>:</p>
<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/SQ6-zeldman-screen-164x300.png" width="164" height="300" class="aligncenter size-medium wp-image-3109" /></p>
<figcaption>The bottom of Zeldman&#039;s blog has a fat footer</figcaption>
</figure>
<p>We see an area with a svelte black background, containing a super-glammo set of six images, each of which has a caption and links to other sites that Zeldman has an interest in: conferences, books, articles, podcasts. Below those images is a copyright notice, some more conventional footer links (contact, subscribe, style switcher) and a blue stripe:</p>
<figure>
<img src="http://html5doctor.com/wp-content/uploads/2011/02/SQ6-zeldman-footer-300x207.png" width="300" height="207" class="aligncenter size-medium wp-image-3110" /></p>
<figcaption>A closeup of Zeldman’s fat footer</figcaption>
</figure>
<p>Being HTML5 ninjas, we know that we&#8217;ll wrap each image and its attendant caption within <a href="http://html5doctor.com/the-figure-figcaption-elements/"><code>&lt;figure&gt;</code> and <code>&lt;figcaption&gt;</code> elements</a> &#8211; but what will we wrap the whole group of external links in?</p>
<p>Choose from the answers below please. Make sure you show your working out. Escape your HTML, please, or we&#8217;ll put a severed unicorn head in your bed.</p>
<h2>A:</h2>
<p>Figures as direct children of the <code>&lt;footer&gt;</code> element:</p>
<pre><code>&lt;footer&gt;
&lt;figure&gt;&hellip;&lt;/figure&gt;
&hellip;
&lt;p&gt;&lt;small&gt;Copyright © 1995–2011 L. Jeffrey Zeldman.&lt;/small&gt;&lt;/p&gt;
&lt;/footer&gt;
</code></pre>
<h2>B:</h2>
<p>The figures in an  <code>&lt;aside&gt;</code> element nested in the <code>&lt;footer&gt;</code>:</p>
<pre><code>&lt;footer&gt;
&lt;aside&gt;
&lt;figure&gt;&hellip;&lt;/figure&gt;
&hellip;
&lt;/aside&gt;
&lt;p&gt;&lt;small&gt;Copyright © 1995–2011 L. Jeffrey Zeldman.&lt;/small&gt;&lt;/p&gt;
&lt;/footer&gt;
</code></pre>
<h2>C:</h2>
<p>The images in a <code>&lt;nav&gt;</code> element inside the  <code>&lt;footer&gt;</code>:</p>
<pre><code>&lt;footer&gt;
&lt;nav&gt;
&lt;figure&gt;&hellip;&lt;/figure&gt;
&hellip;
&lt;/nav&gt;
&lt;p&gt;&lt;small&gt;Copyright © 1995–2011 L. Jeffrey Zeldman.&lt;/small&gt;&lt;/p&gt;
&lt;/footer&gt;
</code></pre>
<h2>D:</h2>
<p>Images in a <code>&lt;div&gt;</code> element immediately before the  <code>&lt;footer&gt;</code>:</p>
<pre><code>&lt;div&gt;
&lt;figure&gt;&hellip;&lt;/figure&gt;
&hellip;
&lt;/div&gt;
&lt;footer&gt;
&lt;p&gt;&lt;small&gt;Copyright © 1995–2011 L. Jeffrey Zeldman.&lt;/small&gt;&lt;/p&gt;
&lt;/footer&gt;
</code></pre>
<h2>E:</h2>
<p>Images in an <code>&lt;aside&gt;</code> element immediately before the  <code>&lt;footer&gt;</code>:</p>
<pre><code>&lt;aside&gt;
&lt;figure&gt;&hellip;&lt;/figure&gt;
&hellip;
&lt;/aside&gt;
&lt;footer&gt;
&lt;p&gt;&lt;small&gt;Copyright © 1995–2011 L. Jeffrey Zeldman.&lt;/small&gt;&lt;/p&gt;
&lt;/footer&gt;
</code></pre>
<p>Your answers below, please, with your rationale, by Friday 12th March.</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/html5-simplequiz-4-figures-captions-and-alt-text/" rel="bookmark" class="crp_title">HTML5 Simplequiz #4: figures, captions and alt text</a></li>
<li><a href="http://html5doctor.com/html5-simplequiz-2-citing-people/" rel="bookmark" class="crp_title">HTML5 Simplequiz #2: citing people</a></li>
<li><a href="http://html5doctor.com/html5-simplequiz-1/" rel="bookmark" class="crp_title">HTML5 Simplequiz #1</a></li>
<li><a href="http://html5doctor.com/reviewing-html5-for-web-designers/" rel="bookmark" class="crp_title">Reviewing HTML5 for Web Designers</a></li>
<li><a href="http://html5doctor.com/the-figure-figcaption-elements/" rel="bookmark" class="crp_title">The figure &#038; figcaption elements</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/" rel="bookmark">HTML5 Simplequiz 6: Zeldman&#8217;s fat footer</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on March 4, 2011.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/feed/</wfw:commentRss>
		<slash:comments>85</slash:comments>
		</item>
		<item>
		<title>Your Questions #14</title>
		<link>http://html5doctor.com/your-questions-14/</link>
		<comments>http://html5doctor.com/your-questions-14/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 14:30:07 +0000</pubDate>
		<dc:creator>Richard Clark</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[aside]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[stylesheets]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=2543</guid>
		<description><![CDATA[<p>The clinic is getting busy with more <abbr>HTML</abbr>5 ailments. This week, we'll cover questions about aside, blogging platforms, stylesheet links, id attribute validation and a mammoth semantic journey.</p>]]></description>
			<content:encoded><![CDATA[<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 questions about <code>&lt;aside&gt;</code>, blogging platforms, stylesheet links, <code>id</code> attribute validation, and take a mammoth semantic journey.</p>

<section>
  <h2>Aside question</h2>
  <p>Lukasz asked:</p>
  <blockquote>
    <p>I wonder if such use of aside tag inside <code>section</code> would be correct:</p>
<pre><code>&lt;section id="about"&gt;
  &lt;h1&gt;about me&lt;/h1&gt;
  &lt;p&gt;blablabla&lt;/p&gt;
  &lt;aside&gt;
    &lt;h2&gt;you can also find me on:&lt;/h2&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;twitter&lt;/a&gt;&lt;/li&gt;
      ...
    &lt;/ul&gt;
  &lt;/aside&gt;
&lt;/section&gt;</code></pre>
    <p>Thanks in advance for any help and keep up the good work!</p>
  </blockquote>
  <p>Hard to give definitive advice without seeing the whole page, but it seems fine to me. See <a href="http://html5doctor.com/aside-revisited/">Mike&#8217;s article on <code>&lt;aside&gt;</code></a>.</p> 

	<p>In general, use <code>&lt;aside&gt;</code> for a section of a page that consists of content that is tangentially <em>related to</em> but <em>separate from</em> the surrounding content. In print, this would be a sidebar, pull-quote, or footnote. On a weblog article, this could be article metadata in the margin or the comments section.</p>

	<p>If your social network links are main content, then <code>&lt;aside&gt;</code> isn&#8217;t the element (maybe <code>&lt;section&gt;</code>, maybe <code>&lt;nav&gt;</code>). If they&#8217;re just related content (i.e., they could be omitted when showing this page in a feed reader), then <code>&lt;aside&gt;</code> is a good choice.</p>

	<p>peace &#8211; Oli</p>
</section>

<section>
  <h2>Blogging services</h2>
  <p>Patrick asked:</p>
  <blockquote>
    <p>Do you have any suggestions to people implementing <abbr>HTML</abbr>5 on blogging services like Tumblr? The last time I checked, there are problems making <abbr>HTML</abbr>5 blogs on these sites:</p>
    <ul>
      <li>Tumblr &#8211; inserted iframe breaks <abbr>HTML</abbr>5 conformance</li>
      <li>Posterous &#8211; no Javascript allowed at the moment (according to their doc)</li>
      <li>Blogger &#8211; it doesn&#8217;t preserve my <abbr>HTML</abbr>5 DOCTYPE</li>
    </ul>
		<p>Are there blogging services that don&#8217;t mess with the <abbr>HTML</abbr>5 markup?</p>
  </blockquote>
  <p>I used to use Tumblr, and you can use <abbr>HTML</abbr>5 in your templates. But any new <abbr>HTML</abbr>5 elements (e.g., <code>&lt;section&gt;</code>) in your articles get munged, even
using the “Raw <abbr>HTML</abbr>” setting. Unfortunately, I think that managed blogging services will probably be a little slow to adopt <abbr>HTML</abbr>5 (= fix the <abbr>HTML</abbr>5 errors they/their tools have), and you&#8217;ll have to use your own <abbr>CMS</abbr> for that level of control.</p>

	<p>You can of course build your own theme for something like WordPress, and a little birdie did tell me that the latest version of WordPress has <em>some</em> <abbr>HTML</abbr>5 in its default template, so this might carry over into their hosted service. If you can&#8217;t wait and don&#8217;t have a server, remember that <abbr>HTML</abbr>5 is a sliding scale — I was using <code>&lt;div class="section"&gt;</code> with Tumblr for a while.</p>

	<p>peace &#8211; Oli</p>
</section>

<section>
  <h2>Link stylesheet</h2>
  <p>Steve asked:</p>
  <blockquote>
    <p>Hello, can we get rid of type=&#8221;text/css&#8221; when declaring a link rel=&#8221;stylesheet&#8221;?</p>

		<p>Thank you and long live the web.</p>
  </blockquote>
  <p>You certainly can do that. Same with including JavaScript:</p>

<pre><code>&lt;link rel="stylesheet" media="screen, projection" href="http://html5doctor.com/css/style.css"&gt;
&lt;script src="http://html5doctor.com/js/html5.js"&gt;&lt;/script&gt;</code></pre>

  <p>Thanks, Tom</p>
</section>

<section>
  <h2>ID attribute validation</h2>
  <p>Andrés asked:</p>
  <blockquote>
    <p>Does the id attribute allows to begin with a number or a hyphen, unlike previous specs? Is there any set of character that aren&#8217;t allowed, besides space character?</p>
  </blockquote>
  <p>There are three rules for the value of the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute">ID attribute</a>:</p>

  <ol>
    <li>It must be at least one character long,</li>
    <li>it must contain no space characters, and</li>
    <li>it must be unique within the page.</li>
  </ol>

	<p>So a hyphen would be valid as an ID value. It validates too. However, you may run into legacy stuff that hasn&#8217;t been updated yet (<abbr>HTML</abbr> Tidy, <abbr>WYSIWYG</abbr> plugins for a <abbr>CMS</abbr>, etc), so I&#8217;d advise testing within your workflow and in a browser (no idea if <abbr>IE</abbr> would barf on that, and it wouldn’t surprise me if it did).</p>

	<p>peace &#8211; Oli</p>
</section>

<section>
  <h2>I&#8217;m so confused &#8211; article, header, footer, nav?</h2>
  <p>Benjamin asked:</p>
  <blockquote>
    <p>Hey Doctor(s), I&#8217;m so confused right now.</p>

		<p>I&#8217;ve been trying to implement <abbr>HTML</abbr>5 for my new blog and <abbr>CMS</abbr>, but having difficulties trying to figure out where advanced content should go. All the demonstrations and examples about <abbr>HTML</abbr>5 are over-simplified and just don&#8217;t include any real world information. For example, an article typically includes (in no particular order):</p>

    <ul>
      <li>Article
        <ul>
          <li>Title</li>
          <li>Tagline</li>
          <li>Tags</li>
          <li>Avatar</li>
          <li>Content</li>
          <li>Links to child articles (eg. download, docs, demo)
            <ul>
              <li>Link Title</li>
              <li>Link Avatar</li>
              <li>Link Author Name</li>
            </ul>
          </li>
          <li>Links to recommended articles (related content)
            <ul>
              <li>Link Title</li>
              <li>Link Avatar</li>
              <li>Link Author Name</li>
            </ul>
          </li>
          <li>Article Author Details
            <ul>
              <li>Author Name</li>
              <li>Author Avatar</li>
            </ul>
          </li>
          <li>Article Details
            <ul>
              <li>Published Date</li>
              <li>Modified Date</li>
            </ul>
          </li>
          <li>Share Buttons</li>
        </ul>
      </li>
    </ul>

    <p>So all in all, way more complicated than the typical:</p>
    <ul>
      <li>Article
        <ul>
          <li>Article Title</li>
          <li>Article Content</li>
        </ul>
      </li>
    </ul>

    <p>So say for example, where should all the stuff in the complicated (real-world) example go? Should the avatar go in the header, the article, or the footer? Or maybe even a details element? Should the navigation links to other articles be like: nav &gt; ul &gt; li &gt; article &gt; header &gt; a &gt; h1 With the a containing the link, and the h1 containing the article header? Should the post details (despite we want them display perhaps underneath the title, and before the content) be in a details element? And should that be within the header element or be below the header element? Should they use for example:</p>

<pre><code>&lt;dl&gt;
  &lt;dt class="published"&gt;Published At:&lt;/dt&gt;
  &lt;dd class="published"&gt;...&lt;/dd&gt;
&lt;/dl&gt;</code></pre>

    <p>or:</p>

<pre><code>&lt;ul&gt;
  &lt;li class="published"&gt;
    &lt;label&gt;Published At:&lt;/label&gt;
    &lt;span&gt;...&lt;/span&gt;
  &lt;/li&gt;
&lt;/ul&gt;</code></pre>

    <p>or something else? The second example seems to remove the duplication of the css class, but seems to add more complications though. Should those tag and article links in nav elements be inside the header? Or footer? Or just article? How many footers and headers can be in article?</p>

    <p>I&#8217;m soo confused. Any help would be greatly appreciated? Perhaps the best help out there would be a detailed HTML5 example of the real-world article structure I posted above.</p>
  </blockquote>
  <p>OK now, take a deeeep breath and relax. There, feeling a little better? ;)</p>

  <p>That&#8217;s a mammoth e-mail, so here are some basics to get you started:</p>

  <ul>
    <li>Start with a basic page before attempting something complex — don&#8217;t jump in the deep end.</li>
    <li>Look at websites in <a href="http://html5gallery.com"><abbr>HTML</abbr>5 Gallery</a> and check their code.</li>
    <li>Look at the code for this site. Granted, it&#8217;s not perfect, but it&#8217;s pretty good, and we have a lot of the content you list.</li>
    <li>Use the most appropriate element for each piece of content, even if it&#8217;s not one of the new ones. (Hopefully it ends up being what you used before.) Perhaps <a href="http://html5doctor.com/happy-1st-birthday-us/">our handy flowchart</a> might help for that.</li>
  </ul>

  <p>Some more specific answers:</p>
  
  <p><q>&#8220;Should the navigation links to other articles be like: nav &gt; ul &gt; li &gt; article &gt; header &gt; a &gt; h1 With the a containing the link, and the h1 containing the article header?&#8221;</q> The title of an article is not the same as an article, so it&#8217;d be wrong to use <code>&lt;article&gt;</code> or <code>&lt;header&gt;</code> here. I assume you didn’t use <code>&lt;h1&gt;</code> in <a href="http://html5doctor.com/nav-element/">navigation</a> lists before, right?</p>

  <p><q>&#8220;Should the post details (despite we want them display perhaps underneath the title, and before the content) be in a details element?&#8221;</q> Possibly, if you wanted that interaction, but likely not as you probably want them visible all the time. See what the <a href="http://dev.w3.org/html5/markup/details">spec says about <code>&lt;details&gt;</code></a>. Decide on the semantics of each piece of content first. Worry about styling later.</p>

  <p><q>&#8220;And should that be within the header element or be below the header element?&#8221;</q> <a href="http://html5doctor.com/the-header-element/">Header</a> or <a href="http://html5doctor.com/the-footer-element/">footer</a> seem like good places to put them. <code>&lt;label&gt;</code> is a caption for a form control, not an element to use whenever you need to label something.</p>

  <p>I recommend you start with your <abbr>HTML</abbr>4 or <abbr>XHTML</abbr>1 knowledge and build on it. <abbr>HTML</abbr>5 is an evolution, not a revolution. In fact, I’d recommend you start out making a site in <abbr>HTML</abbr>4 with the <abbr>HTML</abbr>5 doctype (and validate it as <abbr>HTML</abbr>5), then change bits over time as you read each article on <a href="http://html5doctor.com"><abbr>HTML</abbr>5 Doctor</a> and learn more ;-)</p>

  <p>peace &#8211; Oli</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 class="related"><li><a href="http://html5doctor.com/your-questions-15/" rel="bookmark" class="crp_title">Your Questions #15</a></li><li><a href="http://html5doctor.com/your-questions-16/" rel="bookmark" class="crp_title">Your Questions #16</a></li><li><a href="http://html5doctor.com/your-questions-answered-8/" rel="bookmark" class="crp_title">Your Questions Answered #8</a></li><li><a href="http://html5doctor.com/your-questions-answered-4/" rel="bookmark" class="crp_title">Your Questions Answered #4</a></li><li><a href="http://html5doctor.com/your-questions-answered-11/" rel="bookmark" class="crp_title">Your Questions Answered #11</a></li></ul></div><p><a href="http://html5doctor.com/your-questions-14/" rel="bookmark">Your Questions #14</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on November 26, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/your-questions-14/feed/</wfw:commentRss>
		<slash:comments>3</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[<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&#8242;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 class="related"><li><a href="http://html5doctor.com/go-offline-with-application-cache/" rel="bookmark" class="crp_title">Go offline with application cache</a></li><li><a href="http://html5doctor.com/your-questions-answered-9/" rel="bookmark" class="crp_title">Your Questions Answered 9</a></li><li><a href="http://html5doctor.com/your-questions-16/" rel="bookmark" class="crp_title">Your Questions #16</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-12/" rel="bookmark" class="crp_title">Your Questions Answered #12</a></li></ul></div><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>8</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[<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>&#8216;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 class="related">
<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/your-questions-14/" rel="bookmark" class="crp_title">Your Questions #14</a></li>
<li><a href="http://html5doctor.com/your-questions-answered-6/" rel="bookmark" class="crp_title">Your Questions Answered #6</a></li>
</ul>
</div>
<p><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>40</slash:comments>
		</item>
		<item>
		<title>The Footer Element Update</title>
		<link>http://html5doctor.com/the-footer-element-update/</link>
		<comments>http://html5doctor.com/the-footer-element-update/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 13:00:30 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[Specification Changes]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[HTML 5]]></category>

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

		<guid isPermaLink="false">http://html5doctor.com/?p=911</guid>
		<description><![CDATA[September being one month before the HTML5 spec goes to last call in October, there&#8217;s been a few significant changes to the HTML5 spec that we wanted to briefly share with our patients. Clarification over section and article The spec has been clarified to help authors correctly choose between when to use section and when [...]]]></description>
			<content:encoded><![CDATA[<p>September being one month before the HTML5 spec goes to last call in October, there&#8217;s been a few significant changes to the HTML5 spec that we wanted to briefly share with our patients.</p>

<p><span id="more-911"></span></p>

<h2>Clarification over <code>section</code> and <code>article</code></h2>

<p>The spec has been clarified to help authors correctly choose between when to use <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element">section</a> and when to use <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-article-element">article</a>, and <a href="http://html5doctor.com/the-section-element/">Bruce&#8217;s section post</a> has also been updated.</p>

<h2><code>footer</code> now works like <code>header</code></h2>

<p>This was a big one and causing confusing to people coming to HTML5 for the first time.  Originally you couldn&#8217;t include a <code>nav</code> element inside a footer, or a <code>section</code>. </p>

<p>Now the spec has been <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element">changed to match the <code>header</code> element</a>.</p>

<h2><code>details</code> and <code>figure</code> saved</h2>

<p>Instead of using legend, <a href="http://html5doctor.com/legend-not-such-a-legend-anymore/">which didn&#8217;t work</a>, <a href="http://adactio.com">Jeremy</a> suggested (although slightly tongue in cheek) to use <code>dt</code> for the title and <code>dd</code> for the body.  Ian Hickson agreed, and <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#the-figure-element">it&#8217;s in</a></p>

<p>Example:</p>

<pre><code>&lt;figure&gt;
 &lt;dd&gt;&lt;video src=&quot;ex-b.mov&quot;&gt;&lt;/video&gt;
 &lt;dt&gt;Exhibit B. The &lt;cite&gt;Rough Copy&lt;/cite&gt; trailer.
&lt;/figure&gt;</code></pre>

<h2><code>aside</code> has better examples</h2>

<p>The documentation has been updated to specify <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-aside-element">better examples</a> of how the aside element can be used.</p>

<p>Better examples help us authors understand how it can be used.</p>

<h2>Dropped Elements</h2>

<p>The following elements have been dropped from the HTML5 spec (though <code>bb</code> and <code>datagrid</code> were some time ago, and <code>datagrid</code> has been postponed rather than dropped entirely):</p>

<ul>
<li><a href="http://html5.org/tools/web-apps-tracker?from=3858&#038;to=3859">dialog</a></li>
<li>bb</li>
<li>datagrid</li>
</ul>

<h2>Ch-ch-changes</h2>

<p>We&#8217;ll be posting in more detail about some of these changes, and as further changes come out of the editing process we&#8217;ll no doubt keep you all up to date, either via our <a href="http://twitter.com/html5doctor">Twitter account</a> (which you should follow) or feel free to <a href="http://html5doctor.com/contact/">let us know too</a>!<div id="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/legend-not-such-a-legend-anymore/" rel="bookmark" class="crp_title">Legend not such a legend anymore</a></li><li><a href="http://html5doctor.com/the-section-element/" rel="bookmark" class="crp_title">The section element</a></li><li><a href="http://html5doctor.com/the-figure-figcaption-elements/" rel="bookmark" class="crp_title">The figure &#038; figcaption elements</a></li><li><a href="http://html5doctor.com/dd-details-wrong-again/" rel="bookmark" class="crp_title">dd-details wrong again</a></li><li><a href="http://html5doctor.com/the-footer-element-update/" rel="bookmark" class="crp_title">The Footer Element Update</a></li></ul></div></p>
<p><a href="http://html5doctor.com/september-html5-spec-changes/" rel="bookmark">September HTML5 spec changes</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on September 17, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/september-html5-spec-changes/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Designing a blog with html5</title>
		<link>http://html5doctor.com/designing-a-blog-with-html5/</link>
		<comments>http://html5doctor.com/designing-a-blog-with-html5/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:00:21 +0000</pubDate>
		<dc:creator>Bruce Lawson</dc:creator>
				<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Structure]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[aside]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=47</guid>
		<description><![CDATA[Much of HTML 5&#8242;s feature set involves JavaScript APIs that make it easier to develop interactive web pages but there are a slew of new elements that allow you extra semantics in your conventional Web 1.0 pages. In order to investigate these, let&#8217;s look at marking up a blog. Firstly what we&#8217;ll do is use [...]]]></description>
			<content:encoded><![CDATA[<p>Much of <abbr>HTML</abbr> 5&#8242;s feature set involves JavaScript <abbr>API</abbr>s that make it easier to develop interactive web pages but there are a slew of new elements that allow you extra semantics in your conventional Web 1.0 pages. In order to investigate these, let&#8217;s look at marking up a blog.</p>
<p>Firstly what we&#8217;ll do is use the <code>header</code>, <code>footer</code>, <code>and nav </code>elements to mark up the broad structure of the page. We&#8217;ll make the blog comments form much smarter by using the new data types and built-in validation available in <abbr>HTML</abbr> 5-aware browsers. </p>
<p>Then we&#8217;ll do some work on the guts of the page, using <abbr>HTML</abbr> 5&#8217;s <code>article</code> elements to better mark up blog posts and comments and show how to use the <code>section</code> elements to better structure accessible hierarchical headings on sites that are <abbr>CMS</abbr>-driven. As blogs are chronologically ordered, we&#8217;ll  see what <abbr>HTML 5</abbr> offers us for representing dates and times.</p>
<p>So take the phone of the hook, and make a cup of tea and we&#8217;ll get started.</p>
<section>
<h2>Setting the DOCTYPE</h2>
<p><abbr>HTML</abbr> 5, when used as plain <abbr>HTML</abbr> rather than its <abbr>XHTML</abbr> 5 sibling doesn&#8217;t need a DOCTYPE. But all browsers do, otherwise they go into <a href="http://en.wikipedia.org/wiki/Quirks_mode">Quirksmode</a>, which you don&#8217;t want: the collision of <abbr>HTML</abbr> 5 and Quirksmode is like matter and anti-matter meeting, and will cause a negative reality inversion that will make your underwear catch fire. </p>
<p>You&#8217;ve been warned, so at the top of your document, you need the line <code>&lt;!DOCTYPE html&gt;</code>.</p>
<p>Some sites &#8220;use&#8221; <abbr>HTML</abbr> 5, when in actual fact all they&#8217;ve done is take their existing code and change the DOCTYPE. That&#8217;s fine and dandy if you&#8217;ve been using valid, semantic code as <abbr>HTML</abbr> 5 is very similar to valid <abbr>HTML</abbr> 4.01. <a href="http://meyerweb.com/eric/thoughts/2009/01/02/an-event-apart-and-html-5/">Eric Meyer mentions small differences</a> like &#8220;not permitting a value attribute on an image submit&#8221;, and there are a few differences between the languages, summarised in the document <a href="http://dev.w3.org/html5/html4-differences/">HTML 5 differences from HTML 4</a>.</p>
<p>However, I don&#8217;t want simply to  rebadge my existing code, but to use some of the new structural elements now.</p>
</section>
<section>
<h2>Using some new structural elements</h2>
<p>My blog &#8211; like millions of others &#8211; has a header denoted by <code>&lt;div id="header"&gt;</code>, a footer <code>&lt;div id="footer"&gt;</code>, some articles (wrapped by an area called &#8220;content&#8221;, <code>&lt;div id="content"&gt;</code>) and some navigation (wrapped up in an area called &#8220;sidebar&#8221; <code>&lt;div id="sidebar"&gt;</code>). Most sites on the Web have similar constructs, although depending on your choice they might be called &quot;branding&quot; or &quot;info&quot; or &quot;menu&quot;, or you might use the equivalent words in your own language. </p>
<p>Although these all have very different functions within the page, they  use  the same generic <code>div</code> in the markup. as <abbr>HTML 4</abbr> has no other way to code them. <abbr>HTML</abbr> 5 has new elements for distinguishing  these logical areas: <code>header</code>, <code>nav</code>, <code>footer</code> and friends. (There&#8217;s  more on this in an artice by Lachlan Hunt on A List Apart: <a href="http://www.alistapart.com/articles/previewofhtml5">A Preview of <abbr>HTML</abbr> 5</a>.)</p>
<p>The overall aim is to replace this structure:</p>
<p><img src="/wp-content/uploads/2009/06/html5-before1.gif" alt="structure chart before redesign"></p>
<p>with this:</p>
<p><img src="/wp-content/uploads/2009/06/html5-after1.gif" alt="structure chart after redesign"></p>
<p>It&#8217;s a simple matter to change the <abbr>HTML</abbr> <code>div</code>s into the new elements. The only difficulty I had was deciding which element to use to mark up my sidebar, as it also includes a search field and &#8220;colophon&#8221; information as well as site-wide navigation. I decided against the <code>aside</code> element,  as <a href="http://dev.w3.org/html5/spec/Overview.html#the-aside-element">the spec says</a> it &#8220;represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content&#8221;, but it&#8217;s nevertheless <em>content</em> rather than navigation. So I decided to go for the <code>nav</code> element as the closest fit.</p>
<p>I&#8217;ve wrapped the main content in a <code>section</code> element (previously I&#8217;d kept it as a <code>div</code>). <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-section-element"><code>section</code> is defined</a> in the spec</p>
<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-section-element"><p>The section element represents a generic document or application section. A section, in this context, is a thematic grouping of content, typically with a heading, possibly with a footer.</p></blockquote>
<p class="warning"><strong>Please note: I no longer recommend wrapping the whole content area in a <code>section</code> element, and suggest that you use a <code>div</code> element. Read more about <a href="/the-section-element">using section appropriately</a>.</strong></p>
<p>In this case, the &#8220;generic document section&#8221; is that of main content. I&#8217;ve retained an <code>id</code> so that a <a href="http://juicystudio.com/article/skip-links.php">skip links</a> feature will work, although I hope that in the future, assistive technology will offer an automatic way for people to go to the first <code>section</code> or <code>article</code>.</p>
<p>My fellow <abbr>HTML</abbr> 5 doctor, Remy Sharp, also notes  that if you retain the <code>div</code>, Internet Explorer without JavaScript would style the div, but none of the other content, making the site  very hard to read.</p>
</section>
<section>
<h2>New form attributes</h2>
<p>As well as the main structural item on the page, I&#8217;ve added some new attributes on <code>input</code> elements in the comments form.</p>
<p><abbr>HTML</abbr> 5 was designed to reflect what developers actually do rather than to reflect a philosophical purity, and that&#8217;s very clearly manifested in the new attributes which mean the browser takes up much of the work currently done by developers re-inventing validation routines in JavaScript. (Extending forms functionality was <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/introduction.html#history-0">how the <abbr>HTML</abbr> 5 spec began</a>).</p>
<p>So I amended the email input field in the comments to be <code>input type="email"</code> which means that when the user submits the form, an <abbr>HTML</abbr> 5-aware browser will use built-in validation routines to check that it&#8217;s in the correct format, without any JavaScript. Check it out in the current version of <a href="http://www.opera.com/">Opera</a>, as that the only full implementation at the time of writing (June 2009), and note that it also adds a &#8220;mail&#8221; icon in the input field as a cue to the user.</p>
<p>There are similar input validation routines triggered by some of the  new <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-type"><code>input</code> types</a>, such as <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#url-state"><code>url</code></a> (which I use on the field that asks for the user&#8217;s web address), <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#number-state"><code>number</code></a> and <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-pattern"><code>pattern</code></a> which compares the input with an arbitrary regular expression.</p>
<p>Another good example is <code>input type="date"</code>, which pops up a calendar widget/ date picker when the user focusses on the input field. You can <a href="http://people.opera.com/brucel/demo/html5-forms-demo.html">test the date picker</a>, or here&#8217;s a screenshot from Opera 9.6:</p>
<p><img src="/wp-content/uploads/2009/06/html5-form-date.gif" alt="date picker pops up next to input field"></p>
<p>A very useful new attribute I used on both <code>input</code> fields for commenter&#8217;s name and email address, and the comment <code>textarea</code> was <code>type="required"</code> which generates a message on submission if the fields are left blank. Each different localisation of a browser would need to have a different message, and it&#8217;s not (so far) customisable by the developer. </p>
<p><img src="/wp-content/uploads/2009/06/html5-required-feedback.gif" alt="red-bordered browser message 'You have to specify a value' next to unfilled required field"></p>
<p>The good thing with all this new form fabulousness is it&#8217;s all formed around new attributes on an exisiting element, so people using older browsers just see a plain old <code>input</code> field.</p>
<section>
<h3>A note on screenreaders and <abbr>HTML 5</abbr></h3>
<p>I hope screenreaders are ready for these new interactions; I asked the html 5 group to formally <a href="http://lists.w3.org/Archives/Public/public-html/2007Jul/1249.html">invite screenreader vendors to participate</a> in the specification; to my knowledge, <a href="http://lists.w3.org/Archives/Public/public-html/2008Aug/0795.html">none have done so</a>.</p>
</section>
</section>
<section>
<h2>Laying out the new elements</h2>
<p>It&#8217;s not too hard to layout the new elements. In all the non-<abbr>IE</abbr> browsers, you can lay out anything using <abbr>CSS</abbr> &#8211; even a <a href="http://people.opera.com/brucel/demo/html5-nonsense-element.html">nonsense element</a>. One gotcha  is that that the current crop of browsers have no &#8220;knowledge&#8221; of these elements, although <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)">support is improving all the time</a>.</p>
<p>All browsers have default settings for the elements they &#8220;know about&#8221;&mdash;how much padding, margin they element gets, does it display as a block or inline?. (Here&#8217;s a <a href="http://www.w3.org/TR/CSS2/sample.html">sample default stylesheet</a>.) Unless over-ridden by <abbr>CSS</abbr>, these defaults apply. But the browsers don&#8217;t know about <code>header</code>, <code>nav</code> and the like, so have no defaults to apply to them.</p>
<p>I got terrible rendering oddities until I explicitly told the browsers </p>
<pre><code>header, footer, nav, article {display:block;}</code></pre>
<section>
<h3><abbr>IE</abbr> layout</h3>
<p>There&#8217;s one gotcha about styling <abbr>HTML</abbr> 5 pages in <abbr>IE</abbr>: it doesn&#8217;t work. You can force it to quite easily with a JavaScript hack <code>document.createElement('element name')</code>. (Lachlan Hunt gets to the bottom of <a href="http://blog.whatwg.org/supporting-new-elements-in-ie">why IE needs this</a>.)</p>
<p>For your convenience, Remy Sharp has written an <a href="http://remysharp.com/2009/01/07/html5-enabling-script/"><abbr>HTML</abbr> 5 enabling script</a> which I use in the header to conjure all the missing elements into existence all at once.</p>
<p>But let&#8217;s be clear: <strong>this won&#8217;t work if your <abbr>IE</abbr> user doesn&#8217;t have JavaScript turned on</strong>. How much of that&#8217;s a big deal that is for you to decide. Pragmatically, it seems to me that the sites that will benefit the most from HTML 5’s new “Ajax”-style features, such as drag-and-drop, are the sites that currently have no hope of working without JavaScript. </p>
</section>
<section>
<h3>Firefox 2 and Camino 1 layout</h3>
<p>Firefox 2 and Camino 1 both use Gecko 1.9 which has a bug and so gets grumpy if you don&#8217;t serve the page as <abbr>XHTML</abbr>. (Go figure; that&#8217;s almost enough to trigger a negative reality inversion and you know how bad that can be). However, Firefox and Camino users upgrade frequently so Firefox is in version 3, while Camino 2 beta is out, so the problem will soon cease to exist. (Read more at <a href="/how-to-get-html5-working-in-ie-and-firefox-2/">How to get HTML5 working in IE and Firefox 22</a> by Remy Sharp.)</p>
</section>
</section>
<section>
<h2>What&#8217;s the point of those new structural elements?</h2>
<p>Well, they add semantics to the page. The browser now knows which area of your site is the header or the footer because there are <code>header</code> and <code>footer</code> elements, whereas <code>div</code> might be called &#8220;branding&#8221; and &#8220;legal&#8221;, or even  &#8220;<span lang="fr">en-tete</span>&#8221; and &#8220;<span lang="fr">pied-de-page</span>&#8221; or &#8220;<span lang="de">kopfzeile</span>&#8221; and &#8220;<span lang="de">fusszeile</span>&#8220;.</p>
<p>But <em>so what</em>?</p>
<p>Robin Berjon expressed it beautifully in a <a href="http://www.alistapart.com/comments/semanticsinhtml5?page=2#12">comment on <cite>A List Apart</cite></a>: </p>
<blockquote cite="http://www.alistapart.com/comments/semanticsinhtml5?page=2#12">
<p>Pretty much everyone in the Web community agrees that “semantics are yummy, and will get you cookies”, and that’s probably true. But once you start digging a little bit further, it becomes clear that very few people can actually articulate a reason why. So before we all go another round on this, I have to ask: what’s it you wanna do with them darn semantics?</p>
<p>The general answer is “to repurpose content”. That’s fine on the surface, but you quickly reach a point where you have to ask “repurpose to what?” &hellip; I think <abbr>HTML</abbr> should add only elements that either expose functionality that would be pretty much meaningless otherwise (e.g. <code>canvas</code>) or that provide semantics that help repurpose for Web browsing uses.</p>
</blockquote>
<p>In my view, there are a couple of things I want to do with those semantics. The first is for search engine use; it&#8217;s easy to imagine Messrs Google or Yahoo! giving lower weighting to content in <code>footer</code> elements, or extra weight to content in the <code>header</code>. The second reason is to make the site navigable for people with disabilities. People with learning difficulties might instruct their browser always to put the articles before the navigation, for example. User agents might very well have a keyboard shortcut which jumped straight to the <code>nav</code> for example, or jumped straight past the navigation, in a programmatic implementation of &#8220;<a href="http://juicystudio.com/article/skip-links.php">skip links</a>&#8220;.</p>
<p>Which brings me to&hellip;</p>
</section>
<section>
<h2>Further refining the <abbr>HTML</abbr> 5 structure</h2>
<section>
<h3>The blog home page</h3>
<p>An interesting thing about a blog homepage is that there are generally the last 5 or so posts, each with a heading, a &quot;body&quot; and data about the post (time, who wrote it, how many comments etc.) and usually a link to another page that has the full blog post (if the homepage just showed an excerpt) and its comments.</p>
<p><abbr>HTML</abbr> 5 has an <a href="http://dev.w3.org/html5/spec/Overview.html#the-article-element"><code>article</code> element</a> which I use to wrap each story: </p>
<blockquote cite="http://dev.w3.org/html5/spec/Overview.html#the-article-element">
<p>The article element represents a section of a page that consists of a composition that forms an independent part of a document, page, or site. This could be a forum post, a magazine or newspaper article, a Web log entry, a user-submitted comment, or any other independent item of content.</p>
</blockquote>
<p>Let&#8217;s look in more detail at the guts of how I mark up each blogpost.</p>
<h3>Anatomy of a blog post</h3>
<p><img src="/wp-content/uploads/2009/06/html5-article-outline.gif" alt="diagram of article structure; explanation follows"></p>
<p>The wrapper is no longer a generic <code>div</code> but an <code>article</code>. Within that is a <code>header</code>, comprising a heading (the title of the blogpost) and then the time of publication,  marked up using the <code>time</code> element.</p>
<p>Then there are the pearls of wit and wisdom that consitute each of my posts, marked up as paragraphs, blockquotes etc., and is pulled unchanged out of the database. Following that is data about the blog post (category, how many comments) marked up as a footer and, in the case of pages that show a single blogpost, there are comments expressing undying admiration and love. Finally, there may be navigation from one article to the next.</p>
<section>
<h4>Data about the article</h4>
<p>Following the content there is some &#8220;metadata&#8221; about the post: what category it&#8217;s in, how many comments there are. I&#8217;ve marked this up as <code>footer</code>.  I previously used <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-aside-element"><code>aside</code></a> which &#8220;represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content&#8221; but decided that it was too much of a stretch; data <em>about</em> a post is intimately related.</p>
<p><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-footer-element"><code>footer</code></a> is a much better fit: &#8220;A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.&#8221; I was initially thrown off-course by the presentational name of the element; my use here isn&#8217;t at the bottom of the page, or even at the bottom of the article, but it certainly seems to fit the bill &#8211; it&#8217;s information about its section, containing author name, links to related documents (comments) and the like. There&#8217;s no reason that you can&#8217;t have more than one <code>footer</code> on page; the spec&#8217;s description says &quot;the footer element represents a footer for the section it applies to&quot; and a page may have any number of sections. The spec also says &quot;Footers don&#8217;t necessarily have to appear at the end of a section, though they usually do.&quot;</p>
</section>
<section>
<h4>Comments</h4>
<p>I&#8217;ve marked up comments as <code>article</code>s, too, as the spec says that an <code>article</code> could be &#8220;a user-submitted comment&#8221;, but nested these inside the parent <code>article</code>. The spec says</p>
<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-article-element"><p>When article elements are nested, the inner article elements represent articles that are in principle related to the contents of the outer article. For instance, a Web log entry on a site that accepts user-submitted comments could represent the comments as article elements nested within the article element for the Web log entry.</p></blockquote>
<p>These are headed with the  date and the time of the comment and name of its author&mdash;if you want, you can wrap these in a <code>header</code>, too, but to me it seems like markup for the sake of it.</p>
</section>
<section>
<h4>Times and dates</h4>
<p>Most blogs, news sites and the like provide dates of article publication.</p>
<p>Microformats people, the most vocal advocates of marking up dates and times, believe that  computer-formatted dates are best for people: their <a href="http://microformats.org/wiki/index.php?title=date-design-pattern&#038;diff=37974&#038;oldid=34166">wiki  says</a> &#8220;the ISO8601 YYYY-MM-DD format for dates is the best choice that is the most accurately readable for the most people worldwide, and thus the most accessible as well&#8221;. I don&#8217;t agree (and neither do candidates in my vox pop of non-geeks, my wife, brother and parents). </p>
<p>I do agree with the microformats people that <a href="http://microformats.org/wiki/principles">hidden metadata is not as good as visible, human-readable data</a> and therefore elected not to use the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-article-element"><code>pubdate</code> attribute of <code>article</code></a>.</p>
<p>Therefore I&#8217;ve used the <abbr>HTML</abbr> 5 <code>time</code> element to give a  machine parsable date to computers, while giving people a human-readable date. Blog posts get the date, while comments get the date and time.</p>
<p>The spec is quite hard to understand, in my opinion, but the format you use is 2004-02-28T15:19:21+00:00, where T separates the date and the time, and the + (or a -) is the offset from <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time"><abbr>UTC</abbr></a>. Dates on their own don&#8217;t need a timezone; full datetimes do. Oddly, the spec suggests that if you use a time without a date, you don&#8217;t need a timezone either.</p>
<p>There&#8217;s considerable controversy over the time element at the moment. Recently one of the inner circle, <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018687.html">Henri Sivonen, wrote</a> that it&#8217;s for marking up future events only and not for timestamping blogs or news items: &#8220;The expected use cases of hCalendar are mainly transferring <i>future</i> event entries from a Web page into an application like iCal.&quot; This seems very silly to me; if there is a <code>time</code> element, why not allow me to mark up any time or date? </p>
<p>The <a href="http://dev.w3.org/html5/spec/Overview.html#the-time-element">spec for <code>time</code></a> does not mention the future event-only restriction: &quot;The time element represents a precise date and/or a time in the proleptic Gregorian calendar&quot; and gives three examples, two of which are about the past and none of which are &quot;future events&quot;. Although the spec doesn&#8217;t (currently) limit use of the element, it does limit format to precise dates in &quot;the proleptic Gregorian calendar&quot;. This means I can mark up an archive page for &quot;all blog posts today&quot; using time, but not &quot;all July 2008 posts&quot; as that&#8217;s not a full YYYY-MM-DD date. Neither can you mark up precise, but ancient dates, so the date of Julius Ceasar&#8217;s assassination, <a href="http://en.wikipedia.org/wiki/Ides_of_March">15 March 44 <abbr>BC</abbr></a> is not compatible.</p>
<p>I don&#8217;t expect this to be resolved. If you think as I do, feel free to <a href="http://www.whatwg.org/mailing-list#specs">mail the Working Group</a> to express your feeling!</p>
</section>
</section>
<p>Hopefully, this brief article (geddit?) has given you a quick overview of how to use some of the new semantic elements. Let me know what you think!</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/aside-revisited/" rel="bookmark" class="crp_title">Aside Revisited</a></li>
<li><a href="http://html5doctor.com/native-drag-and-drop/" rel="bookmark" class="crp_title">Native Drag and Drop</a></li>
<li><a href="http://html5doctor.com/methods-of-communication/" rel="bookmark" class="crp_title">Methods of communication</a></li>
<li><a href="http://html5doctor.com/outlines/" rel="bookmark" class="crp_title">Document Outlines</a></li>
<li><a href="http://html5doctor.com/the-time-element/" rel="bookmark" class="crp_title">The time element (and microformats)</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/designing-a-blog-with-html5/" rel="bookmark">Designing a blog with html5</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on June 30, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/designing-a-blog-with-html5/feed/</wfw:commentRss>
		<slash:comments>117</slash:comments>
		</item>
		<item>
		<title>The footer element</title>
		<link>http://html5doctor.com/the-footer-element/</link>
		<comments>http://html5doctor.com/the-footer-element/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 15:00:13 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[HTML 5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=159</guid>
		<description><![CDATA[For some time now we&#8217;ve become accustomed to seeing &#60;div id="footer"&#62; at the bottom of web pages but with the introduction of HTML 5 it&#8217;s time to say goodbye. With the addition of the new &#60;footer&#62; element we now have more scope and flexibility. According to the spec The footer element represents the footer for [...]]]></description>
			<content:encoded><![CDATA[<p>For some time now we&#8217;ve become accustomed to seeing <code>&lt;div id="footer"&gt;</code> at the bottom of web pages but with the introduction of <abbr title="Hypertext Mark-up Language">HTML</abbr> 5 it&#8217;s time to say goodbye. With the addition of the new <code>&lt;footer&gt;</code> element we now have more scope and flexibility.<span id="more-159"></span></p>
<h2>According to the spec</h2>
<blockquote><p>
The footer element represents the footer for the section it applies to. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.
</p></blockquote>
<h2>Lets get started</h2>
<p>Before we get stuck into dissecting the new element, let&#8217;s lay the foundations for the article and cover the basics. As we&#8217;ve already mentioned above, most people would have laid out the footer as follows</p>
<pre><code>&lt;div id="footer"&gt;
  &lt;ul&gt;
     &lt;li&gt;copyright&lt;/li&gt;
     &lt;li&gt;sitemap&lt;/li&gt;
     &lt;li&gt;contact&lt;/li&gt;
     &lt;li&gt;to top&lt;/li&gt;
  &lt;/ul&gt;
&lt;div&gt;
</code></pre>
<p>However with the creation of <abbr title="Hypertext Mark-up Language">HTML</abbr> 5 this is no longer the case. As you may already know, there is now no longer the need for the<code> &lt;div&gt;</code> element for many elements. In our case, when referring to the footer, the appropriate markup would be <code>&lt;footer&gt;</code><a id="footer"></a></p>
<pre><code>&lt;footer&gt;
  &lt;ul&gt;
     &lt;li&gt;copyright&lt;/li&gt;
     &lt;li&gt;sitemap&lt;/li&gt;
     &lt;li&gt;contact&lt;/li&gt;
     &lt;li&gt;to top&lt;/li&gt;
  &lt;/ul&gt;
&lt;/footer&gt;
</code></pre>
<p>As I mentioned in the first paragraph, originally the <code>&lt;footer&gt;</code> element was only utilised once within our pages but with the introduction of the new element, this no longer needs to be the case. The <code>&lt;footer&gt;</code> element can now be used multiple times and to display all the extra information.</p>
<h2>Using the footer element</h2>
<p>An important point to note is that you are not restricted to use one <code>&lt;footer&gt;</code> element per site, you can use multiple footers, each of which will then become the <code>&lt;footer&gt;</code> for that section of the document. You could therefore have</p>
<h3>Section</h3>
<pre><code>&lt;section&gt;
   Section content appears here.
   &lt;footer&gt;
   Footer information for section.
   &lt;/footer&gt;
&lt;/section&gt;
</code></pre>
<h3>Article</h3>
<pre><code>&lt;article&gt;
   Article content appears here.
   &lt;footer&gt;
   Footer information for article.
   &lt;/footer&gt;
&lt;/article&gt;
</code></pre>
<p>To see an example of the <code>&lt;footer&gt;</code> within an article/section look no further than this very page. Scroll down beyond the article and you will notice the light grey text section, which falls directly after the &#8220;further reading&#8221;. This grey text section which gives information about trackbacks, responses, tags and categories is infact using the footer element. </p>
<h3>Footer</h3>
<p>We&#8217;ve already outlined what the new footer can look like <a href="#footer">above</a>.</p>
<h2>Other Thoughts</h2>
<blockquote cite="http://www.brucelawson.co.uk/2009/marking-up-a-blog-with-html-5-part-2/"><p>I was initially thrown off-course by the presentational name of the element; my use here isn’t at the bottom of the page, or even at the bottom of the article, but it certainly seems to fit the bill &#8211; it’s information about its section, containing author name, links to related documents (comments) and the like. There’s no reason that you can’t have more than one footer on page; the spec’s description says &#8220;the footer element represents a footer for the section it applies to&#8221; and a page may have any number of sections. The spec also says &#8220;Footers don’t necessarily have to appear at the end of a section, though they usually do.&#8221;</p></blockquote>
<p>Bruce Lawson &#8211; <a href="http://www.brucelawson.co.uk/2009/marking-up-a-blog-with-html-5-part-2/">http://www.brucelawson.co.uk/2009/marking-up-a-blog-with-html-5-part-2/</a></p>
<h2>Conclusion</h2>
<p>The footer element offers the chance to define web pages giving them the correct semantic mark-up that they deserve but it&#8217;s vital to use these new found tags as they were intended for. Let&#8217;s not get carried away and misuse this tag like we have done with tables and divs.</p>
<h2>Futher reading</h2>
<ul>
<li><a href="http://www.w3.org/TR/html5/semantics.html#the-footer-element" title="W3C on the footer element" rel="nofollow">http://www.w3.org/TR/html5/semantics.html#the-footer-element</a></li>
</ul>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul class="related">
<li><a href="http://html5doctor.com/the-footer-element-update/" rel="bookmark" class="crp_title">The Footer Element Update</a></li>
<li><a href="http://html5doctor.com/html5-simplequiz-6-zeldmans-fat-footer/" rel="bookmark" class="crp_title">HTML5 Simplequiz 6: Zeldman&#8217;s fat footer</a></li>
<li><a href="http://html5doctor.com/your-questions-16/" rel="bookmark" class="crp_title">Your Questions #16</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/nav-element/" rel="bookmark" class="crp_title">Semantic navigation with the nav element</a></li>
</ul>
</div>
<p><a href="http://html5doctor.com/the-footer-element/" rel="bookmark">The footer element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on June 29, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-footer-element/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>

