HTML <address> Tag for Contact Info


ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.

If you find this helpful, please click the Google +1 Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.)

PDF mobile

The <address> Tag in HTML 5

The address tag is used for contact information for the current article, if it is coded inside an article element, or else the document as a whole if not.

The address can be a simple mailto: link:

   <a href="mailto:John Doe &lt;;">Contact the author</a>

Or, the address can be a hypertext link to a user profile with contact information:

   <a href="/users/John.Doe/">View John Doe's profile and contact info</a>

The <address> tag is only to be used for contact information. A postal mailing address should only be put inside an address element if the method for contacting the author(s) is via postal mail.

<address> Tag Syntax

Rules for coding HTML address elements
   ... flow content expected ...
      ... flow content ...
  1. Inside an element where flow content is allowed, code one or more optional address elements.
  2. Begin each address element with a starting <address> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include any HTML global attributes on the <address> tag as appropriate.
  4. End the address element with a matching </address> closing tag.
  5. Inside the address element, include any allowable flow content as appropriate.

<address> Content Model

Content of the <address> Tag

The content of the address element can include HTML comments, text content and any tags that can be used in flow content except for <header> tags, <hgroup> tags, <hn> heading tags, <footer> tags, <article> tags, <aside> tags, <nav> tags, <section> tags or other <address> tags, which are not permitted anywhere under the address element.

<address> Tag Attributes

Attributes of the <address> tag
global attributes The only attributes that can be coded on the <address> tag are the common HTML attributes.

<address> Tag Examples

Examples of the address tag in HTML 5
<address> tag with a hypertext link
   <a href="/users/John.Doe/">View John Doe's profile</a>
<address> tag with a mailto: link
   <p>By <address>
      <a href="">John Doe (contact the author)</a>

   <h2>April Fools!<h2>
   <p>Published: Friday, April 1, 2011<br/>
      By: <address>
         <a href="mailto:John Doe &lt;;">John Doe (contact the author)</a>
   <p>Today's blog entry is an April Fool's Day joke....</p>

The value of the <a href> attribute starts with the mailto scheme followed by a semicolon (:). The "To" address follows it and can be coded as:

  • the e-mail address
  • a display name, which may include special characters if enclosed in quotes ("), which must be encoded as &quot; in an attribute value, and the e-mail address enclosed in angle brackets (<...>), which must be encoded with the HTML character entities &lt; and &gt;.

Changes in HTML 5 - <address> Tag

What's new in HTML 5
Differences between HTML 5 and earlier versions of HTML

The 2000-2010 Recommendations from the W3C HTML Working Group defined the HTML namespace for the address element type name along with the names of all HTML element types. In older (pre-2000) versions of HTML, element type names were not associated with a namespace.

Valid HTML 5