🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

<address>

AI & DATA SCIENCE // address-tag

The <address> element provides contact information for the nearest article or document ancestor — an author, organization, or page owner — not a generic postal address.

Syntax

<address>
  Written by <a href="mailto:jane@example.com">Jane Doe</a>
</address>

Deep Dive Course

**`<address>`** is a narrowly-scoped semantic element: it means 'contact information for whoever authored this content', which could be an email, a link to a contact page, a social media handle, or a physical mailing address — but only when it's meant as contact info for the author/owner. It's commonly placed inside a `<footer>` of an `<article>` or the whole page. It should NOT be used for arbitrary postal addresses unrelated to authorship, like a shipping address in a checkout form.

1Understanding <address>

`<address>` is a narrowly-scoped semantic element: it means 'contact information for whoever authored this content', which could be an email, a link to a contact page, a social media handle, or a physical mailing address — but only when it's meant as contact info for the author/owner. It's commonly placed inside a <footer> of an <article> or the whole page. It should NOT be used for arbitrary postal addresses unrelated to authorship, like a shipping address in a checkout form.

💡

A common mistake is using <address> to wrap any physical mailing address on a page (e.g. a store locator) — that's not what it's for. Reserve it strictly for the author/owner's contact info.

editor.html
<article>
  <h1>My First Post</h1>
  <p>Article content...</p>
  <footer>
    <address>By <a href="mailto:jane@example.com">Jane Doe</a></address>
  </footer>
</article>
localhost:3000

2Practical Example

Here is a real-world application of <address> showing how it is used in production HTML.

editor.html
<!-- Site-wide contact info in the page footer -->
<footer>
  <address>
    Code Syllabus, contact us at <a href="mailto:hello@codesyllabus.com">hello@codesyllabus.com</a>
  </address>
</footer>
localhost:3000

3Best Practices

Follow these guidelines when working with <address>:

1. Use <address> only for contact info about the author/owner of the surrounding content

2. Place it inside <footer> of an <article> or the page for blog-post-style authorship info

3. Don't use <address> for unrelated postal addresses like shipping or store locations

⚠️

Tip: A common mistake is using <address> to wrap any physical mailing address on a page (e.g. a store locator) — that's not what it's for. Reserve it strictly for the author/owner's contact info.

editor.html
<article>
  <h1>My First Post</h1>
  <p>Article content...</p>
  <footer>
    <address>By <a href="mailto:jane@example.com">Jane Doe</a></address>
  </footer>
</article>
localhost:3000

Examples

Example 01Basic Usage
<article>
  <h1>My First Post</h1>
  <p>Article content...</p>
  <footer>
    <address>By <a href="mailto:jane@example.com">Jane Doe</a></address>
  </footer>
</article>
Example 02Advanced Example
<!-- Site-wide contact info in the page footer -->
<footer>
  <address>
    Code Syllabus, contact us at <a href="mailto:hello@codesyllabus.com">hello@codesyllabus.com</a>
  </address>
</footer>

Best Practices

  • Use
    only for contact info about the author/owner of the surrounding content
  • Place it inside
    of an
    or the page for blog-post-style authorship info
  • Don't use
    for unrelated postal addresses like shipping or store locations

Interview Question

Would it be correct to use <address> for a list of a company's store locations on a 'Find Us' page?

Hint: Think about what <address> is scoped to represent — authorship contact info, or any physical address.

No — <address> is specifically for contact information about the author or owner of the surrounding article/document, not generic physical addresses. A 'Find Us' page listing store locations isn't representing 'who wrote this content and how to reach them'; it's a list of business locations, which should just be marked up with semantic elements like <ul>/<li> or a <dl>, not <address>.

Exercises

EasyPractice using <address> in a real scenario.
View Solution
<article>
  <h1>My First Post</h1>
  <p>Article content...</p>
  <footer>
    <address>By <a href="mailto:jane@example.com">Jane Doe</a></address>
  </footer>
</article>

Frequently Asked Questions

Would it be correct to use <address> for a list of a company's store locations on a 'Find Us' page?

No —

is specifically for contact information about the author or owner of the surrounding article/document, not generic physical addresses. A 'Find Us' page listing store locations isn't representing 'who wrote this content and how to reach them'; it's a list of business locations, which should just be marked up with semantic elements like
    /
  • or a
    , not
    .

Related Functions

blockquote-tag