Skip to main content

HTML Tags

HTML <footer> Tag

Written by Updated HTML <footer> Tag exercises

The footer tag holds the closing content of a page or of a section: copyright, contact links, legal pages, "about the author". Despite the name, it is about the role, not the position, and a page can have several.

The page footer goes at the end of the <body>. An article can have its own <footer> too, for the author name, tags or share links. It is one of the semantic layout tags.

Syntax

html

<footer>
  <!-- Footer content like copyright, links, contact info -->
</footer>

It has no attributes of its own, only the global ones such as id, class, style and title.

Example

html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Footer Tag Example</title>
</head>
<body>
  <main>
    <h1>Welcome to My Website</h1>
    <p>This is an example of semantic footer usage.</p>
  </main>

  <footer style="background-color: #f0f0f0; padding: 15px; text-align: center;">
    <p>&copy; 2025 My Website. All rights reserved.</p>
    <nav>
      <a href="#">Privacy Policy</a> |
      <a href="#">Terms of Service</a>
    </nav>
  </footer>
</body>
</html>

A grey footer appears below the main content, with a copyright line and links to the privacy policy and terms. The links are wrapped in <nav> because they are a group of navigation links.

Page footer and article footer

Two footers, two jobs

html

<article>
  <h2>How to bake bread</h2>
  <p>...</p>
  <footer>Written by Asha, 3 March 2025</footer>
</article>

<footer>© 2025 My Kitchen · <a href="/privacy">Privacy</a></footer>

The first footer belongs to the article, the second to the whole page. Screen readers announce only the page-level footer as a "content info" landmark.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

Good to know

  • A footer cannot contain another <footer> or a <header>.
  • Contact details inside a footer can use the address tag.
  • Do not hide important links only in the footer; many people never scroll that far.

HTML <footer> Tag exercises

Add a page footer

Make a page footer with the paragraph © 2026 My Site

Result

Check your answer to see it here.