Back to HTML Notes
Topic #190

The address Element

Learn how to use the <address> element to semantically mark up contact information for the nearest ancestor <article> or <body>, ensuring accessibility and SEO clarity.

What it is

The <address> element represents contact information for its nearest ancestor <article> or <body> element. It is strictly semantic: it does not define a visual style by default, nor should it be used for arbitrary postal addresses (like a shipping address in a form). Instead, it identifies who created or owns the content. Common related terms include "author info," "publisher details," and "semantic HTML."

Why it matters

  • Accessibility: Screen readers announce this region as containing contact information, helping users with disabilities navigate quickly.
  • SEO: Search engines can better understand the authorship and ownership of content, potentially influencing rich snippets.
  • Semantic Clarity: It separates structural meaning from presentation, making code easier to maintain and understand.
  • Standardization: Provides a consistent way to link to social profiles, email, or physical locations relevant to the site owner.

Syntax or steps

Wrap your contact links or text inside an opening <address> tag and a closing </address> tag. Place this element either at the end of an <article> (for article-specific authors) or near the bottom of the <body> (for site-wide publisher info). You may include <a> tags with mailto:, tel:, or external URLs.

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Blog Post</title>
</head>
<body>
    <article>
        <h1>Understanding Semantic HTML</h1>
        <p>This post explains why structure matters...</p>
        
        <!-- Author Contact Info -->
        <address>
            Written by <a href="https://example.com/jane-doe">Jane Doe</a>.
            Contact us at <a href="mailto:jane@example.com">jane@example.com</a>.
        </address>
    </article>
</body>
</html>

In this example, the <address> element is nested within the <article>. This tells browsers that Jane Doe is the specific author of this article. The links provide direct methods of contact. Note that no CSS was required to make it functional; the semantics are inherent.

Common mistakes

  • Using it for any address: Do not wrap a user's home address in a checkout form with <address>. That is data, not authorship metadata.
  • Nesting interactive elements incorrectly: While you can nest <a> tags, avoid nesting other complex interactive widgets unless necessary. Keep it simple.
  • Forgetting scope: If placed outside an <article>, it refers to the whole document. Ensure placement matches the intended scope (site vs. page).
  • Assuming styling: Browsers often italicize <address> by default. Always reset styles if you do not want italics.

When to use it

Compare <address> with generic containers like <div> or <footer>.

ElementUse CaseScope
<address>Contact info for author/publisherNearest <article> or <body>
<div>Generic layout containerNo semantic meaning
<footer>Closing section of a document/sectionMay contain <address>

Use <address> when the content is specifically about *who* to contact regarding the content. Use <footer> for broader closing information (copyright, sitemap links), which may optionally contain an <address>.

Practice

Guided Exercise: Create a simple HTML page with a blog post. Add an <address> block at the end of the article containing a link to your LinkedIn profile and an email address.

Challenge: Modify the previous exercise so that the <address> element is inside a <footer> element instead of directly in the <article>. Does the semantic meaning change? (Hint: No, but the structural grouping does.)

Quick check

Question: Can I use the <address> element to display a customer's billing address on an invoice?

Answer: No. The <address> element is reserved for contact information of the author or publisher of the content, not for arbitrary postal addresses within the document's data.

Summary

The <address> element provides critical semantic context for authorship and contact details, enhancing both accessibility and search engine understanding. Remember to scope it correctly to the relevant article or document body, and avoid using it for general location data.

Want to go beyond the notes?

Join Coding Now Tech Institute's HTML course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

The address Element – FAQs

Quick answers about learning The address Element in HTML.

This free note from Coding Now Tech Institute explains The address Element in HTML — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every HTML topic on Coding Now Tech Institute, including The address Element, is 100% free with no signup required.
With focused practice, most students grasp The address Element in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now