home    egovision web resource centre    

HTML Tags Encyclopaedia - Tags A-F

Comment

<!-- comment text -->

Allows you to add headings into your HTML code that aren't displayed on the page.
This can be useful when creating and editing large documents.

Escape Sequences

HTML2+&lt
HTML2+&gt
HTML2+&amp
HTML2+&quot
HTML3.2+ &nbsp

Used to enter characters such as <, >, &, and " into HTML documents.
There are escape sequences available for most characters- a list can be found on our Resources Page.
Use a space or semi-colon(;) after the mnemonic to indicate the end of the escape sequence; using a space will insert a space between the special character and the next part of the text, while using a semi-colon will not.

Anchor

<A NAME="name">
<A HREF="url">text</A>

Defines either a hyperlink or a named section in a document.
Must contain either a NAME attribute or an HREF attribute, or both.
REF="relationship" - defines the relationship between this document and the HREF URL.
REV="relationship" - defines the relationship between the HREF URL and this document.
It is the opposite (REVerse) of REF.
TITLE="name" - indicates the TITLE of the document pointed to by the HREF URL.
(Netscape Extension)(Microsoft Extension 3.0)TARGET="window" - loads the document linked by HREF into a specified window name.
This can also apply to a frame name if you're using frames
Preset TARGET names are.....
_blank - loads the link into a new blank window.
_self -loads the link into the same window.
_parent - loads the link into the parent of this document.
_top - loads the link into the full browser window (great for getting people unstuck from FRAMESETs).

Address

<ADDRESS> text </ADDRESS>

Defines text normally describing contact information of some kind.
html3+ NOWRAP - stops the browser from wrapping text except when <BR> tags are used.

Java Applet
html 3.2+n2+ ie4+
<APPLET attributes> content </APPLET>

Runs a Java applet in a page.
Content consists of optional PARAM tags, ordinary text and markup to be displayed by browsers that cannot run Java applets, and a TEXTFLOW tag if no ordinary text and markup is included.
The attributes of the APPLET tag are:
CODEBASE="base" - sets the base directory for pathing to applets..
CODE="code" - URL of the applet.
NAME=" name" - the name of the applet.
ALIGN="align" - either LEFT, RIGHT, TOP, MIDDLE, or BOTTOM.
ALT="text" - alternative text to be displayed by browsers that do not support applets.
HEIGHT="height" - height of the applet in pixels.
WIDTH="width" - width of the applet in pixels.
HSPACE="n" - leaves a space n pixels wide either side of the applet.
VSPACE="n" - leaves a space n pixels wide above and below the applet.
DOWNLOAD="n" - assign numbers to applets to determine the order in which they are downloaded.

Area
HTML 3.2+ n3+ ie2+
<AREA SHAPE="shape" ALT="text" CO-ORDS="x1,y1,x2,y2......" HREF="URL">

Only valid within MAP tags, defines areas that act as hotspots within an image.
Normally a map will have multiple AREA tags for multiple links.
SHAPE attribute can be one of RECT, CIRCLE, POLY or DEFAULT.
DEFAULT - maps all areas not already specified in another AREA tag (no co-ordinates are required).
CO-ORDS gives the co-ordinates, in pixels, measured from the upper left corner of the image, of the attributes of a shape.
RECT - co-ordinates in the form x1,y1,x2,y2,x3,y3,x4,y4 corresponting to left-top and right-bottom.
CIRCLE - x,y,radius - where x,y is the co-ordiate position of the centre point of the circle.
POLY - x1, y1, x2, y2, ... xn, yn. for each point of the polygon in turn.
NOHREF - clicks here will not cause a link to be followed.
n3+ie3+TARGET="window" - loads a document linked by HREF into a specified window.
This can also apply to a frame name if you're using frames
Preset TARGET names are.....
_blank - loads the link into a new blank window.
_self -loads the link into the same window.
_parent - loads the link into the parent of this document.
_top - loads the link into the full browser window (great for getting people unstuck from FRAMESETs).

