laura_hensley
laura_hensley Aug 3, 2026 • 10 views

Sample code for HTML5 footer tag

Hey there! 👋 Ever wondered about those footer sections at the bottom of websites? They're super important for navigation and giving your site a polished look. Let's explore how to use the `
` tag in HTML5 with some easy examples! ✨
💻 Computer Science & Technology
🪄

🚀 Can't Find Your Exact Topic?

Let our AI Worksheet Generator create custom study notes, online quizzes, and printable PDFs in seconds. 100% Free!

✨ Generate Custom Content

1 Answers

✅ Best Answer
User Avatar
rodney707 Dec 29, 2025

📚 Understanding the HTML5 Footer Tag

The <footer> tag in HTML5 defines a footer for a document or section. A footer typically contains information about the author of the document, copyright data, links to terms of use, contact information, sitemap, navigation links, and more. It's generally placed at the bottom of a document or section, enhancing user experience and providing important supplementary information.

📜 History and Background

Before HTML5, developers often used <div> tags with specific IDs or classes (like <div id="footer">) to mark up footer content. HTML5 introduced the semantic <footer> element to provide a more meaningful way to structure content, improving both accessibility and SEO.

🔑 Key Principles of Using <footer>

  • 🌏 Semantic Meaning: Use the <footer> tag to semantically define the footer of a document or section. This helps search engines and assistive technologies understand the structure of your page.
  • 🧭 Placement: Generally place the <footer> at the bottom of your document or within a section of your document.
  • 📝 Content: Include relevant information such as copyright notices, contact information, links to privacy policies, and related documents.
  • 🎨 Styling: Use CSS to style your footer to match your website's overall design.
  • 📱 Responsiveness: Ensure your footer is responsive and displays correctly on different screen sizes.

💻 Real-world Examples

Here are a few examples of how to use the <footer> tag in HTML5:

Simple Footer Example

This example demonstrates a basic footer with a copyright notice.

<footer>
  <p>&copy; 2024 eokultv</p>
</footer>

Footer with Navigation and Contact Info

This example shows a more complex footer with navigation links and contact information.

<footer>
  <nav>
    <ul>
      <li><a href="/about">About Us</a></li>
      <li><a href="/privacy">Privacy Policy</a></li>
      <li><a href="/terms">Terms of Use</a></li>
    </ul>
  </nav>
  <p>Contact: <a href="mailto:[email protected]">[email protected]</a></p>
  <p>&copy; 2024 eokultv</p>
</footer>

Footer within a Section

The <footer> tag can also be used within a section of a document.

<article>
  <h2>Article Title</h2>
  <p>Article content goes here...</p>
  <footer>
    <p>Written by John Doe on January 1, 2024</p>
  </footer>
</article>

💡 Best Practices

  • 🎨 CSS Styling: Use CSS to make your footer visually appealing and consistent with your site's design.
  • 🔗 Internal Links: Include important internal links in your footer to enhance navigation.
  • 📧 Contact Information: Provide clear contact information to help users reach you.
  • ⚖️ Legal Pages: Include links to legal pages like privacy policy and terms of service.
  • 📱 Responsiveness: Ensure your footer is responsive across different devices.

Conclusion

The <footer> tag is an essential part of structuring your HTML documents. By using it correctly, you enhance the semantic meaning of your content, improve accessibility, and provide valuable information to your users. Experiment with different designs and content to create footers that effectively serve your website's needs.

Join the discussion

Please log in to post your answer.

Log In

Earn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