1. Follow a page from disk to browser
Imagine a folder containing an HTML file, a stylesheet, and a picture. When a browser requests the HTML page, a web server returns its contents. The browser reads the document and requests the stylesheet and picture named in it.
HTML describes the content and structure: headings, paragraphs, lists, and links. CSS controls presentation: type, spacing, colour, and layout. Images and other media are separate assets unless explicitly embedded.
In a static site, the server does not need to construct a new page from a database for each visitor. A build tool can generate the files beforehand, but a small site can also be written directly. “Static” describes how content is served; it does not necessarily mean a page has no interactive features.
2. Treat links as paths
Within the same folder, a link such as about.html points to a neighbouring file. A path such as images/diagram.svg looks inside a subfolder. A leading slash makes a path relative to the website’s root, rather than the current page’s folder.
This distinction matters when moving a site. A root-relative link may work at a domain’s top level but point to the wrong place when the same files are hosted under a subdirectory. Use a consistent path strategy and test from the location you intend to publish.
Names matter too. A server may treat Guide.html and guide.html as different files even if your own computer does not. Lowercase names without spaces are a simple convention that avoids many surprises.
A link ending in a fragment, such as #checklist, points to an element with that ID in the document. The target must exist, and IDs should be unique within the page.
3. Make the document useful before styling it
Give each page a descriptive title and one clear main heading. Use heading levels to represent the outline, rather than choosing a heading only because its default size looks right.
- Put primary navigation in a navigation region and the central content in a main region.
- Use real links for navigation. A visitor should be able to follow them with a keyboard.
- Give meaningful images useful alternative text. Decorative images can have empty alternative text.
- Keep text readable on narrow screens and avoid fixed widths that force sideways scrolling.
- Make focus visible and leave enough room around links for touch input.
These choices help the page remain understandable when styling is unavailable or when someone uses assistive technology. A tidy visual design cannot replace a clear document structure.
4. Know what files alone cannot do
A static page can publish instructions, present images, and link to other documents without a database. Receiving a form submission, authenticating an account, or storing shared user data requires another component or service.
Do not place passwords, private keys, or confidential data in published files. If the server makes a file available, a visitor may be able to download it even if no navigation link points to it. Hiding text with CSS does not make it private.
Simple is not automatically secure. A static site can have fewer moving parts than a server-rendered application, but hosting access, software maintenance, permissions, and transport security still need attention.
A file named 404.html is only the content of an error page. The server must be configured to use it for missing resources and return the appropriate error status. Likewise, robots.txt gives instructions to cooperating crawlers; it is not an access-control mechanism.
5. Check the small things before publishing
- Open every page. Follow the navigation and article links. Check spelling, titles, and whether the page still makes sense without its layout.
- Resize the browser. Try a narrow view, increase text size, and check for clipped headings or links that are difficult to select.
- Use the keyboard. Move through links with Tab. Confirm that you can see where focus is and activate a link without a mouse.
- Check the files. Look for missing assets, broken relative paths, duplicated IDs, and accidental private content.
- Test through a local web server when possible. Opening files directly is useful, but does not reproduce HTTP status codes, redirects, or server behaviour.
Keep a copy of the previous published version so a mistaken edit is easy to reverse. For a small site, understandable files and repeatable checks often matter more than adding a complex publishing system.