Home > Article > Web Front-end > HTML Address Tag
The
tag is used to get contact details regarding the site owner or the article author. It may include address, telephone, email, website connection, and many more. The tag is helpful for different contexts, including business contact information in the page header, or contact information relevant to the author, etc. Traditionally, browsers make as italicized text contained in the tag. This tag is also usually referred to as the element of < address>. Usually, the < address > element will be included in a < footer > element along with other details. In no other way should it be used to identify addresses? In this topic, we are going to learn about HTML Address Tag.Syntax
The syntax of the
tag will be written as shown below:<html> <body> <address> Contact Information:<br> www.mycompany.com<br> #12345, Main Street<br> Name of City, Name of State </address> </body> </html>
Here are the following attributes mention below
Global Attributes will be used to pertain to attributes that are used on any HTML element. Such attributes are prevalent across all HTML elements.
An event occurs whenever a browser responds to the intervention of a specific user. When a user clicks on a mouse, uploads a document or a picture, plays a video or performs any other activity on a webpage.
Window event attributes are used when window objects are initiated.
An event that can take place within a form is considered an event in the process. The form events occur when a user opens or closes a form, switches between forms, or operates on a form with data.
Here are the following examples mention below
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> Contact Address:<br> mycompany.com<br> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </address> </footer> </body> </html>
Output:
Code:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> <style> .color_prop { color: #1c87c9; } </style> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> <p class="color_prop">Contact Address:</p> mycompany.com<br> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </address> </footer> </body> </html>
Output:
Run the above file in a browser, and you would get the output as shown in the below image:
Code:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> <style> .color_prop { background-color: #1c87c9; } </style> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> <div class="color_prop">Contact Address:<br> mycompany.com<br> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </div> </address> </footer> </body> </html>
Output:
Run the above file in a browser, and you would get the output as shown in the below image:
Code:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> <style> .style1 { text-decoration: underline; } .style2 { text-decoration: italic; } </style> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> <p class="style1">Contact Address:</p> <p class="style2">mycompany.com</p> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </div> </address> </footer> </body> </html>
Output:
Run the above file in a browser, and you would get the output as shown in the below image:
Code:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> <style> .style1 { font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; } .style2 { font-weight: bolder; } </style> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> <p class="style1">Contact Address:</p> <p class="style2">mycompany.com</p> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </div> </address> </footer> </body> </html>
Output:
Run the above file in a browser, and you would get the output as shown in the below image:
Code:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> <style> .style1 { text-shadow: 2px 2px #1c87c9; } </style> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> <p class="style1">Contact Address:</p> mycompany.com<br> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </div> </address> </footer> </body> </html>
Output:
Run the above file in a browser, and you would get the output as shown in the below image:
Code:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> HTML Address Tag </title> <style> .color_prop { line-height: 2.0; } </style> </head> <body> <article> <h2>This is Heading Title</h2> <p>Information about article will be written here...</p> </article> <footer> <address> <div class="color_prop">Contact Address:<br> mycompany.com<br> #987 5th Main, 10th Cross<br> XYZ road<br> New Delhi, India </div> </address> </footer> </body> </html>
Output:
Run the above file in a browser, and you would get the output as shown in the below image:
So far, we have studied how to address tag will be used when an owner wants to specify the address information. In order to quickly contact the author via email, this feature is often combined with the HTML mailto property. The address tag will usually be included in the section < footer> section.
The above is the detailed content of HTML Address Tag. For more information, please follow other related articles on the PHP Chinese website!