The <address> tag is used to define an address, but is not just limited to addresses. This tag can be used for signatures, emails, copyright messages etc. In most browsers the <address> tag is rendered italic, however this tag does not preserve the text so if you need a line break, use the <br> tag or <br /> for XHTML. Use this tag where you think applicable, here some examples where you would use this tag: Addresses, signatures, copyright messages, authorship/ownership, email addresses.
Where/how To Use The <address> Tag
| Use in head or body section? | body |
| Inline or Block level tag? | Block |
| HTML Tag Syntax? | <start tag>CONTENT</end tag> |
| XHTML Tag Syntax? | <start tag>CONTENT</end tag> |
Example Address
| Code | Output |
|---|---|
|
<address> Joe Blogs<br> 345 Pluto way<br> Shabaz Town<br> Pluto<br> </address> |
Joe Blogs 345 Pluto way Shabaz Town Pluto |
|
<address> © Copyright<br> HTML Tips<br> </address> |
© Copyright HTML Tips |
Notes
There are no differences between XHTML and HTML for the <address> tag
Common attributes for the address tag
class, style, id, title, dir, xml:lang, lang
Javascript Event attributes for the address tag
onmousedown, onmouseup, onclick, ondblclick, onmouseover, onmouseout, onmousemove, onkeydown, onkeyup, onkeypress

Comments