THE BARE BONES GUIDE TO HTML

by Kevin Werbach
<werbach@access.digex.net>
Tables Version 1.21 -- July 26, 1995
This version requires a browser that supports tables


After seeing several pleas for a quick-and-dirty description of all the HTML tags, I decided to update the cheat sheet I had created for my own use to serve this purpose. The latest version of this document may be obtained at http://www.access.digex.net/~werbach/barebone.html. Table conversion on earlier versions was done by R. Alan Monroe; this version has been formatted entirely by the author.

This Guide is designed to be as concise as possible, and therefore it doesn't go into any detail about how to use the various tags. There are numerous step-by-step HTML guides on the Web; I have links to many of them at http://www.access.digex.net/~werbach/wwwhelp.html#guides.

Table of Contents

  1. Credit where credit is due
  2. What is unique about this guide
  3. Which HTML tags are included
  4. How this document is formatted (including a description of symbols and abbreviations)
  5. List of HTML tags
  6. Version history


Important: If you are not clear about the differences between HTML 2.0, HTML 3.0, and Netscape tags, I suggest you read my comments on the development of HTML.

GENERAL (all HTML documents should have these)

Prologue<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
3.0Prologue<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 3.0//EN">
Document Type<HTML></HTML>beginning and end of file
Title<TITLE></TITLE>document name; must be in header
Header<HEAD></HEAD>descriptive info, such as title
Body<BODY></BODY>bulk of the page

HARD FORMATTING (author specifies text appearance)

Bold<B></B>
Italic<I></I>
3.0Underline<U></U>not widely implemented yet
3.0Strikeout<S></S>not widely implemented yet
Typewriter<TT></TT>display in a monospaced font
N1.0Blinking<BLINK></BLINK>the most derided tag ever

