by Kevin Werbach
<barebones@werbach.com>
Version 2.0 HTML -- October 7, 1995
(This page should display properly on all current browsers)
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 (as well as translated versions in six languages other than English) may be obtained from <http://www.access.digex.net/~werbach/barebone.html>.
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>.
The Guide lists all the tags that current versions of most browsers are likely to recognize. I have included virtually all HTML 2.0 tags in the current specification, as well as the popular -- but not standard -- Netscape extensions, and several HTML 3.0 tags that are now in common usage. Excluded are: tags considered archaic, and a few tags that require more complex server interaction. Keep in mind that pages using Netscape tags may not display properly on other browsers.
Comments and suggestions are always welcome; you can reach me via Email at <barebones@werbach.com>.
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)
Document Type <HTML></HTML> (beginning and end of file) Title <TITLE></TITLE> (must be in header) Header <HEAD></HEAD> (descriptive info, such as title) Body <BODY></BODY> (bulk of the page)STRUCTURAL DEFINITION
(appearance controlled by the browser's preferences)
Heading <H?></H?> (the spec. defines 6 levels) 3.0 Align Heading <H? ALIGN=LEFT|CENTER|RIGHT></H?> 3.0 Division <DIV></DIV> 3.0 Align Division <DIV ALIGN=LEFT|RIGHT|CENTER|JUSTIFY></DIV> Block Quote <BLOCKQUOTE></BLOCKQUOTE> (usually indented) Emphasis <EM></EM> (usually displayed as italic) Strong Emphasis <STRONG></STRONG> (usually displayed as bold) 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) Author's Address <ADDRESS></ADDRESS> 3.0 Large Font Size <BIG></BIG> 3.0 Small Font Size <SMALL></SMALL>PRESENTATION FORMATTING
(author specifies text appearance)
Bold <B></B> Italic <I></I> 3.0 Underline <U></U> (not widely implemented yet) 3.0 Strikeout <S></S> (not widely implemented yet) 3.0 Subscript <SUB></SUB> 3.0 Superscript <SUP></SUP> Typewriter <TT></TT> (displays in a monospaced font) Preformatted <PRE></PRE> (display text spacing as-is) Width <PRE WIDTH=?></PRE> (in characters) N1.0+ Center <CENTER></CENTER> (for both text and images) N1.0 Blinking <BLINK></BLINK> (the most derided tag ever) N1.0 Font Size <FONT SIZE=?></FONT> (ranges from 1-7) N1.0 Change Font Size <FONT SIZE=+|-?></FONT> N1.0 Base Font Size <BASEFONT SIZE=?> (from 1-7; default is 3) N2.0 Font Color <FONT COLOR="#$$$$$$"></FONT>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) N2.0 Target Window <A HREF="URL" TARGET="***"></A> Define Target <A NAME="***"></A> Display Image <IMG SRC="URL"> Alignment <IMG SRC="URL" ALIGN=TOP|BOTTOM|MIDDLE> N1.0 Alignment <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) N2.0 Imagemap <IMG SRC="URL" USEMAP="URL"> N2.0 Map <MAP NAME="***"></MAP> (describes the map) N2.0 Section <AREA SHAPE="RECT" COORDS=",,," HREF="URL"|NOHREF> 3.0 Dimensions <IMG SRC="URL" WIDTH="?" HEIGHT="?"> (in pixels) N1.0 Border <IMG SRC="URL" BORDER=?> (in pixels) N1.0 Runaround Space <IMG SRC="URL" HSPACE=? VSPACE=?> (in pixels) N1.0 Low-Res Proxy <IMG SRC="URL" LOWSRC="URL"> N1.1 Client Pull <META HTTP-EQUIV="Refresh" CONTENT="?; URL=URL"> N2.0 Embed Object <EMBED SRC="URL"> (insert object into page) N2.0 Object Size <EMBED SRC="URL" WIDTH="?" HEIGHT="?">DIVIDERS
Paragraph <P> (usually a double return) 3.0 Paragraph <P></P> (redefined as a container tag) 3.0 Align Text <P ALIGN=LEFT|CENTER|RIGHT></P> Line Break <BR> (a single carriage return) N1.0 Clear Textwrap <BR CLEAR=LEFT|RIGHT|ALL> Horizontal Rule <HR> N1.0 Alignment <HR ALIGN=LEFT|RIGHT|CENTER> N1.0 Thickness <HR SIZE=?> (in pixels) N1.0 Width <HR WIDTH=?> (in pixels) N1.0 Width Percent <HR WIDTH=%> (as a percentage of page width) N1.0 Solid Line <HR NOSHADE> (without the 3D cutout look) N1.0 No Break <NOBR><NOBR> (prevents line breaks) N1.0 Word 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.0 Bullet 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.0 Numbering Type <OL TYPE=A|a|I|i|1> (for the whole list) <LI TYPE=A|a|I|i|1> (this & subsequent) N1.0 Starting 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.0 Tiled Bkground <BODY BACKGROUND="URL"> N1.1+ Bkground Color <BODY BGCOLOR="#$$$$$$"> (order is red/green/blue) N1.1+ Text Color <BODY TEXT="#$$$$$$"> N1.1+ Link Color <BODY LINK="#$$$$$$"> N1.1+ Visited Link <BODY VLINK="#$$$$$$"> N1.1 Active 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) < < > > & & " " Registered TM ® N1.0+ Registered TM ® Copyright © N1.0+ Copyright © (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> N2.0 File Upload <FORM ENCTYPE="multipart/form-data></FORM> Input Field <INPUT TYPE="TEXT|PASSWORD|CHECKBOX|RADIO| IMAGE|HIDDEN|SUBMIT|RESET"> Field Name <INPUT NAME="***"> Field Value <INPUT VALUE="***"> 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> N2.0 Wrap Text <TEXTAREA WRAP=OFF|VIRTUAL|PHYSICAL></TEXTAREA>TABLES
3.0 Define Table <TABLE></TABLE> 3.0 Table Border <TABLE BORDER></TABLE> (either on or off) N1.1 Table Border <TABLE BORDER=?></TABLE> (you can set the value) N1.1 Cell Spacing <TABLE CELLSPACING=?> N1.1 Cell Padding <TABLE CELLPADDING=?> N1.1 Desired Width <TABLE WIDTH=?> (in pixels) N1.1 Width Percent <TABLE WIDTH=%> (percentage of page) 3.0 Table Row <TR></TR> 3.0 Alignment <TR ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM> 3.0 Table Cell <TD></TD> (must appear within table rows) 3.0 Alignment <TD ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM> 3.0 No linebreaks <TD NOWRAP> 3.0 Columns to Span <TD COLSPAN=?> 3.0 Rows to Span <TD ROWSPAN=?> N1.1 Desired Width <TD WIDTH=?> (in pixels) N1.1 Width Percent <TD WIDTH=%> (percentage of table) 3.0 Table Header <TH></TH> (same as data, except bold centered) 3.0 Alignment <TH ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM> 3.0 No Linebreaks <TH NOWRAP> 3.0 Columns to Span <TH COLSPAN=?> 3.0 Rows to Span <TH ROWSPAN=?> N1.1 Desired Width <TH WIDTH=?> (in pixels) N1.1 Width Percent <TH WIDTH=%> (percentage of table) 3.0 Table Caption <CAPTION></CAPTION> 3.0 Alignment <CAPTION ALIGN=TOP|BOTTOM> (above/below table)FRAMES
(define and manipulate specific regions of the screen)
N2.0 Frame Document <FRAMESET></FRAMESET> (instead of <BODY>) N2.0 Row Heights <FRAMESET ROWS=,,,></FRAMESET> (pixels or %) N2.0 Row Heights <FRAMESET ROWS=*></FRAMESET> (* = relative size) N2.0 Column Widths <FRAMESET COLS=,,,></FRAMESET> (pixels or %) N2.0 Column Widths <FRAMESET COLS=*></FRAMESET> (* = relative size) N2.0 Define Frame <FRAME> (contents of an individual frame) N2.0 Display Document <FRAME SRC="URL"> N2.0 Frame Name <FRAME NAME="***"|_blank|_self|_parent|_top> N2.0 Margin Width <FRAME MARGINWIDTH=?> (left and right margins) N2.0 Margin Height <FRAME MARGINHEIGHT=?> (top and bottom margins) N2.0 Scrollbar? <FRAME SCROLLING="YES|NO|AUTO"> N2.0 Not Resizable <FRAME NORESIZE> N2.0 Unframed Content <NOFRAMES></NOFRAMES> (for non-frames browsers)MISCELLANEOUS
Comment <!-- *** --> (not displayed by the browser) Prologue <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 3.0 Prologue <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 3.0//EN"> Searchable <ISINDEX> (indicates a searchable index) N1.0 Prompt <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) N2.0 Base Window Name <BASE TARGET="***">(must be in header) Relationship <LINK REV="***" REL="***" HREF="URL"> (in header) Meta Information <META> (must be in header)
Contents | LIST OF TAGS | Plain Text Version | Kevin's Home Page