Loading...
Loading...
00:00:00

<footer> Tag

The <footer> tag in HTML is used to define the footer for a document or a section of a document. It typically contains information such as the author of the document, copyright information, links to related documents, and other information that is considered less important than the main content of the document.

HTML5  footer tag

The <footer> tag in HTML5 has the same purpose as in previous versions of HTML: it is used to define a footer for a document or a section of a document.

In HTML5, the footer tag provides a semantic meaning to the content within it, making it easier for both humans and machines to understand the structure of the page. This semantic meaning can improve accessibility and make it easier for search engines to index the content.

Some common uses of the footer tag in HTML5 include:

  • Providing information about the author of the document or the section, such as the name, contact information, or a link to their website.

  • Displaying copyright information, such as the year and the owner of the copyright.

  • Providing links to related documents or information, such as a privacy policy or a sitemap.

  • Showing social media links, such as links to a Twitter or Facebook page.

  • Displaying legal information, such as terms and conditions or a disclaimer.

It is important to note that the footer tag should only be used within the body of a document and should not be used in the head or other sections of the document. Additionally, a document can have multiple footers if needed, each representing the footer for a different section.

Here's an example of how you might use the <footer> tag in HTML5:

<!DOCTYPE html>
<html>
  <head>
    <title>Example Page</title>
  </head>
  <body>
    <header>
      <h1>Example Page</h1>
    </header>

    <main>
      <p>Welcome to this example page.</p>
      <p>This is the main content of the page.</p>
    </main>
  <!-- footer section start -->
    <footer>
      <p>Copyright © 2023 by John Doe</p>
      <nav>
        <ul>
          <li><a href="#">Privacy Policy</a></li>
          <li><a href="#">Sitemap</a></li>
        </ul>
      </nav>
    </footer>
<!-- footer section  ends-->
  </body>
</html>

In this example, the footer contains the copyright information and links to the privacy policy and sitemap. By using the <footer> tag, we can easily style the content within it to visually distinguish it from the main content, and make it easier for both humans and machines to understand the structure of the page.