What is the use of the ADDRESS element type in HTML?


HTML element is a section of an HTML document that tells the browser how to represent the information of that section. It contains necessary information like instructions, idea of the webpage and main content.

HTML element mainly consists of three parts −

  • Opening tag − An opening tag is an HTML element that begins a section of content. Opening tags tell browsers to start interpreting the content as part of a specific type of element, such as a heading or paragraph.

  • Closing tag − It marks the closing of the HTML element and tells the browser where it has to stop looking for content.

  • Content − This part contains the main information of the webpage and it lies between the opening and closing tag. Only this part of the HTML element will be visible to the user on the webpage.

Address Element

Address element in HTML is used to describe the contact information of the author or the owner of the HTML document. It contains the contact information like address, email address, phone number and social media handle etc.

  • It usually get placed at the top or bottom of the webpage. The content that we write in the address tag usually shows in the form of italic font in the browser, and by default web browser will add a line break before and after the address element.

  • An address element will do its job only if it is placed inside footer element. Earlier, we cannot use address element to show arbitrary address on our webpage but with the latest version we can now use it for arbitrary address also.

  • While address element has lot of advantages, it has few limitations also. It can only be used to store the contact information and you cannot add any extra information like publication date.

  • Also address element is flow content means we cannot have nested address element in HTML. At the same time address element does not allow the use of any other HTML element like article, aside, nav, heading inside it.

Example

<!DOCTYPE html>
<html>
<head>
   <title>Address Element</title>
</head>
<body>
   <header>
      <h1> Heading of Address Element</h1>
   </header>
   <main>
      <article> This is an example to demonstrate the use of address element in a HTML document </article>
   </main>
   <footer>
      <section>Copyright ©2022- ABCDEF.</section>
      <address>
         contact us :
         <a href="https://www.google.com" </a>
         308, C - Wing, Suyog Co.Housing Society Ltd
         T. P.S. Road & III Link Road
         Vazira, Borivali, East Mumbai, Maharashtra, 400092
      </address>
   </footer>
</body>
</html>

Why should we use Address Element

Whenever we specify the content in the address tag, it gets styled differently, that is somewhat similar to an italicized text. Then the question arise as why don’t we just use an italic formatting for addresses, if all it does is changing the style to italic. The answer to that is SEO.

What is SEO ?

SEO is an abbreviation for Search engine optimization. It helps in improving the website so that, whenever people search for that product or similar products, it ranks higher in the numerous results that will be displayed on the browser. This will reach the actual target audience, who will be able to see the website. It also helps in maintaining the traffic and natural search results.

Every tag in html has some form of meaning associated with it. For example, h1 tag specifies that it is a major heading and all the content within that is related to that topic. Other html tags which has special meaning are described below −

  • Article tag − that isolates the content from the rest of article

  • Section − separates group of content from other content on website

  • Aside − separates the content within it from the main content

  • Header − separates the top of the web page

  • Footer − can separate the bottom of the web page

  • Nav − it basically contains the navigation menu for the web page

Similarly an italicized formatting has completely different semantic meaning from the address tag. The address tag specifies the browser and the search engine that the content within that tag is some form of address through which we can reach out to the author or the person the article is related to.

But the italic text only mean that the author wants to emphasize that word, or group of words; but it need not to be an address. This is why the articles which use address tag are better optimized in SEO and rank higher in comparison with using italic or em tag to define address.

Example

Following is the example of displaying address using address element –

<!DOCTYPE html>
<html>
<head>
   <title>Address Element</title>
</head>
<body>
   <header>
      <h1> Heading of Address Element</h1>
   </header>
   <footer>
      <address>
         contact us :
         <a href="https://www.google.com" </a>
         20K, Dhakuria Station Road, Dhakuria
         PS: Jadavpur, Kolkata
         West Bengal, 700031
      </address>
   </footer>
</body>
</html>

Conclusion

To conclude, The ADDRESS element type in HTML is a useful for providing contact information and other related details, such as physical addresses. It can also be used to provide helpful context around the content of a web page or section. With its semantic meaning and various styling possibilities, it is an essential element for any website that requires contact information or contextual support.

Updated on: 27-Feb-2023

343 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements