Open In App

HTML <address> Tag

The HTML <address> tag defines contact information for the author or owner of a webpage. it can contain various contact details such as an email address, URL, physical address, mobile number, social media, etc. The text inside the <address> tag will be displayed in italic format. Some browsers add a line break before and after the address element.

Note: The <address> tag also supports the Global Attributes and Event Attributes in HTML.



HTML address Tag syntax: 

<address> Address... </address>

HTML address Tag Usage :

HTML address Tag Example:

Here, we will see the implementation of the address tag with an example.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" 
          content="width=device-width, 
                   initial-scale=1.0">
    <title>HTML <address> tag</title>
</head>
  
<body>
    <!-- address tag starts from here -->
    <address>
        Organization Name: GeeksforGeeks <br>
        Web Site:
        <a href=
            GeeksforGeeks
        </a>
        <br>
        visit us:
        <br>
        GeeksforGeeks
        <br>
        710-B, Advant Navis Business Park, 
        <br>
        Sector-142, Noida Uttar Pradesh – 201305
    </address>
    <!-- address tag ends here -->
</body>
  
</html>

Output: 



HTML address Tag Example Explanation:

Here is the implementation explanation of the above example.

HTML address Tag Example:

Here The <address> tag employs global attributes like id and class, along with the event handler onclick to trigger an alert.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" 
          content="width=device-width, 
                   initial-scale=1.0">
    <title>HTML <address> tag</title>
</head>
  
<body>
    <!-- address tag starts from here -->
    <address id="organizationInfo" 
             class="organization" 
             onclick="showDetails()">
        Organization Name: GeeksforGeeks <br>
        Web Site:
        <a href=
            GeeksforGeeks
        </a><br>
        visit us:<br>
        GeeksforGeeks<br>
        710-B, Advant Navis Business Park,<br>
        Sector-142, Noida Uttar Pradesh – 201305
    </address>
  
    <script>
        function showDetails() {
            alert("Contact details clicked!");
        }
    </script>
</body>
  
</html>

Output:

HTML address Tag Example Explanation:

Here is the implementation explanation of the above example.

HTML address Tag Use Cases:

1. How to write address in an HTML document ?

To write an address in an HTML document, enclose it within the <address> element, typically used for contact information or citations.

2. How to markup postal address in HTML ?

To markup a postal address in HTML, enclose it within the <address> element, and use appropriate tags like <p>, <span>, and <br>.

HTML address Tag Supported Browsers:

The browser supported by HTML address tag are listed below:


Article Tags :