My HTML Style Guide

Version 1.2
Last updated 2/1/97

This document describes my standard html document style and is particularly applicable to my computer quick reference pages.

Structure

Document titles should match main (level 2, centered) headings. Start long documents with a table or list of topics linked into the main text. Include version and "This page last updated..." information as a centered level 4 heading at the top of content rich documents. Include a link back to my home page, a mailto: link back to me and "This page last updated ..." information as a centered division in italic at the bottom of link rich documents.

Headings

Main document headings are level 2 and centered. Section headings are level 3 and flush left. Sub-parts of main headings (like version and update information) are level 4 and centered. Heading levels go from 1 (largest) to 7 (smallest). Use the algin=center attribute in favor of the Center tag pair.

Colors

Use the line:

<body text="#000000" link="#0000cc" vlink="#a020a0" alink="#e00000" bgcolor="#d0d0d0" background="./graphics/bg.gif">
To set the following standard colors:
Black body text
Medium blue unvisited links
Dark purple visited links
Medium red active link
Background bg.gif (currently textured gray)

Source Code

Use <code><blockquote><pre>Code</pre></blockquote></code> to create indented blocks of source code. Sub-indent source code with spaces to show control structures. Use the Code style to indicate inline code. Generally use italic for literal text and replaceable items. Do not use the Code style routine key words (like if and while) in body text. Generally, do not use quotation marks.

Tables and Lists

Use cellpading=5 in tables with borders. Use table header (th codes) in place of table data (td codes) for the headings (the first row) in tables with headings. Use Definition Lists to produce hanging indentations.

Fonts

Generally use default font size and face. Font sizes run from 1 (smallest) to 7 (largest). The default base font size is 3. Relative font size changes can be made by including a + or - sign with the font size value. This is font size 1. This is font size 5.

The base font size can be changed in MS Explorer using the View | Font menu option. This setting effects the font size for both the screen and printer.

Miscellaneous

Use lower case for html codes. Use line break (<br>) codes after items to single space between them. Use paragraph (<p>) codes before items to double space between them. Generally double space link items.