Skip to main content

Build Your First Static Website: Step-by-Step Guide

Published: December 12, 2025 Updated: May 8, 2026 Larry Qu 10 min read

Welcome! This guide is for absolute beginners — no experience required. By the end you’ll have a small, beautiful static website running on the web (and deployed to either GitHub Pages or Vercel), plus the foundational skills to keep improving.

Why static sites? They’re simple, fast, secure, and excellent for personal pages, portfolios, documentation, or small projects where you don’t need a database or server-side logic.


Table of Contents

  • Quick overview and prerequisites
  • Core HTML structure and common tags
  • CSS fundamentals: selectors, properties, and linking stylesheets
  • Practical example: build a tiny website (step-by-step)
  • Deploying to GitHub Pages (step-by-step)
  • Deploying to Vercel (step-by-step)
  • Common pitfalls, best practices, and SEO tips
  • Next steps & resources

Quick overview & prerequisites ✅

What you’ll need:

  • A code editor (VS Code is excellent; see our Code Editor Setup article for tips)
  • A GitHub account (for GitHub Pages) — free at GitHub
  • (Optional) A Vercel account for instant deployments: Vercel
  • Basic familiarity with saving files and running a terminal (we’ll guide you)

Definitions (quick):

  • Static site = collection of files (HTML, CSS, images) served as-is by a web server.
  • HTML = the structure/contents of your pages (headings, paragraphs, images).
  • CSS = the visual style (colors, layout, fonts).

Key terms & abbreviations (quick reference)

  • HTML — HyperText Markup Language: used to structure content on the web.
  • CSS — Cascading Style Sheets: rules that define how HTML content is presented.
  • HTTP — Hypertext Transfer Protocol: the protocol browsers use to request resources from servers.
  • HTTPS/TLS — Secure HTTP; TLS ensures traffic between browser and server is encrypted.
  • CDN — Content Delivery Network: edge servers that cache and serve static assets close to users for speed.
  • SSG — Static Site Generator: tools (Hugo, Jekyll, Eleventy) that turn content into static files.
  • SSR — Server-Side Rendering: server builds pages on request (Next.js supports both SSG and SSR).
  • SEO — Search Engine Optimization: practices that help search engines discover and rank pages.
  • CLI — Command-Line Interface: terminal tools like git, npm, and vercel.

These terms will appear throughout this guide — you’ll see them again when we deploy and when you explore next steps.


1) HTML fundamentals — building the page structure 🧩

HTML is the skeleton of your website. Let’s create a minimal index.html file.

Example: index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <title>My First Static Site</title>
    <meta name="description" content="A friendly intro to static sites" />
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header>
      <h1>Welcome to My Site</h1>
      <nav>
        <a href="#">Home</a>
        <a href="#about">About</a>
      </nav>
    </header>

    <main>
      <section id="about">
        <h2>About</h2>
        <p>This is a tiny site built for learning.</p>
      </section>
    </main>

    <footer>
      <p>Made with ❤️ by you</p>
    </footer>
  </body>
</html>

### HTML: useful examples & semantics (quick)

- Image with alt and responsive sizes:
Small brown puppy sitting in the grass ```text
  • Accessible link that opens in a new tab (use with rel=“noopener”):
<a href="https://example.com" target="_blank" rel="noopener noreferrer">Learn more</a>
```text

- Simple contact form (using Formspree example — no server required):
```html Explanation: Use semantic tags (`
`, `

Comments

👍 Was this article helpful?