How to Make a Footer in HTML & CSS (Sticky & Responsive)

Quick answer

<body> <main>…page content…</main> <footer class="site-footer"> <p>&copy; 2026 My Site</p> <a href="/privacy-policy/">Privacy Policy</a> </footer> </body>

The <footer> element marks the closing section of a page. Placed directly inside <body> (not inside an article or section), it’s the footer for the whole site, and screen readers let users jump to it as the page’s “content information” region.

  1. After your main content, before </body>, add <footer> and </footer>.
  2. Put the footer content inside: at minimum a copyright line and links to your important pages.
  3. Use the same footer on every page of the site, so visitors always know where to find it.

A page can also have smaller footers inside <article> elements, for example for a blog post’s author and date. Those belong to the article, not the whole page.

Step 2: Decide what goes in the footer

Visitors scroll to the footer when they’re looking for something specific. Common, useful contents:

  • Copyright line: &copy; 2026 Your Name (the &copy; entity draws ©).
  • Legal links: Privacy Policy, Terms, Cookie settings. These are expected here, and ad networks such as AdSense look for them.
  • Contact details: email, phone or address, wrapped in <address>.
  • Key pages: a short list of the most important links, grouped under small headings.
  • Social links: icons linking to your profiles.
  • A newsletter sign-up, if you have one.

Step 3: A simple centered footer

For a small site, one centered block is plenty: a row of links and the copyright line underneath. Flexbox with flex-wrap keeps the links in a row that wraps neatly on phones.

index.html
Preview

Step 4: A multi-column footer with CSS grid

Bigger sites group footer links into columns. CSS grid does this in one rule, and it can switch to fewer columns on small screens automatically:

  1. Wrap each group in a <div> (or <nav aria-label="…"> for link groups) with a small heading.
  2. On the container, set display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));. The browser fits as many 160px+ columns as there’s room for, so four columns on a laptop become two or one on a phone, without a media query.
  3. Put the copyright line in a separate bar underneath, with a top border.

In this narrow preview the columns stack. Open it in the full editor and switch to Desktop to see them side by side.

index.html
Preview

Step 5: Keep the footer at the bottom of short pages

On a page with little content, the footer floats up into the middle of the screen with empty space below it. To push it to the bottom of the window (while still letting it sit after the content on long pages), make the body a column that’s at least as tall as the screen:

  1. On body: min-height: 100vh; display: flex; flex-direction: column; margin: 0;
  2. On main: flex: 1. The main content grows to fill the spare space, which pushes the footer down.

This is not the same as a fixed footer that always covers the bottom of the screen; that hides content and is rarely what people want.

index.html
Preview

Keep the copyright year up to date

A footer that still says “© 2023” makes a site look abandoned. If your pages are plain HTML, a tiny script can fill in the current year:

<p>&copy; <span id="year">2026</span> My Site</p> <script> document.getElementById('year').textContent = new Date().getFullYear(); </script>

Write the current year inside the span as well, so the text is still correct if JavaScript doesn’t run. Many people also write a range such as 2021–2026 to show when the site started.

Footer accessibility and SEO tips

  • Label link groups. If the footer has several <nav> groups, give each an aria-label (“Product”, “Company”), so screen reader users can tell them apart from the main menu.
  • Use real headings, but keep them small. Column titles can be headings (often <h2>) styled small with CSS; don’t skip levels just to get a smaller default size.
  • Make contact details tappable. Wrap emails in mailto: links and phone numbers in tel: links so phones can act on them.
  • Link to pages that matter. Footer links appear on every page, so they help search engines discover your key pages. Keep the list focused rather than linking to everything.
  • Keep it consistent. The same footer on every page builds trust and helps visitors find your privacy policy and contact details quickly.

Footer layouts compared

LayoutHowGood for
Single centered blockFlexbox row of links + copyright lineSmall sites, portfolios, landing pages
Multi-columnCSS grid with auto-fit / minmaxSites with many sections, shops, businesses
Bottom of short pagesBody as a flex column, main { flex: 1 }Any site with some short pages
Fixed to the screenposition: fixed; bottom: 0Rarely: cookie bars or app toolbars, not site footers

Common footer mistakes

  • Using <div class="footer"> instead of <footer>. The element tells browsers and screen readers what the section is.
  • Low-contrast text. Grey text on a dark footer is often too faint to read. Check the contrast like any other text.
  • Tiny links on phones. Give footer links enough spacing to tap comfortably.
  • A fixed footer covering content. Use the flexbox method above instead of position: fixed.
  • An outdated copyright year. Update it, or let a script do it.
  • Missing legal links. A privacy policy link in the footer is expected, and required by most ad and analytics services.

Frequently asked questions

How do I make a footer in HTML?
Add a <footer> element as the last element inside <body>, after your main content, and put a copyright line, important links and contact details inside it. Then style it with CSS.
How do I keep the footer at the bottom of the page?
Give the body min-height: 100vh, display: flex and flex-direction: column, and give the main content flex: 1. The content grows to fill spare space, pushing the footer to the bottom on short pages.
What should I put in a website footer?
A copyright line, links to your privacy policy and terms, contact details, links to your most important pages and, if you have them, social media links or a newsletter sign-up.
How do I make footer columns responsive?
Use CSS grid with grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)). The browser fits as many columns as there is room for and wraps the rest onto new rows on small screens.
How do I write the copyright symbol in HTML?
Use the HTML entity &copy;, which displays ©. You can also type the © character directly if your page uses UTF-8 encoding.
Can a page have more than one footer?
Yes. The page has one main footer inside <body>, and articles or sections can have their own <footer> for things like an author name or publish date.