How to add an address element in HTML?

Front End TechnologyHTMLWeb Development

The address tag in HTML identifies a person's or an organization's contact details. The address tag has several meanings when used in different places in an HTML page, such as, when it is used within the <body> tag, it will display the document's contact information; and if it appears inside the <article> tag, it stands in for the article's contact details.

This tag will only take global attributes. These attributes belong to every element in the HTML document even though some elements won’t be affected with these.

Syntax

<address> Address... </address>

Note − The address tag must always contain only information related to address like, phone numbers, contact emails, URLs, headquarter locations, geographic coordinates, etc. Information like establishment date or publishing time will not be included in the address tag but they belong to the time tag.

Following are the examples…

Example

In the following example we are using <address> tag inside the body to display the document’s contact information.

<!DOCTYPE html> <html> <body> <address> Organization Name: Tutorialspoint <br> Web Site: <a href= "https://www.tutorialspoint.com/index.htm/">Tutorialspoint</a><br> visit us:<br> Tutorialspoint<br> kavuriincore-9,<br> kavuri phase2, Hyderabad,Telangana – 500033 </address> </body> </html>

On executing the above code, it will come up with an output consisting of the address which we have used in our code.

Example: (adding footer)

In the following example we are adding the footer element for the easiest way to specify the location of html address content.

<!DOCTYPE html> <html> <body> <h1>Welcome To Tutorialspoint</h1> <footer> <address> You can contact us at:<br> <a href="https://www.tutorialspoint.com/index.htm/"> Tutorialspoint</a><br> kavuriincore-9,kavuri phase2<br> Hyderabad,Telangana. </address> </footer> </body> </html>

On executing the code the footer which we have added in the code makes the use of and shows the address in an easy way.

raja
Updated on 02-Sep-2022 11:21:48

Advertisements