The following is a compact reference to HTML tags. Each
tag is followed by a description, as well as any attributes that may be
included within the tag (for example the <FONT> markup may include
<FONT SIZE=+1 COLOR="red">); these attributes are followed by an equal
sign and an attribute Empty tags are not followed by an end marker (such
as <IMG>>), while container tags are indicated by ellipsis (for
example <BODY>.<BODY>).
| Tag |
Description |
Additional Attributes |
| <A>...</A> |
Anchor marking a link |
HREF=(URL)
NAME=(name)
TARGET=(name) |
| <AREA> |
Defines an area of an image map |
COORDS=(x, y, x, y)
HREF=(URL)
NOHREF
SHAPE=(rect, rectangle, circ, circle, poly, polygon)
TARGET=(name) |
| <B>...</B> |
Bold style text |
|
| <BLOCKQUOTE>... </BLOCKQUOTE> |
Indents text as a quote |
|
| <BODY>... </BODY> |
The main content of an HTML document |
ALINK=(colour)
BACKGROUND=(URL)
BGCOLOR=(background colour)
LINK=(colour)
TEXT=(colour)
VLINK=(colour) |
| <BR> |
Line break |
|
| <CAPTION>... </CAPTION> |
Applies a caption to a table |
ALIGN=(top, bottom) |
| <CENTER>... </CENTER> |
Centres page content |
|
| <DD>... </DD> |
Definition description |
|
| <DIR>...</DIR> |
Directory list, containing list items <LI> |
|
| <DL>...</DL> |
Definition list used for dictionary items with <DD>
and <DL> |
|
| <DT>... </DT> |
Definition Term |
|
| <EM>... </EM> |
Emphasis |
|
| <FONT>... </FONT> |
Font attributes |
SIZE=(+ or - number)
COLOR=(colour) |
| <FORM>...</FORM> |
Defines a form for user input |
ACTON=(URL)
METHOD=(GET, POST) |
| <FRAME>... </FRAME> |
Frame definition |
FRAMEBORDER=(yes, no)
MARGINHEIGHT= (number of pixels)
MARGINWIDTH= (number of pixels)
NAME=(name, _blank, _self, _parent, _top)
NORESIZE SCROLLING=(yes, no, auto)
SRC=URL |
| <FRAMESET>... </FRAMESET> |
Main divisions for frames on a page |
ROWS=(pixels, percent, number of characters)
COLS=(pixels, percent, number of characters) |
| <H1>... <H1> |
Level 1 heading; replace 1 with a number from 2-6 for
headings for levels 2-6 |
|
| <HR> |
Horizontal rule (line) across the page |
SIZE=(number of pixels)
WIDTH=(percent of page)
NOSHADE |
| <HEAD>... </HEAD> |
The head of a document containing information about
that document |
|
| <HTML>... </HTML> |
Defines the beginning and end of an HTML document |
|
| <I>... </I> |
Italics |
|
| <IMG> |
Places inline image on page |
SRC=(URL)
ALT=(alternative text)
ALIGN=(left, right, top, middle, bottom, texttop, absmiddle, baseline,
absbottom)
BORDER=(number of pixels)
HEIGHT=(number of pixels)
HSPACE=(number of pixels)
VSPACE=(number of pixels)
WIDTH=(number of pixels) |
| <INPUT> |
Defines input objects on forms |
ALIGN=(left, right, top, middle bottom, texttop, absmiddle,
baseline, absbottom)
CHECKED
HEIGHT=(number of pixels)
MAXLENGTH=(number of characters)
NAME=(name)
SIZE=(number of characters)
SRC=(URL)
TYPE=(TEXT, CHECKBOX, RADIO, SUBMIT, RESENT, HIDDEN, IMAGE)
VALUE=(text)
WIDTH=(number of pixels) |
| <LI>... </LI> |
List Item |
|
| <MAP>... </MAP> |
Client-side image map |
NAME=(name) |
| <MENU>... </MENU> |
Menu list using LI |
|
| <NOFRAMES>... </NOFRAMES> |
Displays alternative content for browsers that cannot
support frames |
|
| <OL>... </OL> |
Ordered list using LI |
START=(number)
Type=(name) |
| <P>... </P> |
Paragraph break |
|
| <PRE>... </PRE> |
Preformatted text |
|
| <SMALL>... </SMALL> |
Smaller font for text |
|
| <STRONG>... </STRONG> |
Strong emphasis |
|
| <SUB>... </SUB> |
Subscript |
|
| <SUP>... </SUP> |
Superscript |
|
| <TABLE>... </TABLE> |
Defines a table |
ALIGN=(left, right)
BGCOLOR=(Background colour)
BORDER=(number of pixels)
CELLPADDING= (number of pixels)
CELLSPACING=(number of pixels)
RULES=(none, basic, rows) |
| <TD>... </TD> |
Table data cell |
ALIGN=(left, center, right)
COLSPAN=(number)
ROWSPAN=(number)
VALIGN=(top, middle, bottom) |
| <TH>... </TH> |
Table header cell with bold, centred contents |
ALIGN=(left, center, right)
COLSPAN=(number)
ROWSPAN=(number)
VALIGN=(top, middle, bottom) |
| <TITLE>... </TITLE> |
Document title, included in document head |
|
| <TR>... </TR> |
Table row |
ALIGN=(left, center, right)
VALIGN=(top, middle, bottom) |
| <U>... </U> |
Underline |
|
| <UL>... </UL> |
Unordered list using LI |
TYPE=(circle, disc, square) |
| |
|
|