HTML Reference

Basic Tags
<HTML></HTML> Embraces the entire HTML document
<HEAD></HEAD> Embraces the title and other information that isn't displayed on the Web page itself (see Header Tags)
<BODY></BODY> Embraces the visible portion of the document
<BODY BGCOLOR=?></BODY> Sets the background color using hex color value (see colors)
<BODY TEXT=?></BODY> Sets the text color using hex color value (see colors)
<BODY LINK=?></BODY> Sets the color of links using hex color value (see colors)
<BODY VLINK=?></BODY> Sets the color of followed links using hex color value (see colors)
<BODY ALINK=?></BODY> Sets the color of links on click using hex color value (see colors)
<BODY BACKGROUND=?></BODY> Sets background image (eg. ?="filename.gif", use narrow image for bar)
 
Header Tags
<TITLE></TITLE> Puts the name of the document in the title bar
<META NAME="description" CONTENT="?"> Give description of web page for search engines (up to about 1000 characters)
<META NAME="keywords" CONTENT="?"> Give keywords for search engines (eg. ?=keyword1, keyword2)
<META NAME="author" CONTENT="?"> Give name of page author
<META NAME="generator" CONTENT="?"> Give HTML editor used (eg. ?=Netscape Composer 4.5)
<META HTTP-EQUIV="refresh" CONTENT="?; URL=??"> Switch to URL ?? after ? seconds (eg. ?=2, ??=http://www.hlrs.de)
 
Formatting
<!--COMMENT--> Creates a comment
<PRE></PRE> Creates preformatted text (include all spaces and line breaks as entered)
<H?></H?> Creates a headline (?=1..6(smallest))
<B></B> Creates bold text
<I></I> Creates italic text
<U></U> Creates underlined text
<TT></TT> Creates typewriter-style text
<BASEFONT SIZE=?> Sets default font size, referenced by relative font size changes
<FONT SIZE="?"></FONT> Sets absolute/relative size of font (?=1..7(largest) or ?=+1 or ?=-1)
<FONT COLOR="?"></FONT> Sets the font color of links using hex color value (see colors)
<FONT FACE="?"></FONT> Sets font type (?=ARIAL | COSMIC SANS | HELVETICA | LUCIDA SANS; offer multiple fonts for flexibility)
<BR> Inserts a line break (&nbsp;<BR> for blank line)
<P>[</P>] Creates a new paragraph (similar to <BR> + CR)
<P ALIGN=?>[</P>] Aligns a paragraph (?=LEFT | RIGHT | CENTER)
<CENTER></CENTER> Centers anything inbetween
<BLOCKQUOTE></BLOCKQUOTE> Indents text from both sides
<DL>[</DL>] Creates a definition list (see <DT> and <DD>)
<DT>[</DT>] Precedes each definition term (see <DL>)
<DD>[</DD>] Precedes each definition (see <DL>)
<OL></OL> Creates an ordered (=numbered) list (see <LI>)
<UL></UL> Creates an unordered (=bulleted) list (see <LI>)
<LI>[</LI>] Precedes each list item, and adds the number or bullet (see <UL>/<OL>)
 
Anchor Tags
<A HREF="?"></A> Creates a hyperlink (eg. ?=http://www.hlrs.de)
<A HREF="mailto:?"></A> Creates an email link (eg. ?=jsd@hlrs.de)
<A NAME="?"></A> Creates a target location within a document (eg. ?=destination)
<A HREF="[URL]#?"></A> Links to that target location from elsewhere in the document (eg. ?=destination, URL is optional)
 
Graphical Elements
<IMG SRC="?"> Adds an image (eg. ?=../images/filename.gif)
<IMG SRC="?" ALIGN=??> Aligns an image (??=LEFT | RIGHT | CENTER | BOTTOM | TOP | MIDDLE)
<IMG SRC="?" BORDER=??> Sets size of border around an image (??=0 for no border)
<IMG SRC="?" WIDTH=??> Sets width of image (eg. ??=320)
<IMG SRC="?" HEIGHT=??> Sets height of image (eg. ??=200)
<IMG SRC="?" ALT="??"> Sets alternative textual description in case image cannot be shown (eg. ??=Portrait)
<IMG SRC="?" HSPACE=??> Sets empty pixel space left and right of image (eg. ??=5)
<IMG SRC="?" VSPACE=??> Sets empty pixel space above and below image (eg. ??=5)
<HR> Inserts a horizontal rule (100 % of screen width)
<HR SIZE=?> Sets size (height) of rule in pixels (eg. ?=5)
<HR WIDTH=?> Sets width of rule, in percentage of screen width, or absolute value in pixels (eg. ?="20%", ?=150)
<HR NOSHADE> Creates a rule without a shadow (solid line)
<HR WIDTH=? ALIGN=??> Creates an aligned rule (??=LEFT | RIGHT | CENTER)
 
Tables
<TABLE></TABLE> Creates a table
<TABLE BORDER=?></TABLE> Sets width of border around table cells (eg. ?=0)
<TABLE CELLSPACING=?></TABLE> Sets amount of space between table cells (eg. ?=0)
<TABLE CELLPADDING=?></TABLE> Sets amount of space between a cell's border and its contents (eg. ?=0)
<TABLE WIDTH=?></TABLE> Sets width of table (pixels or percentage of window width, eg. ?=300 or ?="100%"))
<TABLE HEIGHT=?></TABLE> Sets height of table (pixels or percentage of window height, eg. ?=200 or ?="100%"))
<TABLE ALIGN=?></TABLE> Sets horizontal table alignment (?=LEFT | CENTER | RIGHT)
<TABLE VALIGN=?></TABLE> Sets vertical table alignment (?=TOP | MIDDLE | BOTTOM)
<TABLE BGCOLOR=?></TABLE> Sets the background color using hex color value (see colors)
<CAPTION></CAPTION> Write caption text above or below table
<CAPTION ALIGN=?></CAPTION> Align caption (?=TOP | BOTTOM | LEFT | RIGHT)
<TR>[</TR>] Sets off each row in a table
<TR ALIGN=?> Sets alignment for cells in row(?=LEFT | CENTER | RIGHT)
<TR VALIGN=?> Sets vertical alignment for cells in row (?=TOP | MIDDLE | BOTTOM)
<TD>[</TD>] Sets off each cell in a row
<TH>[</TH>] Sets off the table header (a normal cell with bold, centered text)
<TD | TH ALIGN=?> Sets alignment for cell (?=LEFT | CENTER | RIGHT)
<TD | TH VALIGN=?> Sets vertical alignment for cell (?=LEFT | CENTER | RIGHT)
<TD | TH BGCOLOR=?> Sets the background color using hex color value (see colors)
<TD | TH HEIGHT=?> Sets height for cell in pixels (eg. ?=30)
<TD | TH WIDTH=?> Sets width for cell in pixels (eg. ?=60)
<TD | TH COLSPAN=?> Sets number of columns a cell should span (default=1, eg. ?=2)
<TD | TH ROWSPAN=?> Sets number of rows a cell should span (default=1, eg. ?=2)
<TD | TH NOWRAP> Prevents the lines within a cell from being broken to fit
<TD | TH <A HREF="?"></A>> Include external source (eg. images with links)
 