Bold

<B> text </B>

Renders text in boldface. Also use STRONG.

Base

<BASE HREF="base-address">
N2+ ie3+ <BASE TARGET="target">

Valid only in the HEAD section, defines the base address of an HTML document.
This is used to set the full address of relative URL's that appear in the document.
Useful when moving an HTML document to another site without moving all the images and related documents as well, the base URL can be set to the original direectory.
The "target" is the target for all links unless specified explicitly.
Predefined target names are:
_blank - causes the link to be loaded into a new blank window.
_self - causes the link to be loaded into the same window the link was in.
_parent - causes the link to be loaded into the parent of this document.
_top - causes the link to be loaded into the full body of this window.
Base Font
ie2+
n1+
<BASEFONT SIZE="number">

Defines the base size that relative FONT changes (e.g. FONT="+2") are based on. (Default is 3.)
Background Sound
ie2+n4+
<BGSOUND SRC="URL">

Calls a .wav, .au or .mid file to be played when the page loads up.
LOOP="n" - causes the file to be played n times. (n must be a whole number above zero).
LOOP="INFINITE" - is annoying.
Big Text
ie3+
n2+ html3.2+
<BIG> text </BIG>

Renders text in a larger than normal style.
Blink
n1+ only
NETSCAPE ONLY
<BLINK> text </BLINK>

One of the all-time nasty tags.... it makes text flash on and off.
Blink is a Netscape Only tag.
Block Quote

<BLOCKQUOTE> text </BLOCKQUOTE>
HTML3+ <BQ> text </BQ>

Defines text that is quoted from elsewhere.
Many browsers display it indented.
HTML3+NOWRAP - stops the browser from wrapping except at a BR tag.
HTML3+ CLEAR = "attributes" - used to position a quote after a graphic(LEFT, RIGHT, or ALL) specifying which margin should be clear.

Body

<BODY> whole-document-body </BODY>

The body tag introduces the body of the document and should be used after the head section and contain the remainder of the document.
 HTML BACKGROUND="image URL" - specifies an image file to use as the background for the page.
 HTML BGCOLOR="#rrggbb" - sets the colour to be used for the background
 HTML TEXT="#rrggbb" - sets the colour to be used for the text
 HTML LINK="#rrggbb" - sets the colour to be used for links
 HTML ALINK="#rrggbb" - sets the colour to be used for active links
 HTML VLINK="#rrggbb" - sets the colour to be used for visited links
ie4+ LEFTMARGIN="number" - sets the margin at the left of the document, in pixels
ie4+ TOPMARGIN="number" - sets the margin at the top of the document, in pixels
ie4+ BGPROPERTIES="FIXED" - causes the BACKGROUND image to remain fixed as the document scrolls

Line Break

<BR>

Breaks the current line of text.
Not needed inside a PRE element.
There is no </BR> tag.
HTML 3.2 + CLEAR="clear" - can be LEFT or RIGHT, or ALL to break until both sides are clear.

Caption
 HTML N2+ ie3+
<CAPTION> text </CAPTION>

The caption tag defines the caption of a figure or table. It is valid only within FIG or TABLE tags.
ie3+ HALIGN="align" - sets the horizontal alignment . (LEFT, RIGHT and CENTER )
ie3+ VALIGN="align" - sets the vertical alignment (TOP or BOTTOM)
ie3+N2+ HTML ALIGN="align" - sets the alignment . (LEFT, RIGHT, CENTER, TOP or BOTTOM)

Center
n1+ HTML 3.2+ie2+
<CENTER> text</CENTER>

Defines text that should be centered.
Citation

<CITE> text </CITE>

Renders text often in italics depending on browser presets and should be used when citing a book or other work.
Code

<CODE> text </CODE>

Renders text in a fixed width font dependant on browser presets.
Most browsers use the same font for the KBD, SAMP, TT and CODE tags.

Table Column
ie3+ IE ONLY
<COL> content </COL>

