0
0
HtmlConceptBeginner · 3 min read

What is the footer tag in HTML? Simple Explanation and Example

The <footer> tag in HTML defines the footer section of a webpage or a section. It usually contains information like copyright, contact links, or navigation related to the page's end.
⚙️

How It Works

The <footer> tag acts like the bottom part of a book or a letter. Just like a letter has a closing section with your name and date, a webpage uses the footer to show information that belongs at the end.

It helps browsers and people understand that the content inside the footer is separate from the main content. This makes the page easier to read and organize, especially for screen readers or search engines.

💻

Example

This example shows a simple webpage with a footer containing copyright and contact info.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Footer Example</title>
</head>
<body>
  <main>
    <h1>Welcome to My Website</h1>
    <p>This is the main content of the page.</p>
  </main>
  <footer>
    <p>&copy; 2024 My Website. All rights reserved.</p>
    <p>Contact us at <a href="mailto:info@mywebsite.com">info@mywebsite.com</a></p>
  </footer>
</body>
</html>
Output
Page with a heading and paragraph, followed by a footer showing '© 2024 My Website. All rights reserved.' and a contact email link.
🎯

When to Use

Use the <footer> tag whenever you want to add information at the bottom of a webpage or a section. Common uses include:

  • Copyright notices
  • Contact details
  • Links to privacy policies or terms
  • Navigation links related to the page end

This helps keep your page organized and improves accessibility and SEO.

Key Points

  • The <footer> tag defines the footer area of a page or section.
  • It usually contains info like copyright, contacts, or legal links.
  • Helps organize content and improves accessibility.
  • Can be used multiple times on a page for different sections.

Key Takeaways

The
tag marks the bottom part of a webpage or section.
It holds information like copyright, contact info, and legal links.
Using
improves page structure and accessibility.
You can use multiple footers for different parts of a page.