<footer>
The <footer> element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about the author, copyright data, links to related documents, or other metadata about the section it belongs to. Despite its name, a footer doesn't have to appear at the bottom of a page or section.
This page was last updated on 2025-11-17
Syntax
<footer>
<p>Copyright © 2024 Company Name</p>
</footer>
The element requires both opening and closing tags. A footer can contain any flow content, but it cannot contain another footer element or a header element. Multiple footer elements can exist in a single document, each belonging to different sectioning elements.
Attributes
- Global attributes - The <footer> element supports all global attributes such as
id,class,style,lang, anddir.
The <footer> element has no element-specific attributes.
Examples
Page Footer
<footer>
<p>© 2024 Your Company. All rights reserved.</p>
<nav>
<a href="/privacy">Privacy Policy</a> |
<a href="/terms">Terms of Service</a> |
<a href="/contact">Contact Us</a>
</nav>
</footer>
Article Footer
<article>
<h2>Article Title</h2>
<p>Article content...</p>
<footer>
<p>Written by <a href="/author/jane">Jane Doe</a></p>
<p>Published: <time datetime="2024-03-15">March 15, 2024</time></p>
<p>Tags: HTML, Semantics, Web Development</p>
</footer>
</article>
Section Footer with Contact Info
<section>
<h2>Our Services</h2>
<p>We offer a wide range of services...</p>
<footer>
<address>
Contact us at <a href="mailto:info@example.com">info@example.com</a>
</address>
</footer>
</section>
When to Use
Use the <footer> element when:
- Adding copyright information to a page or section
- Including author information at the end of an article
- Providing metadata like publication date, tags, or categories
- Adding links to related documents or terms of service
- Including contact information using the address element
- Adding social media links at the end of content
Do NOT use <footer> when:
- You need to add a header (use <header> instead)
- You want to nest footers inside each other (not allowed)
- The content is the main focus of the section (that belongs in the main content area)
Important: The footer element is not limited to page footers. An article, section, or any other sectioning element can have its own footer containing information specific to that section.