SOFT FORMATTING (controlled by the browser's style definitions)

Headings<H?></H?>the spec. defines 6 levels
Emphasis<EM></EM>usually displayed as italic
Strong Emphasis<STRONG></STRONG>usually displayed as bold
Preformatted<PRE></PRE>display text as-is
Width<PRE WIDTH=?></PRE>in characters
Pre/No Tags<XMP></XMP>currently disfavored from use
Citation<CITE></CITE>usually italics
Code<CODE></CODE>for source code listings
Sample Output<SAMP></SAMP>
Keyboard Input<KBD></KBD>
Variable<VAR></VAR>
Definition<DFN></DFN>not widely implemented
N1.0Font Size<FONT SIZE=?></FONT>ranges from 1-7
N1.0Change Font Size<FONT SIZE=+|-?></FONT>
N1.0Base Font Size<BASEFONT SIZE=?>from 1-7; default is 3

ALIGNMENT

Block Quote<BLOCKQUOTE></BLOCKQUOTE>usually indented
3.0Align Text<P ALIGN=LEFT|CENTER|RIGHT></P>
3.0Align Heading<H? ALIGN=LEFT|CENTER|RIGHT></H?>
N1.0Center<CENTER></CENTER>for both text and images

LINKS AND GRAPHICS

Link Something<A HREF="URL"></A>
Link to Target<A HREF="URL#***"></A>If in another document
<A HREF="#***"></A>If in current document
Define Target<A NAME="***"></A>
Display Image<IMG SRC="URL">
Alignment<IMG SRC="URL" ALIGN=TOP|BOTTOM|MIDDLE>
N1.0Alignment<IMG SRC="URL" ALIGN=LEFT|RIGHT|TEXTTOP|
ABSMIDDLE|BASELINE|ABSBOTTOM>
Alternate<IMG SRC="URL" ALT="***">if image not displayed
Imagemap<IMG SRC="URL" ISMAP>requires a script
3.0Dimensions<IMG SRC="URL" WIDTH="?" HEIGHT="?">in pixels
N1.0Border<IMG SRC="URL" BORDER=?>in pixels
N1.0Runaround Space<IMG SRC="URL" HSPACE=? VSPACE=?>in pixels
N1.0Low-Res Proxy<IMG SRC="URL" LOWSRC="URL">

DIVIDERS

Paragraph<P>a double return
3.0Paragraph<P></P>redefined as a container
Line Break<BR>a single carriage return
N1.0Clear textwrap<BR CLEAR=LEFT|RIGHT|ALL>
Horizontal Rule<HR>
N1.0Alignment<HR ALIGN=LEFT|RIGHT|CENTER>
N1.0Thickness<HR SIZE=?>in pixels
N1.0Width<HR WIDTH=?>in pixels
N1.0Width Percent<HR WIDTH=%>as a percentage of page width
N1.0Solid Line<HR NOSHADE>without the 3D cutout look
N1.0No Break<NOBR>prevents line breaks
N1.0Word Break<WBR>where to break a line if needed

LISTS (lists can be nested)

Unordered List<UL><LI></UL><LI> before each list item
N1.0Bullet Type<UL TYPE=DISC|CIRCLE|SQUARE>for the whole list
<LI TYPE=DISC|CIRCLE|SQUARE>this & subsequent
Ordered List<OL><LI></OL><LI> before each list item
N1.0Outline Type<OL TYPE=A|a|I|i|1>for the whole list
<LI TYPE=A|a|I|i|1>this & subsequent
N1.0Starting Number<OL VALUE=?>for the whole list
<LI VALUE=?>this & subsequent
Definition List<DL><DT><DD></DL><DT>=term, <DD>=definition
Menu List<MENU><LI></MENU><LI> before each list item
Directory List<DIR><LI></DIR><LI> before each list item

BACKGROUNDS AND COLORS

3.0Bkground Color<BODY BGCOLOR="#$$$">order is red/green/blue
3.0Tiled Bkground<BODY BACKGROUND="URL">
3.0Text Color<BODY TEXT="#$$$">
3.0Link Color<BODY LINK="#$$$">
3.0Visited Link<BODY VLINK="#$$$">
N1.1Active Link<BODY ALINK="#$$$">
More info at http://www.access.digex.net/~werbach/wwwhelp.html#color

SPECIAL CHARACTERS (these must all be in lower case)

Special Character&#?;where ? is the ISO 8859-1 code
<&lt;
>&gt;
&&amp;
"&quot;
Registered TM&#174;
N1.0Registered TM&reg;
Copyright&#169;
N1.0Copyright&copy;
Complete list at http://www.uni-passau.de/%7Eramsch/iso8859-1.html

FORMS (generally require a script on your server)

Define Form<FORM ACTION="URL" METHOD=GET|POST></FORM>
Input Field<INPUT TYPE="TEXT|PASSWORD|CHECKBOX|
RADIO|SUBMIT|RESET">
Field Name<INPUT NAME="***">
Checked?<INPUT CHECKED>checkboxes and radio boxes
Field Size<INPUT SIZE=?>in characters
Max Length<INPUT MAXLENGTH=?>in characters
Selection List<SELECT></SELECT>
Name of List<SELECT NAME="***"></SELECT>
# of Options<SELECT SIZE=?></SELECT>
Multiple Choice<SELECT MULTIPLE>can select more than one
Option<OPTION>items that can be selected
Default Option<OPTION SELECTED>
Input Box Size<TEXTAREA ROWS=? COLS=?></TEXTAREA>
Name of Box<TEXTAREA NAME="***"></TEXTAREA>

TABLES

3.0Define Table<TABLE></TABLE>
3.0Table Border<TABLE BORDER></TABLE>either on or off
N1.1Table Border<TABLE BORDER=?></TABLE>you can set the value
N1.1Cell Spacing<TABLE CELLSPACING=?>
N1.1Cell Padding<TABLE CELLPADDING=?>
N1.1Desired Width<TABLE WIDTH=?>in pixels
N1.1Width Percent<TABLE WIDTH=%>percentage of page
3.0Table Row<TR></TR>
3.0Alignment<TR ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM>
3.0Table Cell<TD></TD>must appear within table rows
3.0Alignment<TD ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM>
3.0No Linebreaks<TD NOWRAP>
3.0Columns to Span<TD COLSPAN=?>
3.0Rows to Span<TD ROWSPAN=?>
N1.1Desired Width<TD WIDTH=?>in pixels
N1.1Width Percent<TD WIDTH=%>percentage of table
3.0Table Header<TH></TH>same as data, except bold centered
3.0Alignment<TH ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM>
3.0No Linebreaks<TH NOWRAP>
3.0Columns to Span<TH COLSPAN=?>
3.0Rows to Span<TH ROWSPAN=?>
N1.1Desired Width<TH WIDTH=?>in pixels
N1.1Width Percent<TH WIDTH=%>percentage of table
3.0Table Caption<CAPTION></CAPTION>
3.0Alignment<CAPTION ALIGN=TOP|BOTTOM>above or below table

MISCELLANEOUS

Comment<!-- *** -->not displayed by the browser
Author's Address<ADDRESS></ADDRESS>
Searchable<ISINDEX>indicates a searchable index
N1.0Prompt<ISINDEX PROMPT="***">text to prompt input
Send Search<A HREF="URL?***"></a>use a real question mark
URL of This File<BASE HREF="URL">must be in header
Relationship<LINK REV="***" REL="***" HREF="URL">in header
Meta Information<META>must be in header

Copyright © 1995 Kevin Werbach. Noncommercial redistribution permitted. This document is not a product of Bare Bones Software; any similarity of names is purely coincidental. Bare Bones Software has, however, agreed to distribute this document with some versions of their excellent BBEdit text editor. You can find BBEdit at ftp://ftp.netcom.com/pub/bb/bbsw/


Contents | LIST OF TAGS | Other Versions of the Guide | Kevin's Home Page