Use-Cases of this Tutorial
- Know how to include address information for HTML pages in a machine-readable way.
- Know about the HTML <address> element.
The HTML <address> element represents address information for the webpage. It can be read by machines and scripts for understanding that the included content is an address of some sort.
The <address> tag is the semantic way of including address in a webpage. The address can indicate anything that is suitable for the given situation — it may be a physical address, URL, email, phone number, social media handles etc.
<address>House #A23, SLH Layout, Bangalore 560105</address>
<address>Contact us at email@example.com</address>
<address> <a href="https://facebook.com/usefulangle">UsefulAngle on Facebook</a> <a href="https://twitter.com/usefulangle">UsefulAngle on Twitter</a> </address>
The content within the <address> tag can be read by machines, scripts, web-crawlers and bots for their machine learning purposes.
For example the website of a certain company X can include its address within a <address> tag. This may help the web-crawler of a search engine to know that this is the address of company X. Next time when a user searches for the address of company X, the search engine may directly show this result to the user.
- The page <header> and <footer> section are good places to insert an <address> element.
- An <address> element inside an <article> represents the contact information for the author of the article.