Skip to main content

web-page-template

A template to use when I create new web pages, including an HTML skeleton and my default layout

This is a template I use as a starting point when I create new HTML pages.

A sketch of my standard layoutA screenshot fo the layout rendered as HTML

Features:

Usage

Copy the contents of TEMPLATE.html into a new HTML file.

I have a text expansion snippet in Alfred that inserts this template: when I type !html, I get this HTML template.

Motivation

This layout isn’t perfect, but it’s pretty good and covers a wide variety of use cases. I prefer it to the default browser styles you get in a completely new HTML file.

I used to copy the HTML and CSS from project-to-project, but it was difficult to know what was part of my basic layout, and what was project-specific. I also had no canonical definition of this basic layout, and I didn’t apply fixes and improvements consistently.

Creating a single template gives me something a canonical version that’s easier to copy/paste. It’s also allowed me to look at this template more carefully, and make sure I’m following best practices.

Useful reading