HTML Address Tag & Semantics
The <address> tag is a semantic HTML element used to mark up contact information for the author or owner of the nearest <article> or <body> element. It provides meaning to contact data, making it more accessible and SEO-friendly.
Semantic Meaning
Unlike generic containers like <div> or <span>, the <address> tag tells browsers, search engines, and screen readers that the content inside is specifically contact information. This semantic meaning improves accessibility and helps search engines understand your content structure.
Proper Usage
Use <address> only for contact information related to the content's author or the site's owner. It's not for any physical addressβonly contact details. You can nest other HTML elements inside, including <p>, <br>, and especially <a> tags with mailto: or tel: links.
Accessibility
Screen readers can identify contact information when it's wrapped in <address>, making it easier for users with disabilities to find and interact with contact details. Always include clickable links (mailto:, tel:) for better accessibility.
