QA
Beginner LevelHTML & Semantic Web

What is the correct semantic use case for the <address> element?

❓ Interview Prompt: Explain <address> semantic usage for document or article contact information vs physical locations.

The '<address>' HTML element provides contact information for its nearest '<article>' or '<body>' ancestor.

Valid Use Cases:

•
Email addresses, physical mailing addresses, phone numbers, or social media handles for the author/owner of the document or article.

Misuse:

Do NOT use '<address>' for arbitrary physical addresses mentioned in text (e.g. hotel addresses in a travel blog) unless it represents contact info for the article author!

Code Implementation Example

html
<article>
  <h2>Written by Jane Doe</h2>
  <address>
    Contact the author at <a href="mailto:jane@example.com">jane@example.com</a><br>
    Twitter: <a href="https://twitter.com/janedoe">@janedoe</a>
  </address>
</article>
💡Semantic use of address element for article author contact details.
🎯 Interview Key Takeaway

Use <address> specifically for contact information relating to the document or article author.

#address#Semantics#Contact Info#Beginner
Back to all HTML & Semantic Web Questions→

More HTML & Semantic Web Interview Questions

Beginner LevelHTML & Semantic Web

What is Semantic HTML and why is it essential for modern web applications?

Beginner LevelHTML & Semantic Web

What is <!DOCTYPE html> and what happens if it is omitted?

Beginner LevelHTML & Semantic Web

What is the difference between inline and block-level HTML elements?