SpunkArt
Long reads and site policies

How to plan and build a small static website, step by step

A static website is a folder of finished HTML, CSS and image files that a server sends exactly as they are. It is the simplest kind of site to build, the cheapest to host and the hardest to break. This long read walks through the whole job in order.

Static or dynamic: why start simple

A dynamic site builds each page on request. A program reads a database, fills a template and returns the result. A static site does that work once, before upload. Every visitor gets the same prepared file.

That difference has practical effects. A static site has no database to patch, no login to attack and no server code to crash. It loads fast because the server only copies a file. The trade-off is that anything personal or changing, such as a shopping cart or a comment thread, needs another service. For a portfolio, a small business page, a club site or a set of guides, static is usually the right choice.

Step 1: decide what the site is for

Write one sentence that names the reader and the job. For example: “People in my town who want to know when the community garden is open and how to join a work day.” Every page you add later must serve that sentence. If a page does not, leave it out.

Step 2: list the pages before you write any code

Most small sites need fewer pages than people expect. A typical first plan looks like this:

  • Home: what this is, who it is for, and the one thing a visitor should do next.
  • About: who runs it and why a reader can trust it.
  • Two to six topic pages: one subject per page, each answering a real question.
  • Contact or “how to reach us”, if you actually want messages.
  • Privacy page: what the site collects, even if the honest answer is “nothing”.

Draw the navigation on paper. If a visitor needs more than two clicks to reach any page, simplify.

Step 3: write the words first

Write the copy in a plain text file before you design anything. Layout decisions are easier when you know how long each section is. Use one heading per idea, short paragraphs and concrete details. Read each page aloud. Cut every sentence that a reader would skip.

Step 4: set up a folder structure

my-site/
  index.html
  about.html
  garden-hours.html
  css/style.css
  images/
  robots.txt
  sitemap.xml

Use lowercase file names with hyphens. Those names become your URLs, and changing them later breaks links, so pick them carefully now.

Step 5: build one page template

Every page shares the same skeleton: a <!doctype html> line, a <head> with a unique <title> and meta description, a header with navigation, one <h1>, the main content and a footer. Build the home page completely, check it on a phone and a laptop, and then copy it for the other pages.

Keep the CSS in one shared file. Start with readable defaults: a body font size of at least 16 pixels, a line height around 1.5, a maximum text width so lines do not stretch across a wide screen, and strong colour contrast between text and background.

Step 6: check the basics

  1. Every image has an alt attribute that describes it, or an empty one if it is decoration.
  2. Every link works. Click each one.
  3. Headings go in order: one h1, then h2, then h3.
  4. The page works with keyboard only. Press Tab through it and watch the focus outline.
  5. Images are resized to the size they display at and saved in a modern format.
  6. The page validates in an HTML checker without errors.

Step 7: publish

Static hosting services accept a folder or a connected git repository and serve it over HTTPS. Many have a no-cost tier for small sites. Point your domain at the host through your DNS settings, wait for the certificate, and then load every page on the live address. Add a robots.txt and a sitemap.xml so search engines can find the pages.

Common mistakes

  • Building ten empty pages “for later”. Publish only finished pages.
  • Copying the same title and description onto every page.
  • Uploading 4,000-pixel photos straight from a phone.
  • Adding scripts you do not understand. Every third-party script can slow the page or collect visitor data.

Questions

Do I need a framework or a static site generator?

No. For five pages, hand-written HTML is fine. A generator starts to help when you have many pages that share a layout and you are tired of copying the header into each file.

Can a static site have a contact form?

The page can show a form, but something must receive the data. That means a form-handling service or a small server function. A plain email address is often simpler.

How do I update the site later?

Edit the file on your computer, check it locally, and upload it again. Keeping the folder in version control gives you a history of every change.