The <address> tag in HTML is used to define contact information for the author or owner of a document or an article. It is typically used for information such as an address, email, or phone number.
- The <address> element is a block-level element by default.
- The content inside <address> is usually displayed in italics and may have a line break after it.
- It should not be used for generic addresses (like physical locations), but only for authorial contact information.
Note: The <address> tag also supports the Global Attributes and Event Attributes in HTML.
- The <address> tag contains the contact information for GeeksforGeeks.
Examples of HTML address Tag
- The <address> tag contains the contact information for GeeksforGeeks, including the organization name, website link, and physical address.
- Line breaks (<br>) are used to format the address for better readability.
Styling the <address> Tag
- The CSS within the <style> tag customizes the appearance of the <address> element.
- The font-style: normal; rule removes the default italic styling applied by browsers.
Best Practices for Using the <address> Tag
- Use <address> to enclose contact details of the document's author or owner.
- Avoid using <address> for unrelated contact information.
- Place <address> within relevant sections, like <footer>, to associate contact info appropriately.