The address tag in HTML is used to set contact information/ address of the document. For example, if you want to set the address of the company on the company’s website, then you can set it under the <address> tag.
Let us now see an example to implement the address tag in HTML−
Example
<!DOCTYPE html> <html> <body> <h2>Coding Ground</h2> <h3>Compilers for Programming Languages and Web Technologies</h3> <nav> <a href="/compile_java_online.php">Java</a> | <a href="/php_terminal_online.php">PHP</a> | <a href="/online_jquery_editor.php">jQuery</a> | <a href="/compile_c_online.php">C</a> | <a href="/compile_cpp_online.php">C++</a> | <a href="/online_angularjs_editor.php">AngularJS</a> </nav> <p>We also have a compiler for <acronym title="JavaScript">JS</acronym> libraries.</p> <address> Contact us at <a href="mailto:[email protected]">admin</a>.<br> 4th Floor,<br> Incor9 Building, <br> Kavuri Hills, <br> Madhapur, Hyderabad,<br> Telangana 500081 </address> </body> </html>
Output
In the above example, we have set the address of a company using the <address> element−
<address> Contact us at <a href="mailto:[email protected]">admin</a>.<br> 4th Floor,<br> Incor9 Building, <br> Kavuri Hills, <br> Madhapur, Hyderabad,<br> Telangana 500081 </address>
Within that, we have also set the email-is using the mailto −
<a href="mailto:[email protected]">admin</a>