Blank Website Template (Free HTML Starter, Responsive)

·

Free blank website template preview

Free Blank Website Template (HTML & CSS Starter)

Need a clean place to start a new website? This free blank website template gives you a lightweight HTML and CSS foundation with no extra design, no framework and no clutter. Download it, open it in any code editor and start building your own pages.

You get two files to choose from: a completely empty HTML page for developers who want full control, and a simple starter layout with a header, navigation and footer. Both are responsive, accessible and fast. Use it for landing pages, practice projects, small business sites or as the base for your own templates, free for personal and commercial use.

What you will build

blank.html: an empty, valid HTML5 page with the correct meta tags
starter.html: a simple layout with header, menu, content sections and footer
style.css: a modern CSS reset, color variables, grid, buttons and cards
main.js: a small script for the mobile menu
README: quick instructions for beginners

blank.html

<!doctype html>
<html lang="en"><head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- EDIT: page title and description -->
  <title>Your page title</title>
  <meta name="description" content="Your page description.">
  <!-- EDIT: social sharing title, description, and absolute page URL -->
  <meta property="og:title" content="Your page title">
  <meta property="og:description" content="Your page description.">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://example.com/">
  <link rel="stylesheet" href="css/style.css">
</head>
<body>
  <main id="main" tabindex="-1">
    <!-- EDIT: start here; add one h1 and your page content. -->
  </main>


</body></html>

starter.html

<!doctype html>
<html lang="en"><head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- EDIT: page title and description -->
  <title>Your project | Home</title>
  <meta name="description" content="Your page description.">
  <!-- EDIT: social sharing title, description, and absolute page URL -->
  <meta property="og:title" content="Your project | Home">
  <meta property="og:description" content="Your page description.">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://example.com/">
  <link rel="stylesheet" href="css/style.css">
  <script src="js/main.js" defer=""></script>
</head>
<body>
  <a class="skip-link" href="#main">Skip to main content</a>
  <header class="site-header">
    <div class="container header-inner">
      <!-- EDIT: logo text -->
      <a class="logo" href="starter.html">Your project</a>
      <button class="menu-toggle" type="button" aria-controls="site-nav" aria-expanded="false" hidden="">Menu</button>
      <!-- EDIT: navigation labels and links -->
      <nav id="site-nav" aria-label="Main navigation">
        <a href="#about">About</a>
        <a href="#details">Details</a>
      </nav>
    </div>
  </header>
  <main id="main" tabindex="-1">
    <section class="hero" aria-labelledby="hero-title">
      <div class="container">
        <!-- EDIT: main heading, introduction, and button -->
        <h1 id="hero-title">Your next project starts here.</h1>
        <p>A simple space for your idea. Replace this text with a short introduction.</p>
        <a class="button" href="#about">Explore the page</a>
      </div>
    </section>
    <section id="about" class="section" aria-labelledby="about-title">
      <div class="container">
        <!-- EDIT: first content section -->
        <h2 id="about-title">About your project</h2>
        <div class="grid grid-2">
          <article class="card">
            <h3>First idea</h3>
            <p>Describe a feature, service, or topic here.</p>
          </article>
          <article class="card">
            <h3>Second idea</h3>
            <p>Add another useful detail for your visitors.</p>
          </article>
        </div>
      </div>
    </section>
    <section id="details" class="section" aria-labelledby="details-title">
      <div class="container">
        <!-- EDIT: second content section -->
        <h2 id="details-title">More details</h2>
        <p>Use this section for supporting information or your next steps.</p>
      </div>
    </section>
  </main>
  <footer class="site-footer">
    <!-- EDIT: footer text -->
    <div class="container"><p>Your project. Built with a simple starting point.</p></div>
  </footer>


</body></html>

js/main.js

// Navigation stays visible when JavaScript is unavailable.
const toggle = document.querySelector('.menu-toggle');
const nav = document.querySelector('#site-nav');
const desktop = window.matchMedia('(min-width: 768px)');
if (toggle && nav) {
  const resetMenu = () => {
    toggle.hidden = desktop.matches;
    nav.hidden = !desktop.matches;
    toggle.setAttribute('aria-expanded', String(desktop.matches));
  };
  toggle.addEventListener('click', () => {
    nav.hidden = !nav.hidden;
    toggle.setAttribute('aria-expanded', String(!nav.hidden));
  });
  desktop.addEventListener('change', resetMenu);
  resetMenu();
}

css/style.css

/* Reset: predictable sizing and accessible browser defaults. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body, h1, h2, h3, p {
  margin: 0;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
button, input, textarea, select {
  font: inherit;
}
button, a {
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}

/* EDIT: project colors, corners, and maximum content width. */
:root {
  --primary: #1d4ed8;
  --text: #1f2937;
  --bg: #ffffff;
  --border: #d1d5db;
  --radius: 0.5rem;
  --container: 70rem;
}

/* Base typography: system fonts require no downloads. */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: anywhere;
}
h1, h2, h3 {
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { max-width: 65ch; }
small { font-size: 0.875rem; }
h1 + *, h2 + *, h3 + *, p + * { margin-top: 1rem; }
a {
  color: var(--primary);
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 0.15em; }
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

/* Layout: single-column first, then wider grids. */
.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid > * { min-width: 0; }
.hero { padding-block: 4rem; }
.section { padding-block: 2.5rem; }
.section + .section { border-top: 1px solid var(--border); }

/* Reusable components. */
.button, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .menu-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.site-header { border-bottom: 1px solid var(--border); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.logo {
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}
nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.5rem;
}
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

/* Visible when reached by keyboard. */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  color: var(--primary);
  background: var(--bg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

@media (min-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav {
    flex-direction: row;
    width: auto;
    gap: 1.5rem;
  }
  .hero { padding-block: 6rem; }
  .section { padding-block: 3rem; }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding-block: 7rem; }
}

How it works

The blank page contains only the essential HTML5 structure: the doctype, head tags and an empty main area. The starter page adds a ready layout on top of it. The CSS file keeps all colors, spacing and sizes as variables at the top, so changing the look of your whole site takes only a few edits. Layout classes like .container, .grid-2 and .grid-3 let you build rows and columns without writing new CSS. There is no database and no server code, so it runs on any static host.

Try a change

Choose Edit code, make a small change, then press Run to preview it.

Use the source Copy buttons, choose Edit code to open the editor, or Download ZIP to save the project after a ten-second countdown.

How to edit

Download and unzip the folder.
Open it in a code editor such as VS Code, or Notepad.
Choose blank.html for an empty page or starter.html for the ready layout.
Change the page title and description inside the <head> section.
Add your content inside <main>, using the example sections as a guide.
Edit the colors in css/style.css:
css
:root {
--primary: #2563eb;
--text: #1f2937;
--bg: #ffffff;
}
Open the file in your browser and check the mobile view.
Upload the folder to your hosting when you are ready to publish.

Frequently asked questions

What is a blank website template?

It is a basic HTML and CSS page with the correct structure but no design content. You add your own text, images and sections on top of it.

Can I use it for commercial projects?

Yes. It is free for personal and commercial use, and no credit link is required.

What is the difference between blank.html and starter.html?

blank.html is a completely empty page. starter.html includes a header, navigation, sample sections and a footer to save you setup time.

Discussion (0)

Leave a comment