Frames
<FRAMESET COLS="?,*"></FRAMESET> Creates two vertical frames, left frame is ? pixels wide, right frame uses rest of screen
<FRAME SRC="?" NAME="??">[</FRAME>] Lists name (?) of HTML files to be used as frame contents. This frame can later be referred to as ??
<NOFRAMES></NOFRAMES> Encloses <BODY> giving ASCII information for browsers that do not support frames
<A HREF="?" TARGET="??"></A> Anchor tag for frame contents which is an HTML page named ? and which will be displayed in frame named ?? (special values: _blank, _self, _parent, _top)
 
Java Applets
<APPLET CODE="?1" CODEBASE="?2"
WIDTH=?3 HEIGHT=?4
ALIGN=?5 HSPACE=?6
VSPACE=?7>?8</APPLET>
Include a Java applet. The parameters are:
?1: Name of Java file, eg. ?1=HelloWorld.class
?2: Base URL or subdirectory for Java classes, eg. ?2=classes
?3: Width of Java applet window in pixels, eg. ?3=400
?4: Height of Java applet window in pixels, eg. ?4=300
?5: Alignment of applet window, ?5=LEFT | RIGHT | TOP | MIDDLE | BOTTOM
?6: Horizontal pixel space around applet, eg. ?6=5
?7: Vertical pixel space around applet, eg. ?7=5
?8: Text appearing if Java applet cannot be started, eg. ?=Java not supported.
 
Special Characters
&nbsp;Non breaking space (" ")
&?uml;Umalut (?=a,A,o,O,u,U)
&lt;Less than ("<")
&gt;Greater than (">"
&amp;Ampersand ("&")
&quot;Quotation mark ('"')
&shy;Soft hyphen ("-")
&szlig;Sharp s ("ß")
&?grave;Accent grave (?=a,A,e,E,u,U,i,I)
&?acute;Accent egu (?=a,A,e,E,u,U)
&copy;Copyright sign
&sect;Paragraph sign ("§")
 
Colors
#000000Black
#000080Navy
#0000FFBlue
#008000Green
#008080Teal
#00FF00Lime Green
#00FFFFCyan
#800000Maroon
#800080Purple
#808000Olive
#808080Gray
#C0C0C0Silver
#FF0000Red
#FF00FFMagenta
#FFFF00Yellow
#FFFFFFWhite
 
URLs
http://www.hotwired.com/webmonkey/reference Original source of this reference document
http://jeffglover.com Top 10 sucky things on web pages etc.
http://htmlhelp.com/reference/wilbur/list.html Reference to all HTML tags
http://junior.apk.net/~jbarta/tutor/makapage Excellent web page design tutorial