HTML TAGS

(A SELECTION)

Information taken from- THE BARE BONES GUIDE TO HTML by Kevin Werbach 1996
[The latest version of Werbach's document is available at: <http://werbach.com/barebones/>]



BASIC ELEMENTS (*=paired tags)

  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 (*=paired tags)

  Heading * <H?> </H?> (the spec. defines 6 levels)
  Align Heading* <H? ALIGN=LEFT|CENTER|RIGHT> </H?>
  Block Quote* <BLOCKQUOTE> </BLOCKQUOTE> (usually displayed as indented)
  Emphasis* <EM> </EM> (usually displayed as italic)
  Strong Emphasis* <STRONG> </STRONG> or <B> </B> (usually displayed as bold)
  Author's Address * <ADDRESS> </ADDRESS>
  Large Font Size* <BIG> </BIG>
  Small Font Size* <SMALL> </SMALL>

PRESENTATION FORMATTING (*=paired tags)

Bold* <B> </B>
Italic* <I> </I>  
Strikeout* <STRIKE> </STRIKE> (not widely implemented yet)
Subscript* <SUB> </SUB>
Superscript* <SUP> </SUP>
Typewriter * <TT> </TT> (displays in a monospaced font)
Preformatted* <PRE> </PRE> (display text spacing as-is)
Center * <CENTER> </CENTER> (for both text and images)
Font Size* <FONT SIZE=?> </FONT> (ranges from 1-7)
Font Color * <FONT COLOR="#••••••••"> </FONT>  

LINKS AND GRAPHICS (*=paired tags)

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 in Document* <A NAME="***"> </A>
Display Image <IMG SRC="URL">  
Alignment <IMG SRC="URL" ALIGN=TOP|BOTTOM|MIDDLE|LEFT|RIGHT>
Alternate <IMG SRC="URL" ALT="***"> (shows if image not displayed)
Dimensions <IMG SRC="URL" WIDTH=? HEIGHT=?> (in pixels)
Border <IMG SRC="URL" BORDER=?> (in pixels)
Runaround Space <IMG SRC="URL" HSPACE=? VSPACE=?> (in pixels)

DIVIDERS (*=paired tags)

Paragraph <P> </P> (closing tag is often unnecessary)
Align Text * <P ALIGN=LEFT|CENTER|RIGHT> </P>
Line Break <BR> (a single carriage return)
Clear Textwrap <BR CLEAR=LEFT|RIGHT|ALL>
Horizontal Rule <HR>
Alignment <HR ALIGN=LEFT|RIGHT|CENTER>
Thickness <HR SIZE=?> [in pixels)
Width (length] <HR WIDTH=?> (in pixels)
N1.0 Width Percent <HR WIDTH="%"> (as a percentage of page width)
Solid Line <HR NOSHADE> [without 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 (paired tags)

Unordered List <UL><LI></UL> (<LI> before each list item)
Compact <UL COMPACT></UL>
Bullet Type <UL TYPE=DISC|CIRCLE|SQUARE> (for the whole list)
Ordered List <OL><LI></OL> (<LI> before each list item)
Numbering Type <OL TYPE=A|a|I|i|1> (for the whole list)
Starting Number <OL START=?> (for the whole list)
Definition List <DL><DT><DD></DL> (<DT>=term, <DD>=definition)
Menu List <MENU><LI></MENU> (<LI> before each list item)

BACKGROUNDS AND COLORS

Bkground Color <BODY BGCOLOR="#$$$$$$"> (order is red/green/blue)
Text Color <BODY TEXT="#$$$$$$"> (used in body tag - otherwise use <FONT COLOR=)

SPECIAL CHARACTERS (these must all be in lower case)

Special Character code Special Character code
Registered TM &reg; & &amp;  
Copyright &copy;   " &quot;  

TABLES

Define Table <TABLE> </TABLE>  
Table Border <TABLE BORDER=?> </TABLE>  
Cell Spacing <TABLE CELLSPACING=?> (in pixels)  
Cell Padding <TABLE CELLPADDING=?> (in pixels)  
Desired Width <TABLE WIDTH=?> (in pixels)
Width Percent <TABLE WIDTH="%"> (percentage of page)
Table Row <TR></TR>
Alignment <TR ALIGN=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM|VALIGN=TOP|BOTTOM|MIDDLE>
Table Cell <TD></TD> (must appear within table rows)
Alignment <TD ALIGN=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM|VALIGN=TOP|BOTTOM|MIDDLE>
No linebreaks <TD NOWRAP>  
Columns to Span <TD COLSPAN=?>  
Rows to Span <TD ROWSPAN=?>  
N1.1 Desired Width <TD WIDTH=?> (in pixels)
N1.1 Width Percent <TD WIDTH="%"> (percentage of table)
N3.0b Cell Color <TD BGCOLOR="#••••••">
Table Header <TH></TH> (same as data, except bold centered)
Alignment <TH ALIGN=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM|VALIGN=TOP|BOTTOM|MIDDLE>
Columns to Span <TH COLSPAN=?>  
Rows to Span <TH ROWSPAN=?>  
N1.1 Desired Width <TH WIDTH=?> (in pixels)
N1.1 Width Percent <TH WIDTH="%"> (percentage of table)
N3.0b Cell Color <TH BGCOLOR="#••••••">