Which structure tag should a developer use to place contact information on a web page?
The <footer> tag is used to define a footer for a document or a section. A footer typically contains information about the author of the document, contact information, copyright details, and links to terms of use, privacy policy, etc. It is a semantic element in HTML5, which means it clearly describes its meaning to both the browser and the developer.
Purpose of <footer>: The <footer> element represents a footer for its nearest sectioning content or sectioning root element. It typically contains information like:
Contact information
Copyright information
Links to related documents
Information about the author
Usage Example:
<footer>
Contact us at: contact@example.com
© 2024 Example Company
</footer>
In this example, the <footer> tag encloses contact information and copyright details.
Semantic Importance: Using semantic elements like <footer> enhances the accessibility of the document and provides better context for search engines and other user devices.
MDN Web Docs on <footer>
W3C HTML5 Specification on <footer>
