How to make a footer in HTML
Put the closing content of your page in a <footer> element, usually the last thing in <body>. Like <header>, it has no default look; CSS makes it a footer bar:
© prints the © symbol. <small> marks the copyright line as small print, which is its meaning in HTML, not just a smaller font. The link lists are real <ul> lists, so most screen readers announce how many links each column has.
Keep the footer at the bottom
On a page with little content, the footer sits right under that content, with empty space below it. The fix is a flex column: the container is at least as tall as the window, and the main area takes all the leftover height. The gray box below stands in for a browser window:
Remove flex: 1 from main and the footer jumps up under the paragraph. On a real page, put the same rules on <body> with min-height: 100vh (and margin: 0) instead of a fixed height, so the footer sits at the bottom of short pages and after the content on long ones.
Footers inside articles
A <footer> closes its nearest article or section, so a blog post or a comment can have its own, with the author, date or tags:
Screen readers treat only the page-level footer as the contentinfo landmark. A footer inside an article is an ordinary group, so it does not compete with the site footer.
Contact details with address
For contact information about the page or its owner, use <address> inside the footer. It is for contact details only (not for any postal address in your content), and browsers show it in italics by default:
The line break inside the address is one of the good uses of <br>. For more on email links, see the mailto page.
What can go in a footer
A footer can hold links, lists, forms (a newsletter sign up), images and a <nav>. It cannot contain a <header>, another <footer> or a <main>. A second menu in the footer can be a <nav> with a label that tells it apart from the main one:
<footer>
<nav aria-label="Footer">
<a href="/privacy">Privacy</a>
<a href="/terms">Terms</a>
</nav>
</footer>
Common mistakes
- Putting
<footer>outside<body>. Everything visible goes inside<body>, the footer included. - Using
position: fixedto keep it down. A fixed footer covers content on small screens and needs padding everywhere. Use the flex column pattern. - Using
<address>for any address. It is for the contact details of the page or article author. A shop address in a list of locations is a plain<p>. - Link columns built from
<br>tags. Use<ul>lists so the structure is announced. - Hardcoding last year. Update the copyright year in your template, or print it from your server or build step.
Frequently Asked Questions
What is the footer tag in HTML?
<footer> is a semantic element for the closing content of a page or section: copyright, contact details, related links or author information. It is a block box with no default styling.
What should go in a website footer?
Typical footers hold the copyright notice, links to legal pages such as privacy and terms, contact details, social links and a short site map. Keep the main navigation in <nav> near the top as well, since not every visitor scrolls to the end.
How do I keep the footer at the bottom of the page?
Make the body a flex column at least as tall as the window (display: flex; flex-direction: column; min-height: 100vh;) and give <main> flex: 1. The main area then grows to fill empty space and pushes the footer down on short pages.
How do I write the copyright symbol in HTML?
Use the entity ©, which shows ©. You can also type the character directly when the page uses <meta charset="utf-8">. Wrapping the line in <small> marks it as small print.
Can a page have more than one footer?
Yes. Each <article> or <section> can have its own footer for author details or tags. Only a footer that is not inside article, aside, main, nav or section is the page's contentinfo landmark for screen readers.