Component Library

← Back to gallery

Company Footer Links in HTML, CSS and vanilla JS

A copy-paste Company Footer Links in plain HTML and CSS, with vanilla JavaScript: no framework, no build step, MIT-licensed.

Category: Navigation · Tags: footer nav, split, footer, sitemap

Live preview

Source (copy-ready)

<section class="example-company-footer-links" data-dcl-layout="split" data-dcl-scheme="light" aria-labelledby="example-company-footer-links-title"><header><h2 id="example-company-footer-links-title">Company Footer Links</h2></header><div class="parts"><section id="example-company-footer-links-item-0" tabindex="-1"><h3>About</h3><p>Read about the team.</p></section><section id="example-company-footer-links-item-1" tabindex="-1"><h3>Careers</h3><p>Explore open roles.</p></section><section id="example-company-footer-links-item-2" tabindex="-1"><h3>Press</h3><p>View media resources.</p></section><footer><nav aria-label="Example footer"><ul><li><a href="#example-company-footer-links-item-0">About</a></li><li><a href="#example-company-footer-links-item-1">Careers</a></li><li><a href="#example-company-footer-links-item-2">Press</a></li></ul></nav></footer></div>
<script>
(() => {
  const root = document.currentScript.closest(".example-company-footer-links");
  const instance = Array.from(document.getElementsByClassName("example-company-footer-links")).indexOf(root);
  if (instance > 0) {
    const references = ["id", "aria-labelledby", "aria-controls", "aria-describedby", "for", "name"];
    for (const element of [root, ...root.querySelectorAll("*")]) {
      for (const attr of references) {
        if (element.hasAttribute(attr)) element.setAttribute(attr, element.getAttribute(attr) + "--" + instance);
      }
      const href = element.getAttribute("href");
      if (href && href.startsWith("#")) element.setAttribute("href", href + "--" + instance);
    }
  }
  const preference = matchMedia("(prefers-color-scheme: dark)");
  const apply = () => { root.dataset.dclScheme = preference.matches ? "dark" : "light"; };
  preference.addEventListener("change", apply);
  apply();

})();
</script></section>
<style>

.example-company-footer-links { color: #11292f; background-color: #ffffff; color-scheme: light; }
.example-company-footer-links a { color: #005c62; }
.example-company-footer-links button, .example-company-footer-links summary, .example-company-footer-links input, .example-company-footer-links select {
  color: #11292f; background-color: #e4edef; border-color: #697f84;
}
.example-company-footer-links button:hover, .example-company-footer-links summary:hover, .example-company-footer-links button[aria-selected="true"] {
  color: #ffffff; background-color: #00535a;
}
.example-company-footer-links dialog { color: #11292f; background-color: #ffffff; }
.example-company-footer-links [data-note] { color: #11292f; background-color: #e4edef; }
.example-company-footer-links :focus-visible { outline: 3px solid #005c62; outline-offset: 2px; }


.example-company-footer-links[data-dcl-scheme="dark"] { color: #eff8f9; background-color: #142f36; color-scheme: dark; }
.example-company-footer-links[data-dcl-scheme="dark"] a { color: #8fe1da; }
.example-company-footer-links[data-dcl-scheme="dark"] button, .example-company-footer-links[data-dcl-scheme="dark"] summary, .example-company-footer-links[data-dcl-scheme="dark"] input, .example-company-footer-links[data-dcl-scheme="dark"] select {
  color: #eff8f9; background-color: #1c3c44; border-color: #839fa5;
}
.example-company-footer-links[data-dcl-scheme="dark"] button:hover, .example-company-footer-links[data-dcl-scheme="dark"] summary:hover, .example-company-footer-links[data-dcl-scheme="dark"] button[aria-selected="true"] {
  color: #11292f; background-color: #8fe1da;
}
.example-company-footer-links[data-dcl-scheme="dark"] dialog { color: #eff8f9; background-color: #142f36; }
.example-company-footer-links[data-dcl-scheme="dark"] [data-note] { color: #eff8f9; background-color: #1c3c44; }
.example-company-footer-links[data-dcl-scheme="dark"] :focus-visible { outline: 3px solid #8fe1da; outline-offset: 2px; }

.example-company-footer-links, .example-company-footer-links * { box-sizing: border-box; }
.example-company-footer-links { font: 1rem/1.5 system-ui, sans-serif; padding: 1rem; border-radius: 0.75rem; overflow-wrap: anywhere; }
.example-company-footer-links h2, .example-company-footer-links h3 { line-height: 1.15; margin-block: 0 0.75rem; }
.example-company-footer-links p { margin-block: 0.5rem; }
.example-company-footer-links ul { margin-block: 0.5rem; padding-inline-start: 1.5rem; }
.example-company-footer-links article, .example-company-footer-links details, .example-company-footer-links [data-note] { border: 1px solid; border-radius: 0.375rem; padding: 0.75rem; }
.example-company-footer-links button, .example-company-footer-links summary, .example-company-footer-links input, .example-company-footer-links select {
  min-block-size: 44px; border: 1px solid; border-radius: 0.375rem; padding: 0.5rem 0.75rem; font: inherit;
}
.example-company-footer-links button, .example-company-footer-links summary { cursor: pointer; transition: background-color 140ms ease-out; }
.example-company-footer-links button:disabled { cursor: not-allowed; text-decoration: line-through; }
.example-company-footer-links input { display: block; inline-size: 100%; }
.example-company-footer-links dialog { max-inline-size: min(32rem, 90vw); border-radius: 0.75rem; padding: 1rem; }
.example-company-footer-links th, .example-company-footer-links td { padding: 0.5rem; text-align: start; border-block-end: 1px solid; }
.example-company-footer-links table { border-collapse: collapse; inline-size: 100%; }
.example-company-footer-links caption { font-weight: bold; text-align: start; }
.example-company-footer-links dt { font-weight: 600; }
.example-company-footer-links dd { margin: 0 0 0.75rem; }
.example-company-footer-links [hidden] { display: none !important; }
.example-company-footer-links .parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.example-company-footer-links footer { grid-column: 1 / -1; border-block-start: 1px solid; } .example-company-footer-links footer ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }
@media (max-width: 30rem) {
  .example-company-footer-links[data-dcl-layout="rail"] .parts { grid-template-columns: minmax(0, 1fr); }
  .example-company-footer-links[data-dcl-layout="rail"] .parts > :is(p, ul, article) { grid-column: 1; grid-row: auto; }
  .example-company-footer-links[data-dcl-layout="rail"] .parts > :is(details, nav) { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) { .example-company-footer-links * { transition: none !important; } }
</style>

When to use

Use this split arrangement when readers benefit from seeing items side by side.

Avoid

Do not make the footer the only path to an essential destination.

Accessibility

Name the footer navigation landmark and keep labels meaningful without nearby headings.

Was this useful? Send feedback.