The <COL> tag sets the properties of one table column at a time.
Not to be used with COLGROUP .
SPAN="number" - sets the number of rows for the column to span.
ALIGN="align" - sets the horizontal alignment of text in the column. (LEFT, RIGHT and CENTER )
Table Column Group
ie3+ IE ONLY
<COLGROUP> content </COLGROUP>

The COLGROUP tag sets the properties of one or more table columns.
ALIGN="align" -sets the horizontal alignment of text in the cells for the column group. (LEFT, RIGHT and CENTER )
VALIGN="align" - sets the vertical alignment for the column (TOP, MIDDLE and BOTTOM).
HALIGN="align" -sets the horizontal alignment of text in the cells for the column group. (LEFT, RIGHT and CENTER )
WIDTH="width" - specifies the width of each column in the column group.
SPAN="number - sets the number of consecutive columns for the group.
Definition
ie2+
html3.2+
<DFN> text </DFN>

Renders text often in italics depending on browser presets and should be used when defining a term.
Directory List

<DIR> list items </DIR>

Sets out a directory list with content made up of List Item (LI) tags without bullets or numbers before them.
<UL PLAIN WRAP=HORIZ> does exactly the same thing.
html3.2+ <DIR COMPACT> content </DIR> - short items can be displayed on the same line.

Division
N2+
 HTML ie4+
<DIV ALIGN=align>
<DIV =clear>
<DIV =lang>
HTML 3.0 <DIV CLASS=class>
HTML 3.0 <DIV CLASS=NOWRAP>

Used to divide a document up into different sections, such as chapters, sections, abstract, and appendix using the CLASS attribute.
LANG - indicates the ISO standard language using standard abbreviation.
ALIGN attribute (LEFT, RIGHT, or CENTER).
NOWRAP - prevents the browser from wrapping content except where <BR>'s are used.
Definition List

<DL> terms and definitions </DL>
<DT> term </DT>
<DD> definition </DD>

Sets out a list with content made up of terms (DT) and definitions (DD)which is made up of term (DT) and definition (DD) items.
DD elements should be contained singularly within DT tags
html3.2+<DL COMPACT>DT and DD tags </DL> - short terms can be displayed on the same line.
html3+ A list heading (LH) may be included before the first definition term.
Emphasized

<EM> text </EM>

Renders text often in italics depending on browser presets that should be emphasized.
Embed
 MS Explorer:
 Netscape:
<EMBED attributes> text </EMBED>

Embeds a plugin into a document.
text - is the alternative text to be displayed.
SRC="URL" - locates the object to be embedded.
UNITS=units - either PIXELS or EN - defines whether sizes are specified in pixels or en units.
HEIGHT="height" - specifies the height of the object in either pixels or en units.
WIDTH="width" - specifies the width of the object in either pixels or en units.
NAME="name" - indicates the name used by other objects or elements to refer to this object.
PALETTE=#rrggbb|#rrggbb - sets first foreground and then background colours.

Font
html3.2+
n1+ ie2+
<FONT> text </FONT>

Sets text with specific attributes other than that specified in the HEAD tag.
SIZE="number" - can be a whole number from 1 to 7 or + or - a whole number to change relative to basefont.
COLOR="#rrggbb" - sets the colour of the text.
ie2+n1+ FACE="face1, face2..." - specifies the face to be used, such as Arial, Times or Courier.
The first one listed that is installed on the client machine is used.
Form

<FORM ACTION=action base> form tags </FORM>
<FORM METHOD=method> form tags </FORM>
<FORM ENCTYPE=media type> form tags </FORM>
(Netscape Extension) (Microsoft Extension 3.0) <FORM ACTION=action base TARGET="target window">tags</FORM>
(HTML 3.0 Only)<FORM SCRIPT=URL> form tags </FORM>

