<address> Tag Examples
Examples of the address
tag in HTML 5
<address> tag with a hypertext link
<address> <a href="/users/John.Doe/">View John Doe's profile</a> </address>
<address> tag with a mailto:
link
<body> <p>By <address> <a href="mailto:John.Doe@ExampleOnly.com">John Doe (contact the author)</a> </address></p> ... </body> <article> <h2>April Fools!<h2> <p>Published: Friday, April 1, 2011<br/> By: <address> <a href="mailto:John Doe <John.Doe@ExampleOnly.com>">John Doe (contact the author)</a> </address> </p> <p>Today's blog entry is an April Fool's Day joke....</p> </article>
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"
in an attribute value, and the e-mail address enclosed in angle brackets (<...>
), which must be encoded with the HTML character entities<
and>
.