The <footer> Element
What you'll learn: How to use the <footer> element to mark the closing content of your webpage or sections.
What is a Footer?
Just like a book has a back cover with publishing information, copyright notices, and author contact details, a webpage needs a place for similar "closing" content. The <footer> element is HTML's semantic way to mark this area.
The <footer> typically appears at the bottom of a page or section and contains information like:
- Copyright notices ("© 2024 My Company")
- Contact information (email, phone, address)
- Links to privacy policies or terms of service
- Social media links
- Navigation links (often repeated from the header)
- Author information for articles
Why Use <footer> Instead of Just <div>?
Like the other semantic elements you've learned (<header>, <nav>, <main>), <footer> tells browsers, search engines, and assistive technologies exactly what this content represents. A screen reader can announce "footer landmark," helping users quickly navigate to or skip past this section.
Where Can You Use It?
The <footer> is flexible—you can use it:
- At the document level: one main footer for the entire page
- Within sections or articles: each
<article>or<section>can have its own footer with metadata specific to that content (like an author's bio at the end of a blog post)
Think of It This Way
If <header> is the introduction or title page, <footer> is the "about the author" and copyright page at the back. It wraps up and provides context about what came before.
Key Takeaway: The <footer> element semantically marks closing content like copyright, contact info, and related links at either the document or section level, making your page structure clear and accessible.