Welcome to HTML
HTML (Hypertext Markup Language) is a group of commands used to create
pages for the world-wide-web. It's a way of describing how a set of
text and images should be displayed to the viewer, similar in concept
to a newspaper editor's markup symbols.
There are many resources available about HTML and the world wide web.
To see a list of such sites, go to our Online
Web Guide. Here are some of the basic HTML tags that might be
useful. Another really good guide is Network Communication
Design. We would highly suggest it.
Information about this guide:
Any attributes are optional.
If you would like further information about any of the tags, feel free
to talk to one of the TAs.
[Basics][General
Formatting][Links][Lists][Multimedia][Tables]
Basics
<!-- ..... -->
Comment Tag
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
3.2//EN">
HTML 3.2 First Tag; Necessary if
you are using any HTML 3.2 Tags
<HTML>.....< /HTML>
Encloses
an HTML Document
<HEAD>.....< /HEAD>
Header
Tag
- <TITLE>.....< /TITLE>-- Title Tag
<BODY attribute1="..." attribute2="...">.....<
/BODY>
Encloses the main body of the
document. Attributes:
- ALINK="..."-- Specifies the color of the
activated links in the page.
- BACKGROUND="..."-- Specifies an image to be tiled as background.
- BGCOLOR="..."-- Specifies the background color.
- LINK="..."-- Specifies the color of the links in the page.
- TEXT="..."-- Specifies the color of the text in the page.
- VLINK="..."-- Specifies the color of the followed links in
the page.
Note: color is always expressed as RGB (Red Green Blue), where
each color has a value between 0 and 255 expressed in hex notation.
To get a complete listing of colors, run xcolorsel and change the
display format to "8 bit truncated rgb"
<BASEFONT attribute="...">
Sets the
default font properties for the entire page. Attributes:
- SIZE="..."-- Sets the size of the font to any number
between 1 and 7 with 3 being default. Relative sizes
also work, e.g. SIZE=+2 .
- COLOR="..."-- Specifies the default font color for the page.
- Name="..."-- Specifies the typeface of the default font.
<Hn>...< /Hn>
Changes the
heading size where n=1-6 (6 being the smallest)
[Basics][General
Formatting][Links][Lists][Multimedia][Tables]
General Formatting
<B>...< /B>
Makes text bold
<BR>
Inserts a break in the line.
Attributes:
- CLEAR="..."--Causes the text to stop flowing around any
images. Possible values are RIGHT, LEFT, or ALL.
<CENTER>.....< /CENTER>
Centers the enclosed elements (pictures, text, etc.)
<FONT attribute="...">...< /FONT>
Sets the font properties for the enclosed text.
- SIZE="..."-- Sets the size of the font to any number
between 1 and 7 with 3 being default. relative sizes also work,
e.g. SIZE=+2 .
- COLOR="..."-- Specifies the color of the font.
- FACE="..."-- Specifies the face of the font. A list can be
defined (separated by commas) and the browser will use the first one
available on that computer.
<HR attribute1="..." attribute2="...">
Inserts a horizontal line. Attributes:
- SIZE="..."-- Specifies the thickness of the line.
- WIDTH="..."-- Specifies the length of the line as a
percentage of the screen. e.g. WIDTH=90%
- ALIGN="..."-- Specifies the alignment of the line: RIGHT,
LEFT, or CENTER.
- NOSHADE-- The line is drawn solid.
<I>...< /I>
The enclosed text
is in italics.
<NOBR>.....< /NOBR>
Causes
the enclosed text to not wrap to fit the screen.
<PRE>.....< /PRE>
Displays
text in fixed-width type without collapsing spaces.
<S>.....< /S>
Displays text
with a line through it.
<SPACER attribute>...< /SPACER>
Inserts blocks of spaces into Netscape HTML documents only.
Attributes:
- ALIGN="..."-- When TYPE=BLOCK, this specifies the alignment
of the surrounding text. Values: RIGHT, LEFT
- HEIGHT="..."-- When TYPE=BLOCK, this specifies the height
of the block.
- SIZE="..."-- When TYPE=HORIZONTAL, or VERTICAL, this
specifies the size of the space.
- TYPE="..."-- Specifies the type of space being inserted.
Values: HORIZONTAL, VERTICAL, BLOCK
- WIDTH="..."-- When TYPE=BLOCK, this specifies the width of
the block.
<U>...< /U>
The enclosed text
in underlined.
[Basics][General
Formatting][Links][Lists][Multimedia][Tables]
Links
<A attribute="...">...< /A>
When combined with the HREF atribute, the enclosed text and/or
graphic becomes a link to another document or anchor. When used with
the NAME attribute, the enclosed text and/or graphic becomes an
anchor.
- HREF="..."-- Specifies the URL of the document to be linked
to. (You can also link to a sound by giving it the path of a sound
file. When clicked, that sound will play.)
- NAME="..."-- Specifies the name of the anchor you are
creating. The link would read <A HREF="#NAME>
- onClick="..."-- Specifies a script to be activated when the
mouse is clicked.
- onMouseOver="..."-- Specifies a script to be activated when
the mouse is moved over the link.
- TITLE="..."-- Specifies the title that appears when the
link is selected, but not yet clicked.
[Basics][General
Formatting][Links][Lists][Multimedia][Tables]
Lists
<DL>...< /DL>
Creates a
definition list. Within this container, <DT> specifies a
definition term and <DD> specifies the definition.
<UL attribute>...< /UL>
Puts
the enclosed items marked with <LI>, in a bulleted list.
Attributes:
- TYPE="..."-- Specifies the type of numbering used to label
the item. Possible values are: A, a, I, i, 1.
- START="..."-- Specifies the starting value for the
numbering.
<OL attribute>...< /OL>
Puts
the enclosed items marked with <LI>, in a numbered
list. Attributes:
- TYPE="..."-- Specifies the type of numbering used to label
the item. Possible values are: A, a, I, i, 1.
- START="..."-- Specifies the starting value for the
numbering.
[Basics][General
Formatting][Links][Lists][Multimedia][Tables]
Multimedia
<IMG attribute1 attribute2>
Places
an image into the document
- SRC="..."-- Specifies the URL of the image.
- BORDER="..."-- Specifies the width of the border drawn
around the image. If BORDER is set to "0", there will be no border
even around pictures that are links.
- ALIGN="..."-- Specifies the alignment of the image. Values:
Left or Right
[Basics][General
Formatting][Links][Lists][Multimedia][Tables]
Tables
<TABLE attribute1="..." attribute2="...">...<
/TABLE>
Creates a table. Attributes:
- BORDER="..."-- Specifies the width of the border around the
table. If set to 0, there will be no border.
- BGCOLOR="..."-- Specifies the background color of the table.
- BORDERCOLOR="..."-- Specifies the border color of the table.
- WIDTH="..."-- Specifies the width of the table on the page.
- CELLSPACING="..."-- Specifies the amount of space between
the cells in the table.
- CELLPADDING="..."--Specifies the amount of space between
the edges of the cell and the text inside.
- HEIGHT="..."-- Specifies the height of the table on the
page.
<TR attribute1="..." attribute2="...">...<
/TR>
Specifies a table row. It can enclose
the table heading and table data. Attributes:
- ALIGN="..."-- Specifies the horizontal alignment of the row
contents. Values: LEFT, RIGHT, and CENTER.
- BGCOLOR="..."-- Specifies the background color for the row.
- BORDERCOLOR="..."-- Specifies the border color of the row.
- VALIGN="..."-- Specifies the vertical alignment of the row
contents. Values: TOP, MIDDLE, BOTTOM, and BASELINE.
- HEIGHT="..."-- Specifies the height of the cell.
<TH attribute1="..." attribute2="...">...<
/TH>
Makes the cell a table heading.
Attributes:
- ALIGN="..."-- Specifies the horizontal alignment of the
cell contents. Possible values are LEFT, RIGHT, and CENTER.
- NOWRAP-- Prevents word wrapping within the cell
- BGCOLOR="..."-- Specifies the background color for the cell.
- BORDERCOLOR="..."-- Specifies the border color of the row.
- VALIGN="..."-- Specifies the vertical alignment of the row
contents. Values: TOP, MIDDLE, BOTTOM, and BASELINE.
- HEIGHT="..."-- Specifies the height of the cell.
- ROWSPAN="..."-- Specifies the number of rows the cell will span.
- COLSPAN="..."-- Specifies the number of columns the cell will span.
<TD attribute1="..." attribute2="...">
These go inside the TR tags and they define the data in a
cell. Attributes:
- ALIGN="..."-- Specifies the horizontal alignment of the
cell contents. Possible values are LEFT, RIGHT, and CENTER.
- NOWRAP-- Prevents word wrapping within the cell
- BGCOLOR="..."-- Specifies the background color for the cell.
- BORDERCOLOR="..."-- Specifies the border color of the row.
- VALIGN="..."-- Specifies the vertical alignment of the row
contents. Values: TOP, MIDDLE, BOTTOM, and BASELINE.
- HEIGHT="..."-- Specifies the height of the cell.
- ROWSPAN="..."-- Specifies the number of rows the cell will span.
- COLSPAN="..."-- Specifies the number of columns the cell will span.

HOME