<?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; address</title>
	<atom:link href="http://html5doctor.com/tag/address/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>The Address Element</title>
		<link>http://html5doctor.com/the-address-element/</link>
		<comments>http://html5doctor.com/the-address-element/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 19:34:29 +0000</pubDate>
		<dc:creator>Jack Osborne</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1051</guid>
		<description><![CDATA[The <code>address</code> element has been around since the <abbr>HTML</abbr>3 spec was drafted in 1995, and it continues to survive in the latest drafts of <abbr>HTML</abbr>5. But nearly fifteen years after its creation, it's still causing confusion among developers. So how should we be using <code>address</code> in our documents?]]></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-address-element%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fthe-address-element%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>The <code>address</code> element has been around since the <abbr>HTML</abbr>3 spec was drafted in 1995, and it continues to survive in the latest drafts of <abbr>HTML</abbr>5. But nearly fifteen years after its creation, it&#8217;s still causing confusion among developers. So how should we be using <code>address</code> in our documents?</p>
<h2>The right way</h2>
<p>Let&#8217;s take a quick look at the spec:</p>
<blockquote>
<p>The address element provides contact information for a document or part of a document. Information provided by address may include the names of the document’s maintainers, links to the maintainers’ Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on. The address element is not appropriate for all postal and e-mail addresses; it should be reserved for providing such information about the contact people for the document.</p>
</blockquote>
<p>If we follow the above advice, we could do something like this:</p>
<p><code></p>
<pre>
The HTML5 Doctor is run by the following group of volunteers:
<mark>&#60;address&#62;</mark>
&#60;a href="http://html5doctor.com/author/jacko"&#62;Jack Osborne&#60;/a&#62;,
&#60;a href="http://html5doctor.com/author/richc"&#62;Rich Clark&#60;/a&#62;,
&#60;a href="http://html5doctor.com/author/miker"&#62;Mike Robinson&#60;/a&#62;,
&#60;a href="http://html5doctor.com/author/toml"&#62;Tom Leadbetter&#60;/a&#62;,
&#60;a href="http://html5doctor.com/author/brucel"&#62;Bruce Lawson&#60;/a&#62;,
&#60;a href="http://html5doctor.com/author/remys"&#62;Remy Sharp&#60;/a&#62;
<mark>&#60;/address&#62;</mark>
</pre>
<p></code></p>
<p>Here&#8217;s another example that we&#8217;ve implemented on this very site:</p>
<p><code>
<pre>
&#60;footer&#62;
&#60;div class="vcard"&#62; by
<mark>&#60;address class="author"&#62;</mark>
&#60;em class="fn"&#62;&#60;a title="Posts by Jack Osborne" href="#"&#62;Jack Osborne&#60;/a&#62;&#60;/em&#62;
<mark>&#60;/address&#62;</mark> on
&#60;time datetime="2009-11-04" class="published updated"&#62;November 4th, 2009&#60;/time&#62;
&#60;/div&#62;
&#60;/footer&#62;
</pre>
<p></code></p>
<p>If you view the source code on our <a href="http://html5doctor.com" title="HTML5 Doctor Home">home page</a>, you&#8217;ll see that we&#8217;ve used the <code>address</code> element &#8212; nested within the <code>footer</code> of the articles &#8212; several times throughout the page. This is useful should the information be aggregated.</p>
<h2>The wrong way</h2>
<p>The most common misconception about the <code>address</code> element is that it should be used to mark up any old address. Take a look at the following example:</p>
<p><code></p>
<pre>&#60;!-- This is bad! --&#62;
<mark>&#60;address&#62;</mark>
Dr. Jack Osborne
HTML5 Hospital,
Doctorville,
Great Britain
Tel: +44 (0)XXXX XXXXXX
<mark>&#60;/address&#62;</mark>
</pre>
<p></code></p>
<p>Wondering what&#8217;s wrong with this code? Very simply, the <code>address</code> element was <strong>not</strong> created for postal addresses. To reinforce this, the latest spec stipulates that the <code>address</code> element <strong>must not</strong> be used to represent arbitrary addresses (e.g., postal addresses), unless those addresses are in fact the relevant contact information for a document or section of a document.</p>
<h2>Marking up arbitrary addresses</h2>
<p>So what should we do with addresses that aren&#8217;t directly related to the document? One solution is to use the <code>p</code> element in combination with the <a href="http://microformats.org/wiki/hcard" title="hCard Microformat">hCard microformat</a>.</p>
<p>Let&#8217;s rewrite that last example using hCard:</p>
<p><code>
<pre>&#60;div class="vcard"&#62;
&#60;p class="fn"&#62;&#60;a class="url" href="#"&#62;Dr. Jack Osborne&#60;/a&#62;&#60;p&#62;
&#60;p class="adr"&#62;
&#60;span class="street-address"&#62;HTML5 Hospital&#60;/span&#62;
&#60;span class="region"&#62;Doctorville&#60;/span&#62;
&#60;span class="postal-code"&#62;Postal Code&#60;/span&#62;
&#60;span class="country-name"&#62;Great Britain&#60;/span&#62;
&#60;/p&#62;
&#60;p class="tel"&#62;+44 (0)XXXX XXXXXX&#60;/p&#62;
&#60;/div&#62;</pre>
<p></code></p>
<p>Unfortunately, an in-depth discussion of hCard is beyond the scope of this article. I&#8217;ve included it here to reinforce that you are <strong>not</strong> supposed to use the <code>address</code> element for arbitrary postal addresses, but rather for providing contact information for a whole document or section of a document. If you want to maximise the semantic value of that information, you can do so with the addition of a couple of simple classes.</p>
<p>If you don&#8217;t feel comfortable implementing microformats on your own, visit the <a href="http://microformats.org/code/hcard/creator" title="hCard Microformat generator">hCard generator</a>, which will do all of the heavy lifting for you.</p>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<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/speaking/" rel="bookmark" class="crp_title">HTML5 Doctor Speaking and Training Appearances</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-7/" rel="bookmark" class="crp_title">Your Questions Answered #7</a></li>
<li><a href="http://html5doctor.com/designing-a-blog-with-html5/" rel="bookmark" class="crp_title">Designing a blog with html5</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=The%20Address%20Element%20-%20http%3A%2F%2Fhtml5doctor.com%2Fthe-address-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-address-element%2F&amp;title=The%20Address%20Element&amp;bodytext=The%20address%20element%20has%20been%20around%20since%20the%20HTML3%20spec%20was%20drafted%20in%201995%2C%20and%20it%20continues%20to%20survive%20in%20the%20latest%20drafts%20of%20HTML5.%20But%20nearly%20fifteen%20years%20after%20its%20creation%2C%20it%27s%20still%20causing%20confusion%20among%20developers.%20So%20how%20should%20we%20be%20using%20address%20in%20our%20documents%3F" 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-address-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-address-element%2F&amp;title=The%20Address%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-address-element%2F&amp;title=The%20Address%20Element&amp;notes=The%20address%20element%20has%20been%20around%20since%20the%20HTML3%20spec%20was%20drafted%20in%201995%2C%20and%20it%20continues%20to%20survive%20in%20the%20latest%20drafts%20of%20HTML5.%20But%20nearly%20fifteen%20years%20after%20its%20creation%2C%20it%27s%20still%20causing%20confusion%20among%20developers.%20So%20how%20should%20we%20be%20using%20address%20in%20our%20documents%3F" 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-address-element%2F&amp;title=The%20Address%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-address-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%20Address%20Element&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fthe-address-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-address-element%2F&amp;t=The%20Address%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-address-element%2F&amp;title=The%20Address%20Element&amp;annotation=The%20address%20element%20has%20been%20around%20since%20the%20HTML3%20spec%20was%20drafted%20in%201995%2C%20and%20it%20continues%20to%20survive%20in%20the%20latest%20drafts%20of%20HTML5.%20But%20nearly%20fifteen%20years%20after%20its%20creation%2C%20it%27s%20still%20causing%20confusion%20among%20developers.%20So%20how%20should%20we%20be%20using%20address%20in%20our%20documents%3F" 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%20Address%20Element&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fthe-address-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-address-element%2F&amp;t=The%20Address%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-address-element%2F&amp;title=The%20Address%20Element&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=The%20address%20element%20has%20been%20around%20since%20the%20HTML3%20spec%20was%20drafted%20in%201995%2C%20and%20it%20continues%20to%20survive%20in%20the%20latest%20drafts%20of%20HTML5.%20But%20nearly%20fifteen%20years%20after%20its%20creation%2C%20it%27s%20still%20causing%20confusion%20among%20developers.%20So%20how%20should%20we%20be%20using%20address%20in%20our%20documents%3F" 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-address-element%2F&amp;h=The%20Address%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-address-element%2F&amp;t=The%20Address%20Element&amp;s=The%20address%20element%20has%20been%20around%20since%20the%20HTML3%20spec%20was%20drafted%20in%201995%2C%20and%20it%20continues%20to%20survive%20in%20the%20latest%20drafts%20of%20HTML5.%20But%20nearly%20fifteen%20years%20after%20its%20creation%2C%20it%27s%20still%20causing%20confusion%20among%20developers.%20So%20how%20should%20we%20be%20using%20address%20in%20our%20documents%3F" 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-address-element/" rel="bookmark">The Address Element</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on November 3, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/the-address-element/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>
