Bits & Bytes

A Basic HTML Page Template

Below, is a template for a basic HTML page or, more truthfully, a basic XHTML page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" lang="en">
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />


This is the template that we will use for coding HTML, Cascading Style Sheets (CSS), and Javascript. Between the head tags, we will put things like style specifications and function definitions: generally, things which are not directly visible. On the other hand, we will put the items that are visible between the body tags.

The code above can be copied and pasted, as is, into a blank text document that you can create with any text editor. Then save it out with a .html file extension. Once you save the file, it should open automatically with your default browser when you double-click the file. If it does not, you can right-click and use “Open with” to select a program to set as your default program for opening .html files.

Note that this is a blank HTML page. So, it will not display anything on the page until you add something to it. It is simply a template.

Tags: , , , , , , , , ,

By: Michael Hall

One Response to “A Basic HTML Page Template”

Leave a Reply