The form tag introduces a form, which is made up of INPUT elements, described in the sections that follow.
A form may be inside structural HTML tags and may also contain structural tags. Using tables and other elements a form can take on various shapes and looks.
The ACTION attribute defaults to the document's base address.
The METHOD attribute can be GET or POST.
GET specifies a query form, used to get data from a server.
POST specifies a form that gives information to the server and perhaps causes a database to be updated or a message to be sent.
The SCRIPT attribute points to a script to be run.
The browser must be able to run the type of script that is specified.
The default media type is 'application/x-www-form-urlencoded', which specifies how the browser puts the user responses on the form together to form a response URL that is then submitted to the server.
If Target is specified then the output document will be loaded into the window specified by "target window name". The following are the predefined target names: _blank Will cause the link to be loaded into a new blank window. _self Will cause the link to be loaded into the same window the link was in. _parent Will cause the link to be loaded into the parent of this document. _top Will cause the link to be loaded into the full body of this window.
Frame
n2+
 ie3+
<FRAME attributes>

The frame tag appears inside the FRAMESET tag and specifies one frame in the frameset.
The attributes are: SRC="URL" The URL of the source document to be displayed in this frame. If the frame does not specify a source it will be displayed as blank space.
NAME=" name" - name allocated to this frame.
NAME is used by the TARGET attribute in the A, BASE, AREA, and FORM tags to load documents to this frame.
MARGINWIDTH=number - the left and right margin thickness in pixels.
MARGINHEIGHT=number - the top and bottom margin thickness in pixels.
SCROLLING=YES or NO or AUTO forced the browser to show or hide scrollbars AUTO lets the browser decide.
NORESIZE - stops the user from resizing the frame..
 ie3+ FRAMEBORDER=yes or no - specifies if the border should be displayed.
 ie3+ FRAMESPACING=number - the spacing between frames in pixels.
 ie3+n3+ ALIGN = "align" either LEFT, RIGHT, TOP, TEXTTOP, MIDDLE, ABSMIDDLE, BASELINE, BOTTOM, or ABSBOTTOM.

Frame Set
ie3+
n2+
<FRAMESET attributes> frame specifications </FRAMESET>

The FRAMESET tag replaces the BODY tag in a document and is used to split the documents window into a set of smaller frames.
FRAMESET tags can be nested to create more complicated frame layouts.
NOFRAME tags can also be placed in a frameset.
FRAMESET attributes are:
ROWS="heights" - specifies a list of values for the rows, each one can be specified as a percentage or a pixel value splitting the frameset vertically into frames based on these values. You can specify "*" too - these rows will have any remaining space split between them.
COLS= widths"specifies a list of values for the columns, each one can be specified as a percentage or a pixel value splitting the frameset horizontally into frames based on these values. You can specify "*" too - these columns will have any remaining space split between them.
Tag List
<!--
&tag;
A
ADDRESS
APPLET
AREA
B
BASE
BASEFONT
BGSOUND
BIG
BLINK
BLOCKQUOTE
BODY
BR
CAPTION
CENTER
CITE
CODE
COL
COLGROUP
DD
DFN
DIR
DL
DT
EM
EMBED
FONT
FORM
FRAME
FRAMESET
Hn
HEAD
HR
HTML
I
IFRAME
IMG
INPUT TYPE=CHECKBOX
INPUT TYPE=FILE
INPUT TYPE=HIDDEN
INPUT TYPE=IMAGE
INPUT TYPE=PASSWORD
INPUT TYPE=RADIO
INPUT TYPE=RANGE
INPUT TYPE=RESET
INPUT TYPE=SCRIBBLE
INPUT TYPE=SELECT
INPUT TYPE=SUBMIT
INPUT TYPE=TEXT
ISINDEX
KBD
LI
LINK
LISTING
MAP
MARQUEE
MENU
META
MULTICOL
NOBR
NOFRAMES
OBJECT
OL
P
PARAM
PLAINTEXT
PRE
SAMP
SCRIPT
SMALL
SPACER
STRIKE
STRONG
SUB
SUP
TABLE
TBODY
TD
TEXTAREA
TFOOT
TH
THEAD
TITLE
TR
TT
U
UL
VAR
WBR
XMP