HTML <address> Tag

The <address> tag in HTML is used to provide contact information for the author or owner of a document or article. It's a semantic tag, meaning it adds meaning to the content, and is not just for visual styling. The content within the <address> tag typically includes things like physical addresses, email addresses, phone numbers, or social media links.

HTML Address Tag: Defining Contact Information

Syntax

<address>
  Contact information here
</address>

Attributes

The <address> tag does not support any specific attributes. It primarily relies on the content enclosed within to define contact information.

Attribute Value Description
None This tag does not support any specific attributes

Example

<address>
  Written by John Doe.<br>
  Visit us at:<br>
  123 Main Street<br>
  Anytown, USA
</address>

More Examples

Basic Usage with Email and Phone

<address>
    Contact us at <a href="mailto:[email protected]">[email protected]</a><br>
    Or call us at <a href="tel:+15551234567">555-123-4567</a>
</address>

Address in Article

<article>
  <h1>My Blog Post</h1>
  <p>This is the content of my blog post.</p>
  <address>
    Article by <a href="https://johndoe.com">John Doe</a><br>
    Published on <time datetime="2024-02-29">February 29, 2024</time>
  </address>
</article>

Multiple Contact Methods

<address>
  Our office is located at:<br>
  456 Oak Avenue, Suite 200<br>
  Cityville, State<br><br>
  Email: <a href="mailto:[email protected]">[email protected]</a><br>
  Phone: <a href="tel:+18005550000">1-800-555-0000</a><br>
  Follow us on <a href="https://twitter.com/example">Twitter</a>
</address>
<footer>
    <p>&copy; 2024 Example Company</p>
    <address>
        Contact Us:<br>
        <a href="mailto:[email protected]">[email protected]</a>
    </address>
</footer>

Browser Support

The <address> tag is supported by all modern browsers, including:

  • Chrome
  • Edge
  • Firefox
  • Safari
  • Opera

Notes and Tips

  • The <address> tag is primarily intended for contact information. It should not be used for generic addresses or postal addresses that are not related to the author or owner of the content.
  • It is best practice to include the address information inside a <footer> or <article> tag for better semantic meaning.
  • The content of the <address> tag is commonly rendered in italics by default browsers' stylesheet. However, you should not rely on this default styling and are encouraged to use CSS for consistent styling.
  • You can combine the address tag with other tags like <a>, <br>, and <time> to provide a comprehensive contact information.
  • Use <br> tags judiciously to maintain readability within the address tag.
  • Using the <address> tag correctly can improve accessibility and SEO, helping search engines understand the structure and content of your webpage.
  • It is a good practice to use mailto: for email addresses, and tel: for phone numbers to make them directly clickable.