0% found this document useful (0 votes)
42 views50 pages

Master's Referenceo To HTML 4.0-21-70

This document describes the HTML <COLGROUP> element which is used to group table columns and specify common attributes for those columns. It lists attributes like ALIGN, CHAR, CHAROFF, ID, SPAN, WIDTH, and VALIGN and provides examples of their usage.

Uploaded by

DevD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views50 pages

Master's Referenceo To HTML 4.0-21-70

This document describes the HTML <COLGROUP> element which is used to group table columns and specify common attributes for those columns. It lists attributes like ALIGN, CHAR, CHAROFF, ID, SPAN, WIDTH, and VALIGN and provides examples of their usage.

Uploaded by

DevD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

22 <CODE>

Standard: HTML 4 CHAR=“…”


E

Common: No
Sample: Specifies the character on which cell contents
will align, if ALIGN=“CHAR”. If you omit CHAR=,
<CODE TITLE=”C Code”>exit(1);</CODE>
C

the default value is the decimal point in the


Other Attributes specified language.
Standard: HTML 4
N

This tag also accepts the lang, dir, onClick,


onDblClick, onMouseDown, onMouseUp,
Common: No
Sample:
onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes. <COL ALIGN=”CHAR” CHAR=”,”>
E

See the Element-Independent Attributes section


CHAROFF=“n”
of this reference for definitions and examples.
R

Specifies the number of characters from the


left at which the alignment character appears..
<COL>
Standard: HTML 4
E

Specifies attributes for a table column. Common: No


Standard: HTML 4 Sample:
F

Common: No <COL ALIGN=”CHAR” CHAR=”,” CHAROFF=”7”>


Paired: No
Sample: ID=“…”
E

<TABLE> Assigns a unique ID selector to an instance of


<COLGROUP> the <COL> tag. When you assign a style to that
R

<COL ALIGN=”RIGHT”> ID selector, it affects only that one instance of


<COL ALIGN=”CENTER”> the <COL> tag.
<TR> <TD>This cell is aligned right</TD>
<TD>This cell is centered</TD> Standard: HTML 4
</TR> Common: No
</TABLE> Sample:
S

<COL ID=“123”>
Attribute Information
SPAN=“n”

ALIGN=“{LEFT, RIGHT, CENTER,


Indicates the number of columns in the group.
JUSTIFY, CHAR}”
R

Standard: HTML 4
Specifies how text within the table columns Common: No
will line up with the edges of the table cells, or Sample:
E

if ALIGN=CHAR, on a specific character (the deci-


mal point). <COLGROUP>
<COL ALIGN=”RIGHT” SPAN=”2”>
T

Standard: HTML 4
Common: No STYLE=“…”
Sample:
Specifies Style Sheet commands that apply to
S

<COL ALIGN=”CENTER”> the contents of the <COL> tags.


Standard: HTML 4
A

Common: No
Sample:
<COL STYLE=”background: black”>
M
<COLGROUP> 23 1

TITLE=“…” <COLGROUP>
Specifies text assigned to the tag. You might Specifies characteristics for a group of table
use this attribute for context-sensitive help columns.
within the document. Browsers may use this to
show tool tips over the table column. Standard: HTML 4
Common: No
Standard: HTML 4 Paired: Yes
Common: No Sample:
Sample:
<TABLE>
<COL TITLE=”Table column”> <COLGROUP VALIGN=”TOP”>
<COL ALIGN=”RIGHT”>
WIDTH=“n” <COL ALIGN=”CENTER”>
Specifies the horizontal dimension of a column <TR>
(in pixels or as a percentage). Special values of <TD>This cell is aligned top and
right</TD>
“0*” force the column to the minimum
<TD>This cell is aligned top and
required width, and “2*” requires that the col-
centered</TD>
umn receive proportionately twice as much </TR>
space as it otherwise would. </TABLE>
Standard: HTML 4
Common: No Attribute Information
Sample:
ALIGN=“{LEFT, RIGHT, CENTER,
<COL WIDTH=”100”>
JUSTIFY, CHAR}”
VALIGN=“{TOP, BOTTOM, BASELINE, Specifies how text within the table columns
MIDDLE}” lines up with the edges of the table cells, or if
Vertically positions the contents of the table ALIGN=CHAR, on a specific character (the deci-
column. VALIGN=”TOP” positions the contents mal point).
flush with the top of the column. VALIGN= Standard: HTML 4
”BUTTON” positions the contents flush with the Common: No
bottom. VALIGN=”CENTER” positions the con- Sample:
tents at the center of the column. VALIGN=
<COLGROUP ALIGN=”CENTER”>
”BASELINE” aligns the contents with the base-
line of the current text font. CHAR=“…”
Standard: HTML 4 Specifies the character on which cell contents
Common: No align, if ALIGN=”CHAR”. If you omit CHAR=, the
Sample:
default value is the decimal point in the speci-
<COL VALIGN=”TOP”> fied language.
Other Attributes Standard: HTML 4
Common: No
This tag also accepts the lang, dir, onClick, Sample:
onDblClick, onMouseDown, onMouseUp,
<COLGROUP ALIGN=”CHAR” CHAR=”,”>
onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section
of this reference for definitions and examples.
24 <COLGROUP>

CHAROFF=“n” Standard: HTML 4


E

Common: No
Specifies the number of characters from the Sample:
left at which the alignment character appears.
<COLGROUP TITLE=”Column Group”>
C

Standard: HTML 4
Common: No WIDTH=“n”
Sample:
N

Specifies the horizontal dimension of columns


<COLGROUP ALIGN=”CHAR” CHAR=”,” within the column group (in pixels or as a per-
CHAROFF=”7”> centage). Special values of “0*” force the col-
umn to minimum required width, and “2*”
E

ID=”…”
requires that the column receive proportion-
Assigns a unique ID selector to an instance of ately twice as much space as it otherwise
R

the tag. When you then assign a style to that would.


ID selector, it affects only that one instance of
Standard: HTML 4
the tag. Common: No
E

Standard: HTML 4 Sample:


Common: No <COLGROUP WIDTH=100>
Sample:
F

<COL ALIGN=”RIGHT”>
<COLGROUP ID=“123”>
VALIGN=“{TOP, BOTTOM, BASELINE,
E

SPAN=“n” MIDDLE}”
Indicates how many consecutive columns exist Vertically positions the contents of the table
R

in the column group and to which columns column. VALIGN=”TOP” positions the contents
the specified attributes apply. flush with the top of the column. VALIGN=
”BOTTOM” positions the contents flush with the
Standard: HTML 4
bottom. VALIGN=”CENTER” positions the con-
Common: No
Sample: tents at the vertical center of the column.
S

VALIGN=”BASELINE” aligns the contents with the


<COLGROUP> baseline of the current text font.
<COL ALIGN=”RIGHT” SPAN=”2”>
Standard: HTML 4

STYLE=“…” Common: No
Sample:
R

Specifies Style Sheet commands that apply to


the contents of the <COLGROUP> tags. <COLGROUP VALIGN=”TOP”>
Standard: HTML 4 Other Attributes
E

Common: No
Sample: This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp,
T

<COLGROUP STYLE=”color: red”> onMouseOver, onMouseMove, onMouseOut,


TITLE=“…” onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section
S

Specifies text assigned to the tag. You might of this reference for definitions and examples.
use this attribute for context-sensitive help
A

within the document. Browsers may use this to


show tool tips over the column group.
M
<DD> 25 1

<COMMENT> ID=“…”

Indicates an author comment. Because these Assigns a unique ID selector to an instance of


tags are Netscape-specific, we encourage you to the <DD> tag. When you then assign a style to
use the <!––…––> tags instead. that ID selector, it affects only that one
instance of the <DD> tag.
Standard: Netscape Navigator
Common: Yes Standard: HTML 4
Paired: Yes Common: No
Sample: Sample:

<COMMENT>This document was created <DL>


September 19, 1997</COMMENT> <DT>RS-232C
<DD ID=“123”>A standard for serial
communication between computers.

D </DL>
STYLE=“…”
Specifies Style Sheet commands that apply to
<DD> the definition.
Contains a definition in a definition list. Use Standard: HTML 4
this tag inside <DL> tags. This tag can contain Common: No
block level elements. Sample:

Standard: HTML 2 <DD STYLE=”background: blue; color: white”>


Common: Yes TITLE=“…”
Paired: Yes, optional
Sample: Specifies text assigned to the tag. You might
<DL><DT>Butter use this attribute for context-sensitive help
<DD>Butter is a dairy product. within the document. Browsers may use this to
</DL> show tool tips over the definition.
Standard: HTML 4
Attribute Information Common: No
Sample:
CLASS=“…”
<DD TITLE=”Definition”>
Indicates which style class applies to the <DD>
element. Other Attributes
Standard: HTML 4 This tag also accepts the lang, dir, onClick,
Common: No onDblClick, onMouseDown, onMouseUp,
Sample: onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes.
<DL>
See the Element-Independent Attributes section
<DT>HTML
<DD CLASS=”casual”>Hypertext Markup of this reference for definitions and examples.
Language
</DD>
26 <DEL>

<DEL> ID=“…”
E

Indicates text marked for deletion in the docu- Assigns a unique ID selector to an instance of
ment. May be either block-level or inline, as the tag. When you then assign a style to that
C

necessary. ID selector, it affects only that one instance of


the <DEL> tag.
Standard: HTML 4
Standard: HTML 4
N

Common: No
Paired: Yes Common: No
Sample: Sample:
<DEL ID=“123”>WWW stands for World Wide
E

<P>HTTP stands for HyperText


Transfer <DEL>Transport</DEL>Protocol</P> Web</DEL>
STYLE=“…”
Attribute Information
R

Specifies Style Sheet commands that apply to


CITE=“url” the deleted text.
E

Indicates address of reference (definitive Standard: HTML 4


source, for example) for deletion. Common: No
Sample:
F

Standard: HTML 4
Common: No <DEL STYLE=”background: blue;
color: white”>ESP stands for
E

Sample:
extra-sensory perception.</DEL>
<DEL CITE=”http://www.w3.org/”>HTML 3.0 was
used for 10 years.</DEL> TITLE=“…”
R

CLASS=“…” Specifies text assigned to the tag. You might


use this attribute for context-sensitive help
Indicates which style class applies to the <DEL> within the document. Browsers may use this to
element. show tool tips over the text.
S

Standard: HTML 4 Standard: HTML 4


Common: No Common: No
Sample: Sample:

<DEL CLASS=”casual”>POP stands for Post <DEL TITLE=”Definition”>


Office Protocol</DEL> More deleted text.</DEL>
R

DATETIME=“…” Other Attributes


Indicates the date and time in precisely this
E

This tag also accepts the lang, dir, onClick,


format: YYYY-MM-DDThh:mm:ssTZD. For example, onDblClick, onMouseDown, onMouseUp,
1997-07-14T08:30:00-07:00 indicates July 14, onMouseOver, onMouseMove, onMouseOut,
T

1997, at 8:30 AM, in U.S. Mountain Time (7 onKeyPress, onKeyDown, and onKeyUp attributes.
hours from Greenwich time). This time could See the Element-Independent Attributes section
also be presented as 1997-07-14T08:30:00Z. of this reference for definitions and examples.
S

Standard: HTML 4
Common: No
Sample: <DFN>
A

<DEL DATETIME=”1997-07-14T08:30:00Z”>POP Indicates the definition of a term in the


stands for Post Office Protocol</DEL> document.
M

Standard: HTML 3.2


Common: No
<DIR> 27 1

Paired: Yes Standard: HTML 4


Sample: Common: No
Sample:
<DFN>HTTP stands for HyperText
Transfer Protocol</DFN> <DFN TITLE=”Definition”>

Attribute Information Other Attributes


This tag also accepts the lang, dir, onClick,
CLASS=“…” onDblClick, onMouseDown, onMouseUp,
Indicates which style class applies to the <DFN> onMouseOver, onMouseMove, onMouseOut,
element. onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section
Standard: HTML 4 of this reference for definitions and examples.
Common: No
Sample:
<DFN CLASS=”casual”>POP stands for Post <DIR>
Office Protocol</DFN> Contains a directory list. Use the <LI> tag to
ID=“…” indicate list items within the list. Use <UL>,
rather than this deprecated tag.
Assigns a unique ID selector to an instance of
the <DFN> tag. When you then assign a style to Standard: HTML 2; deprecated in HTML 4.
Use <UL> instead.
that ID selector, it affects only that one
Common: Yes
instance of the <DFN> tag. Paired: Yes
Standard: HTML 4 Sample:
Common: No Choose a music genre:<DIR>
Sample: <LI><A HREF=”rock/”>Rock</A>
<DFN ID=“123”>WWW stands for World Wide <LI><A HREF=”country/”>Country</A>
Web</DFN> <LI><A HREF=”na/”>New Age</A>
</DIR>
STYLE=“…”
Specifies Style Sheet commands that apply to
Attribute Information
the definition.
CLASS=“…”
Standard: HTML 4
Common: No Indicates which style class applies to the <dir>
Sample: element.

<DFN STYLE=”background: blue; Standard: HTML 4


color: white”>ESP stands for Common: No
extra-sensory perception.</DFN> Sample:

TITLE=“…” <DIR CLASS=”casual”>


<LI>Apples
Specifies text assigned to the tag. You might <LI>Kiwis
use this attribute for context-sensitive help <LI>Mangos
within the document. Browsers may use this to <LI>Oranges
show tool tips over the definition text. </DIR>
28 <DIR>

COMPACT Standard: HTML 4


E

Common: No
Causes the list to appear in a compact format. Sample:
This attribute probably will not affect the
<DIR TITLE=”Directory List”>
C

appearance of the list as most browsers do not


present lists in more than one format. Other Attributes
Standard: HTML 2; deprecated
N

This tag also accepts the lang, dir, onClick,


in HTML 4 onDblClick, onMouseDown, onMouseUp,
Common: No
onMouseOver, onMouseMove, onMouseOut,
Sample:
onKeyPress, onKeyDown, and onKeyUp attributes.
E

<DIR COMPACT>… See the Element-Independent Attributes section


</DIR> of this reference for definitions and examples.
R

ID=”…”
Assigns a unique ID selector to an instance of <DIV>
E

the <dir> tag. When you then assign a style to Indicates logical divisions within a document.
that ID selector, it affects only that one You can use these to apply alignment, line-
instance of the <dir> tag. wrapping, and particularly Style Sheet attrib-
F

Standard: HTML 4 utes to a section of your document. <DIV


Common: No ALIGN=CENTER> is the official replacement for
E

Sample: the <CENTER> tag.


<DIR ID=“123”> Standard: HTML 3.2
R

<LI>Thingie 1 Common: No
<LI>Thingie 2 Paired: Yes
</DIR> Sample:
STYLE=“…” <DIV ALIGN=”CENTER” STYLE=”background:
blue”>
Specifies Style Sheet commands that apply to
S

<FONT SIZE=+2>All About Formic


the <DIR> element. Acid</FONT>
Standard: HTML 4 </DIV>

Common: No
Sample: Attribute Information
R

<DIR STYLE=”background: blue; ALIGN=“{LEFT, CENTER, RIGHT, JUSTIFY}”


color: white”>
<LI>Thingie 1 Specifies whether the contents of the section
E

<LI>Thingie 2 align with the left or right margins (LEFT,


</DIR> RIGHT), are evenly spaced between them (CEN-
T

TITLE=“…” TER), or if the text stretches between the left


and right margins (JUSTIFY).
Specifies text assigned to the tag. You might
Standard: HTML 3.2; deprecated
S

use this attribute for context-sensitive help


in HTML 4 in favor of
within the document. Browsers may use this to Style Sheets
show tool tips over the directory list.
A
M
<DIV> 29 1

Common: No ID=”…”
Sample:
Assigns a unique ID selector to an instance of
<DIV ALIGN=”RIGHT”> the <DIV> tag. When you then assign a style to
Look over here!</DIV> that ID selector, it affects only that one instance
<DIV ALIGN=”LEFT”>
of the <DIV> tag.
Now, look over here!</DIV>
Standard: HTML 4
CLASS=“…” Common: No
Indicates which style class applies to the <DIV> Sample:
element. <DIV ID=“123”>
Standard: HTML 4 NOWRAP
Common: No
Sample: Disables line-wrapping for the section.
<DIV CLASS=”casual”> Standard: Netscape Navigator
Common: No
DATAFLD=“…” Sample:
\
Selects a column from a previously identified <HR>
source of tabulated data (see the DATASRC= <DIV ALIGN=”LEFT” NOWRAP>
attribute). The contents of this section will not
automatically wrap as you size the window.
Standard: Internet Explorer 4 </DIV><HR>
Common: No
Sample:
<DIV DATASRC=”#data_table”> STYLE=“…”
<DIV DATAFLD=”name”></DIV>
</DIV> Specifies Style Sheet commands that apply to
the contents within the <DIV> tags.
DATAFORMATAS=“{TEXT, HTML, NONE}”
Standard: HTML 4
Indicates how tabulated data formats within Common: No
the <DIV> element. Sample:
Standard: Internet Explorer 4 <DIV STYLE=”background: red”>
Common: No
Sample: TITLE=“…”
<DIV DATAFORMATAS=”HTML” Specifies text assigned to the tag. You might use
DATASRC=”#data_table”> this attribute for context-sensitive help within
the document. Browsers may use this to show
DATASRC=“…” tool tips over the contents of the <DIV> tags.
Specifies the source of data for data binding. Standard: HTML 4
Standard: Internet Explorer 4 Common: No
Common: No Sample:
Sample: <DIV TITLE=”Title” CLASS=”casual”>
<DIV DATASRC=”#data_table”>
30 <DIV>

Other Attributes Common: No


E

Sample:
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp, <DL COMPACT>…
</DL>
C

onMouseOver, onMouseMove, onMouseOut,


onKeyPress, onKeyDown, and onKeyUp attributes. ID=”…”
See the Element-Independent Attributes section
N

of this reference for definitions and examples. Assigns a unique ID selector to an instance of
the <DD> tag. When you then assign a style to
that ID selector, it affects only that one instance
<DL> of the <DD> tag.
E

Contains the <DT> and <DD> tags that form the Standard: HTML 4
term and definition portions of a definition list. Common: No
R

Sample:
Standard: HTML 2
Common: Yes <DL ID=“123”>
E

Paired: Yes <DT>Food


Sample: <DD>We will be eating 3 meals/day.
</DL>
<DL><DT>Hygiene
F

<DD>Always wash your hands before STYLE=“…”


preparing meat.</DL>
Specifies Style Sheet commands that apply to
E

Attribute Information contents within the <DL> tags.


Standard: HTML 4
R

CLASS=“…” Common: No
Sample:
Indicates which style class applies to the <DL>
element. <DL STYLE=”background: red”>

Standard: HTML 4 TITLE=“…”


S

Common: No
Sample: Specifies text assigned to the tag. You might
use this attribute for context-sensitive help
<DL CLASS=”casual”>

within the document. Browsers may use this to


<DT>RAM show tool tips over the definition list.
<DD>Random Access Memory
R

</DL> Standard: HTML 4


Common: No
COMPACT Sample:
E

Causes the definition list to appear in a compact <DL TITLE=”Definition List”>


format. This attribute probably will not affect
Other Attributes
T

the appearance of the list as most browsers do


not present lists in more than one format. This tag also accepts the lang, dir, onClick,
Standard: HTML 2; deprecated onDblClick, onMouseDown, onMouseUp,
S

in HTML 4 onMouseOver, onMouseMove, onMouseOut,


onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section
A

of this reference for definitions and examples.


M
<EM> 31 1

<DT> Standard:
Common:
HTML 4
No
Contains the terms inside a definition list. Sample:
Place the <DT> tags inside <DL> tags. <DT STYLE=”background: red”>
Standard: HTML 2
TITLE=“…”
Common: Yes
Paired: Yes, optional Specifies text assigned to the tag. You might
Sample: use this attribute for context-sensitive help
<DL><DT>Hygiene within the document. Browsers may use this to
<DD>Always wash your hands before show tool tips over the definition term.
preparing meat.</DL>
Standard: HTML 4
Common: No
Attribute Information Sample:

CLASS=“…” <DT TITLE=”Term”>Programmer</DT>


<DD>A method for converting coffee into
Indicates which style class applies to the <DT> applications.
element.
Other Attributes
Standard: HTML 4
Common: No This tag also accepts the lang, dir, onClick,
Sample: onDblClick, onMouseDown, onMouseUp,
onMouseOver, onMouseMove, onMouseOut,
<DL>
onKeyPress, onKeyDown, and onKeyUp attributes.
<DT CLASS=”casual”>CUL8R
<DD>See You Later
See the Element-Independent Attributes section
</DL> of this reference for definitions and examples.

ID=”…”
Assigns a unique ID selector to an instance of
<EM>
the <DT> tag. When you then assign a style to Makes the text stand out. Browsers usually do
that ID selector, it affects only that one this with italic or boldface.
instance of the <DT> tag. Standard: HTML 2
Standard: HTML 4 Common: Yes
Common: No Paired: Yes
Sample: Sample:

<DL> It is <EM>very</EM> important to read


<DT ID=“123”>Caffeine the instructions before beginning.
<DD>Avoid caffeine during the
stress management course. Attribute Information
</DL>
CLASS=“…”
STYLE=“…”
Indicates which style class applies to the <EM>
Specifies Style Sheet commands that apply to
element.
the contents within the <DT> tags.
Standard: HTML 4
32 <EM>

Common: No <EMBED>
E

Sample:
Places an embedded object into a document.
Did you say my house was on
<EM CLASS=”casual”>FIRE?!</EM> Examples of embedded objects include MIDI
C

files and digital video files. Because the <EMBED>


ID=”…” tag is not standard, we suggest you use the
<OBJECT> tag instead. If the browser does not
N

Assigns a unique ID selector to an instance of


have built-in support for an object, visitors
the <EM> tag. When you then assign a style to
will need a plug-in to use the object within the
that ID selector, it affects only that one instance
document.
of the <EM> tag.
E

Standard: Netscape Navigator, sup-


Standard: HTML 4
ported by Internet Explorer
Common: No
R

Common: No
Sample:
Paired: No
I have complained <EM ID=“123”>ten</EM> Sample:
E

times about the leaking faucet.


<EMBED SRC=”fur_elise.midi”>
STYLE=“…”
Attribute Information
F

Specifies Style Sheet commands that apply to


the contents within the <EM> tags. ACCESSKEY=“…”
E

Standard: HTML 4 Specifies a key sequence that binds to the


Common: No
embedded object.
Sample:
R

Standard: Internet Explorer 4


<EM STYLE=”background: red”>
Common: No
TITLE=“…” Sample:

Specifies text assigned to the tag. You might <EMBED SRC=”st.ocx” ACCESSKEY=”E”>
use this attribute for context-sensitive help
S

ALIGN=“{LEFT, RIGHT, CENTER, ABSBOT-


within the document. Browsers may use this to TOM, ABSMIDDLE, BASELINE, BOTTOM,
show tool tips over the emphasized text. TEXTTOP, TOP}”

Standard: HTML 4 Indicates how an embedded object is positioned


Common: No
R

relative to the document borders and surround-


Sample:
ing contents. ALIGN=”LEFT”, ALIGN=”RIGHT”, or
ALIGN=”CENTER” makes the embedded object
<EM TITLE=“Emphasis”>
E

float between the edges of the frame either to


the left, right, or evenly between. The behavior
Other Attributes is similar to that of the ALIGN= attribute of the
T

This tag also accepts the lang, dir, onClick, <IMG> tag.
onDblClick, onMouseDown, onMouseUp,
ALIGN=”TEXTTOP” or ALIGN=”TOP” lines up the top
onMouseOver, onMouseMove, onMouseOut,
S

of the embedded object with the top of the cur-


onKeyPress, onKeyDown, and onKeyUp attributes.
rent text font. ALIGN=”ABSMIDDLE” lines up the
See the Element-Independent Attributes section middle of the embedded object with the middle
A

of this reference for definitions and examples. of the current text font. ALIGN=”ABSBOTTOM” lines
M
<EMBED> 33 1

up the bottom of the embedded object with PALETTE=“#RRGGBB|#RRGGBB”


the bottom of the current text font.
ALIGN=”BASELINE” or ALIGN=”BOTTOM” lines up
Indicates the foreground and background colors
the bottom of the embedded object with the for the embedded object. You can specify col-
baseline of the current text font. ors with hexadecimal RGB values or with color
names.
Standard: Internet Explorer 4
Common: No Standard: Netscape Navigator
Sample: Common: No
Sample:
<EMBED SRC=”song.mid” ALIGN=”CENTER”>
<EMBED SRC=”flying.avi”
HEIGHT=“n” PALETTE=”Red|Black”>

Specifies the vertical dimension of the embed- SRC=“URL”


ded object. (See the UNITS=attribute for how to
Indicates the relative or absolute location of
measure dimensions.)
the file containing the object you want to
Standard: Netscape Navigator embed.
Common: No
Sample: Standard: Netscape Navigator
Common: No
<EMBED SRC=”rocket.avi” WIDTH=”50” Sample:
HEIGHT=”40”>
<EMBED SRC=”beethoven_9.midi”>
HIDDEN
TITLE=“…”
Indicates that the embedded object should not
be visible. Specifies text assigned to the tag. You might
use this attribute for context-sensitive help
Standard: Internet Explorer 4 within the document. Browsers may use this to
Common: No show tool tips over the embedded object.
Sample:
Standard: Internet Explorer 4
<EMBED SRC=”song.mid” HIDDEN> Common: No
Sample:
NAME=“…”
<EMBED SRC=”explode.avi” TITLE=”movie”>
Gives the object a name by which other
objects can refer to it. UNITS=“{PIXELS, EN}”
Standard: Netscape Navigator Modifies the behavior of the HEIGHT= and
Common: No WIDTH= attributes. UNITS=PIXELS measures
Sample: attributes in pixels. UNITS=EN measures dimen-
<EMBED SRC=”running.avi” NAME=”movie1”> sions in EN spaces.

OPTIONAL PARAM=“…” Standard: Netscape Navigator


Common: No
Indicates additional parameters. For example, Sample:
AVI movies accept the AUTOSTART attribute. <EMBED SRC=”rocket.avi” WIDTH=”50”
Standard: Netscape Navigator HEIGHT=”40”>
Common: No
Sample:
<EMBED SRC=”explode.avi” AUTOSTART=”true”>
34 <EMBED>

WIDTH=“n” ID=“…”
E

Indicates the horizontal dimension of the Assigns a unique ID selector to an instance of


embedded object. (See the UNITS= attribute for the <FIELDSET> tag. When you then assign a
C

how to measure dimensions.) style to that ID selector, it affects only that one
instance of the <FIELDSET> tag.
Standard: Netscape Navigator
Common: No Standard: HTML 4
N

Sample: Common: No
Sample:
<EMBED SRC=”cartoon.avi” WIDTH=”50”>
<FIELDSET ID=“123”>now!</FIELDSET>
E

Other Attributes
STYLE=“…”
This tag also accepts the lang, dir, onClick,
R

onDblClick, onMouseDown, onMouseUp, Specifies Style Sheet commands that apply to


onMouseOver, onMouseMove, onMouseOut, the contents within the <FIELDSET> tags.
onKeyPress, onKeyDown, and onKeyUp attributes.
Standard: HTML 4
E

See the Element-Independent Attributes section Common: No


of this reference for definitions and examples. Sample:
F

<FIELDSET STYLE=”background: red”>

F TITLE=“…”
E

Specifies text assigned to the tag. You might


use this attribute for context-sensitive help
R

<FIELDSET> within the document. Browsers may use this to


show tool tips over the font text.
Groups related form elements.
Standard: HTML 4
Standard: HTML 4 Common: No
Common: No Sample:
S

Paired: Yes
Sample: <FIELDSET TITLE=”Personal data fields”>

Other Attributes

<FORM …>
<FIELDSET>
This tag also accepts the lang, dir, onClick,
..logically related field elements…
R

</FIELDSET> onDblClick, onMouseDown, onMouseUp,


</FORM> onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes.
E

Attribute Information See the Element-Independent Attributes section


of this reference for definitions and examples.
CLASS=“…”
T

Indicates which style class applies to the <FONT>


<FIELDSET> element.
S

Alters or sets font characteristics of the font the


Standard: HTML 4 browser uses to display text.
Common: No
A

Sample: Standard: HTML 3.2; deprecated


in HTML 4 in favor of
<FIELDSET CLASS=”casual”> Style Sheets.
Group Rates</FIELDSET>
M
<FORM> 35 1

Common: Yes Standard: HTML 3.2; deprecated


Paired: Yes in HTML 4 in favor of
Sample: Style Sheets.
Common: Yes
The cat was really Sample:
<FONT SIZE=”+3”>BIG!</FONT>
<BASEFONT SIZE=4>
Attribute Information <FONT SIZE=+2>This is a font of size
6</FONT> <FONT SIZE=1>This is a font
COLOR=“#RRGGBB” or “...” of size 1</FONT>

Indicates the color the browser uses to display


text. Color names can substitute for the RGB
<FORM>
hexadecimal values. Sets up a container for a form tag. Within the
<FORM> tags, you can place form input tags such
Standard: HTML 3.2; deprecated
as <FIELDSET>, <INPUT>, <SELECT>, and
in HTML 4 in favor of
Style Sheets. <TEXTAREA>.
Common: Yes Standard: HTML 2
Sample: Common: Yes
<FONT COLOR=#FF0000><H2>Win A Paired: Yes
Trip!</H2></FONT> <FONT COLOR= Sample:
”lightblue”><p>That’s right! <FORM METHOD=POST
A trip to Hawaii can be yours if you ACTION=”/cgi-bin/search.pl”>
scratch off the right number!</FONT> Search : <INPUT TYPE=TEXT NAME=”name”
SIZE=20><BR>
FACE=“…,…”
<INPUT TYPE=SUBMIT VALUE=”Start Search”>
Specifies a comma-separated list of font names </FORM>
the browser uses to render text. If the browser
does not have access to the first named font, it Attribute Information
tries the second, then the third, and so forth.
ACCEPT-CHARSET=“…”
Standard: Netscape Navigator and
Internet Explorer, not intro- Specifies the character encodings for input
duced in standard HTML in data that the server processing the form must
favor of Style Sheets. accept. The value is a list of character sets as
Common: Yes defined in RFC2045, separated by commas.
Sample:
Standard: HTML 4
<FONT SIZE=+1 FACE=”Avant Guard, Common: No
Helvetica, Lucida Sans, Arial”> Sample:
SIZE=n <FORM METHOD=POST
ACCEPT-CHARSET=”ISO-8859-1”
Specifies the size of the text affected by the ACTION=”/stat-collector.cgi”>
FONT tag. You can specify the size relative to the
base font size (see the <BASEFONT> tag) which is
normally 3. You can also specify the size as a
digit in the range 1 through 7.
36 <FORM>

ACCEPT=“…” that ID selector, it affects only that one instance


E

of the <FORM> tag.


Specifies a list of MIME types, separated by
commas, that the server processing the form Standard: HTML 4
Common: No
C

will handle correctly.


Sample:
Standard: HTML 4
Common: No <FORM ACTION=”/cgi-bin/ttt.pl”
N

Sample: METHOD=GET ID=”123”>

<FORM METHOD=POST ACCEPT=”image/gif, METHOD={POST,GET}


image/jpeg ”ACTION=”/image-collector.cgi”>
E

Changes how form data is transmitted to the


ACTION=“URL” form processor. When you use METHOD=GET,
the form data is given to the form processor
R

Specifies the explicit or relative location of the in the form of an environment variable
form processing CGI application. (QUERY_STRING). When you use METHOD=POST, the
Standard: HTML 2 form data is given to the form processor as the
E

Common: Yes standard input to the program.


Sample:
Standard: HTML 2
F

<FORM METHOD=POST Common: Yes


ACTION=”/stat-collector.cgi”> Sample:
E

CLASS=“…” <FORM METHOD=POST


ACTION=”/cgi-bin/www-search”>
Indicates which style class applies to the <FORM>. Enter search keywords:
R

Standard: HTML 4 <INPUT TYPE=TEXT NAME=”query” SIZE=20>


Common: No <INPUT TYPE=SUBMIT VALUE=”Search”>
Sample: </FORM>

<FORM METHOD=POST CLASS=”casual” NAME=“…”


ACTION=”/stat-collector.cgi”>
S

Assigns the form a name accessible by book-


ENCTYPE=“…” mark, script, and applet resources.
Standard: Internet Explorer

Specifies the MIME type used to submit (post)


the form to the server . The default value is Common: No
Sample:
R

“application/x-www-form-urlencoded”. Use
the value “multipart/form-data” when the <FORM METHOD=POST ACTION=”/cgi-bin/ff.pl”
returned document includes files. NAME=”ff”>
E

Standard: HTML 4 STYLE=“…”


Common: No
Sample: Specifies Style Sheet commands that apply to
T

the contents within the <FORM> tags.


<FORM METHOD=POST ENCTYPE=”application/x-
www-form-urlencoded” Standard: HTML 4
S

ACTION=”/stat-collector.cgi”> Common: No
Sample:
ID=”…”
<FORM STYLE=”background: red”>
A

Assigns a unique ID selector to an instance of


the <FORM> tag. When you then assign a style to
M
<FRAME> 37 1

TARGET=“…” <FRAME SRC=”frames/buttons.html”


NAME=”buttons” SCROLLING=NO NORESIZE>
Identifies in which previously named frame </FRAMESET>
the output from the form processor should
appear. Attribute Information
Standard: HTML 4
Common: Yes BORDER=“n”
Sample: Specifies the thickness of the border (in pixels)
<FORM TARGET=”output” METHOD=GET around a frame. Use BORDER=0 to specify a
ACTION=”/cgi-bin/thingie.sh”> frame with no border.
TITLE=“…” Standard: Netscape Navigator
Common: Yes
Specifies text assigned to the tag. You might Sample:
use this attribute for context-sensitive help
within the document. Browsers may use this to <FRAME SRC=”hits.html” BORDER=”2”>
show tool tips over the fill-out form. BORDERCOLOR=“#RRGGBB” or “...”
Standard: HTML 4 Specifies the color of the border around the
Common: No frame. Use the color’s hexadecimal RGB values
Sample:
or the color name.
<FORM METHOD=POST ACTION=”/cgi-bin/ff.pl”
Standard: Internet Explorer, Netscape
TITLE=”Fill-out form”>
Navigator
Other Attributes Common: Yes
Sample:
This tag also accepts the lang, dir, onsubmit,
onreset, onClick, onDblClick, onMouseDown, <FRAME SRC=”hits.html” BORDERCOLOR=”red”>
onMouseUp, onMouseOver, onMouseMove, FRAMEBORDER={1,0}
onMouseOut, onKeyPress, onKeyDown, and
onKeyUp attributes. See the Element- Indicates whether the frame’s border is visible. A
Independent Attributes section of this refer- value of 1 indicates that the border is visible, and
ence for definitions and examples. a value of 0 indicates that it is not visible.
Standard: HTML 4
Common: No
<FRAME> Sample:
Defines a frame within a frameset (see the <FRAME SRC=”weather.html” FRAMEBORDER=0>
<FRAMESET> tag). The <FRAME> tag specifies the
source file and visual characteristics of a frame. MARGINHEIGHT=”n”
Standard: HTML 4 Specifies the vertical dimension (in number of
Common: Yes pixels) of the top and bottom margins in a
Paired: No frame.
Sample:
Standard: HTML 4
<FRAMESET ROWS=”*,70”> Common: No
<FRAME SRC=”frames/body.html” Sample:
NAME=”body”>
<FRAME SRC=”cats.html” MARGINHEIGHT=10>
38 <FRAME>

MARGINWIDTH=”n” SRC=“URL”
E

Specifies the horizontal dimension (in pixels) Specifies the relative or absolute location of a
of the left and right margins in a frame. document that you want to load within the
C

defined frame.
Standard: HTML 4
Common: No Standard: HTML 4
Sample: Common: Yes
N

Sample:
<FRAME SRC=”dogs.html” MARGINWIDTH=10>
<FRAME NAME=”main” SRC=”intro.html”>
NAME=”…”
E

Gives the frame you are defining a name. You <FRAMESET>


can use this name later to load new documents
Contains frame definitions and specifies frame
R

into the frame (see the TARGET= attribute) and


within scripts to control attributes of the spacing, dimensions, and attributes. Place
frame. Reserved names with special meaning <FRAME> tags inside <FRAMESET> tags.
E

include _blank, _parent, _self, and _top. Standard: HTML 4


Common: Yes
Standard: HTML 4
Paired: Yes
F

Common: Yes
Sample:
Sample:
<FRAMESET COLS=”*,70”>
<FRAME SRC=”/cgi-bin/weather.cgi”
E

<FRAME SRC=”frames/body.html”
NAME=”weather”>
NAME=”body”>
NORESIZE <FRAME SRC=”frames/side.html”
R

NAME=”side”>
Makes a frame’s dimensions unchangeable. </FRAMESET>
Otherwise, if a frame’s borders are visible, visi-
tors can resize the frame by selecting a border Attribute Information
and moving it with the mouse.
S

Standard: HTML 4
BORDER=”n”
Common: Yes Specifies the thickness of borders (in pixels)
Sample:

around frames defined within the frameset.


<FRAME SRC=”bottom.html” NAME=”bottom” You can also control border thickness with the
<FRAME> tag.
R

NORESIZE SCROLLING=NO>
SCROLLING={YES, NO, AUTO} Standard: Netscape Navigator
Common: No
E

Indicates whether a scrollbar is present within Sample:


a frame when text dimensions exceed the
<FRAMESET COLS=”*,150” BORDER=5>
dimensions of the frame. Set SCROLLING=NO
T

<FRAME SRC=”left.html” NAME=”main”>


when using a frame to display only an image. <FRAME SRC=”side.html” NAME=”side”>
Standard: HTML 4 </FRAMESET>
S

Common: Yes
Sample:
<FRAME NAME=”titleimg” SRC=”title.html”
A

SCROLLING=NO>
M
<FRAMESET> 39 1

BORDERCOLOR=“#RRGGBB” or “...” FRAMESPACING=”n”


Sets the color of the frame borders. Color Specifies the space (in pixels) between frames
names can substitute for the hexadecimal RGB within the browser window.
color values.
Standard: Internet Explorer
Standard: Netscape Navigator, Internet Common: No
Explorer Sample:
Common: Yes
<FRAMESET ROWS=”*,100” FRAMESPACING=10>
Sample:
<FRAME SRC=”top.html” NAME=”top”>
<FRAMESET BORDERCOLOR=”Red” <FRAME SRC=”middle.html” NAME=”middle”>
ROWS=”100,*”> </FRAMESET>
<FRAME SRC=”top.html” NAME=”title”>
<FRAME SRC=”story.html” NAME=”Story”> ROWS=“…”
</FRAMESET> Specifies the number and dimensions of the
COLS=“...” horizontal frames within the current frameset.

Specifies the number and dimensions of the Set ROWS= to a comma-separated list of numbers
vertical frames within the current frameset. or percentages to indicate the height of each
frame. Use the asterisk (*) to represent a vari-
Set COLS= to a comma-separated list of numbers able height. A frame of variable height fills the
or percentages to indicate the width of each space remaining after the browser formats
frame. Use the asterisk (*) to represent a vari- space for the other frames (<FRAMESET
able width. A frame of variable width fills the ROWS=”100,400,*”>).
space left over after the browser formats space
for the other frames (<FRAMESET Setting ROWS= to a comma-separated list of per-
COLS=”100,400,10% *”>). centages allows you to control the ratio of
frame vertical space relative to the space avail-
Setting COLS= with percentage values controls able within the browser (<FRAMESET
the ratio of frame horizontal space relative to the ROWS=”10%,*”>).
amount of space available within the browser
(<FRAMESET COLS=”10%,*”>). You cannot use ROWS= and COLS= in the
same tag.
You cannot use COLS= and ROWS= in the
same tag. Standard: HTML 4
Common: Yes
Standard: HTML 4 Sample:
Common: Yes
Sample: <FRAMESET ROWS=”*,100,*”>
<FRAME SRC=”top.html” NAME=”top”>
<FRAMESET COLS=”*,100,*”> <FRAME SRC=”middle.html” NAME=”middle”>
<FRAME SRC=”left.html” NAME=”left”> <FRAMESET COLS=2>
<FRAME SRC=”middle.html” NAME=”middle”> <FRAME SRC=”bottom1.html” NAME=”left”>
<FRAMESET ROWS=2> <FRAME SRC=”bottom2.html” NAME=”right”>
<FRAME SRC=”top.html” NAME=”top”> </FRAMESET>
<FRAME SRC=”bottom.html” </FRAMESET>
NAME=”bottom”>
</FRAMESET> Other Attributes
</FRAMESET> This tag also accepts the onload and onunload
attributes. See the Element-Independent
Attributes section of this reference for defini-
tions and examples.
40 <HN>

H
<H1 CLASS=”casual” ALIGN=LEFT>
E

River Tours</H1>
ID=”…”
C

Assigns a unique ID selector to an instance of


<Hn> the <Hn> tag. When you then assign a style to
Specifies headings in a document. Headings are that ID selector, it affects only that one
N

numbered 1–6, with <H1> representing the instance of the <Hn> tag.
heading for the main heading in the document Standard: HTML 4
and <H3> representing a heading for a nested Common: No
E

subtopic. Generally, text inside heading tags Sample:


appears in boldface and may be larger than
<H2 ID=“123”>Paper Products</H2>
R

normal document text.


Standard: HTML 2
STYLE=“…”
Common: Yes Specifies Style Sheet commands that apply to
E

Paired: Yes the heading.


Sample:
Standard: HTML 4
F

<H1>Caring For Your Canary</H1> Common: No


This document explains how you should Sample:
take care of a canary. With proper
E

care, you and your new bird will have <H1 STYLE=”background: red”>
a lasting, happy relationship.
<H2>Feeding</H2> TITLE=“…”
R

Specifies text assigned to the tag. You might


Attribute Information use this attribute for context-sensitive help
within the document. Browsers may use this to
ALIGN={LEFT, CENTER, RIGHT} show tool tips over the heading.
Positions the heading in the left, right, or cen-
S

Standard: HTML 4
ter of a document. Common: No
Sample:
Standard: HTML 3.2; deprecated

in HTML 4 in favor of <H1 TITLE=”Headline”>


Style Sheets
R

Common: Yes Other Attributes


Sample:
This tag also accepts the lang, dir, onClick,
<H3 ALIGN=RIGHT>History Of The onDblClick, onMouseDown, onMouseUp,
E

Platypus</H3> onMouseOver, onMouseMove, onMouseOut,


onKeyPress, onKeyDown, and onKeyUp attributes.
CLASS=“…”
T

See the Element-Independent Attributes section


Indicates which style class applies to the <Hn> of this reference for definitions and examples.
element.
S

Standard:
Common:
HTML 4
No
<HEAD>
Sample:
A

Contains document head information. You


can place any of the following tags within the
M
<HR> 41 1

document head: <LINK>, <META>, <TITLE>, <P>Birthdays are usually joyous


<SCRIPT>, <BASE>, and <STYLE>. celebrations so we recommend bright
colors.
Standard: HTML 2
Common: Yes Attribute Information
Paired: Yes
Sample:
ALIGN={LEFT, CENTER, RIGHT}
<HTML>
<HEAD> Positions the line flush left, flush right, or in
<TITLE>Making a Peanut-Butter and the center of the document. These settings are
Jelly Sandwich</TITLE> irrelevant unless you use the WIDTH= attribute
<LINK REL=Parent to make the line shorter than the width of the
HREF=”sandwiches.html”> document.
</HEAD>
Standard: HTML 3.2; deprecated
Attribute Information in HTML 4 in favor of
Style Sheets
Common: Yes
PROFILE=“URL” Sample:
Specifies the address of data profiles. You <H2 ALIGN=LEFT>Shopping List</H2>
might use this attribute to specify the location <HR WIDTH=”40%” ALIGN=LEFT>
of, for example, <META> tag information. <UL TYPE=SQUARE>
<LI>Eggs
Standard: HTML 4
<LI>Butter
Common: No
<LI>Bread
Sample:
<LI>Milk
<HEAD PROFILE=”http://www.raycomm.com/ </UL>
general.html”>
</HEAD< CLASS=“…”

Other Attributes Indicates which style class applies to the <HR>


element.
This tag also accepts the lang and dir attrib-
Standard: HTML 4
utes. See the Element-Independent Attributes
Common: No
section of this reference for definitions and Sample:
examples.
<HR CLASS=”casual” WIDTH=”50%”>

<HR> COLOR=“#RRGGBB” or “...”

Draws horizontal lines (rules) in your docu- Specifies the color of the line. The color name
ment. This is useful for visually separating doc- can substitute for the hexadecimal RGB values.
ument sections. Standard: Internet Explorer. Style
Sheets provide equivalent
Standard: HTML 2
functionality.
Common: Yes
Common: No
Paired: No
Sample:
Sample:
<HR COLOR=#09334C>
<H2>Birthday Colors</H2>
<HR ALIGN=LEFT WIDTH=”60%”>
42 <HR>

ID=”n” Standard: HTML 3.2; deprecated


E

in HTML 4 in favor of
Assigns a unique ID selector to an instance of Style Sheets
the <HR> tag. When you then assign a style to Common: Yes
C

that ID selector, it affects only that one Sample:


instance of the <HR> tag.
<H2 ALIGN=CENTER>The End!</H2>
Standard: HTML 4 <HR WIDTH=”85%”>
N

Common: No <P ALIGN=CENTER>


Sample: <A HREF=”/index.html”>Home</A> |
<A HREF=”Story3.html”>Next Story</A> |
<HR ID=“123”>
E

<A HREF=”Story1.html”>Prev Story</A>


NOSHADE TITLE=“…”
R

Specifies that the browser not shade the line. Specifies text assigned to the tag. You might
Standard: HTML 3.2 use this attribute for context-sensitive help
Common: Yes within the document. Browsers may use this to
E

Sample: show tool tips over the horizontal rule.


<HR NOSHADE ALIGN=CENTER WIDTH=”50%”> Standard: HTML 4
F

<IMG SRC=”Bobby.jpg” ALIGN=CENTER Common: No


BORDER=0 ALT=”Bobby”> Sample:
<BR CLEAR=ALL>
E

<HR NOSHADE ALIGN=CENTER WIDTH=”50%”> <HR TITLE=”A line”>

SIZE=”n” Other Attributes


R

Specifies the thicknes of the line (in pixels). This tag also accepts the onClick, onDblClick,
onMouseDown, onMouseUp, onMouseOver,
Standard: HTML 3.2; deprecated onMouseMove, onMouseOut, onKeyPress,
in HTML 4 in favor of onKeyDown, and onKeyUp attributes. See the
Style Sheets Element-Independent Attributes section of this
S

Common: Yes
reference for definitions and examples.
Sample:
<HR SIZE=10>

<HTML>
STYLE=“…”
R

Contains the entire document. Place these tags


Specifies Style Sheet commands that apply to at the top and bottom of your HTML file.
the horizontal rule.
Standard: HTML 2
E

Standard: HTML 4 Common: Yes


Common: No Paired: Yes
Sample: Sample:
T

<HR WIDTH=”50%” STYLE=”color: red”> <HTML>


<HEAD><TITLE>Test Page</TITLE></HEAD>
WIDTH=“n”
S

<BODY>
Specifies the length of the line. You can specify <H1>Is this working?</H1>
the value with an absolute number of pixels or </BODY>
A

as a percentage to indicate how much of the </HTML>


total width available is used.
M
<IFRAME> 43 1

Attribute Information TITLE=“…”


This tag accepts the lang and dir attributes. See Specifies text assigned to the tag. You might
the Element-Independent Attributes section of use this attribute for context-sensitive help
this reference for definitions and examples. within the document. Browsers may use this to
show tool tips over the italicized text.
Standard: HTML 4
<I> Common: No
Italicizes text. Sample:
Standard: HTML 2 <I TITLE=”Italicized”>
Common: Yes
Paired: Yes
Other Attributes
Sample: This tag also accepts the lang, dir, onClick,
After this, Tom told me to read onDblClick, onMouseDown, onMouseUp,
<I>Mastering HTML</I>. I had onMouseOver, onMouseMove, onMouseOut,
no choice but to do so. onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section
Attribute Information of this reference for definitions and examples.

CLASS=“…”
<IFRAME>
Indicates which style class applies to the
<I> element. Creates floating frames within a document.
Floating frames differ from normal frames
Standard: HTML 4 because they are independently manipulable
Common: No elements within another HTML document.
Sample:
Standard: HTML 4
This mouse is <I CLASS=”casual”> Common: No
enhanced</I> Paired: Yes
ID=”…” Sample:

Assigns a unique ID selector to an instance of <IFRAME NAME=”new_win”


SRC=”http://www.raycomm.com”>
the <I> tag. When you then assign a style to
</IFRAME>
that ID selector, it affects only that one instance
of the <I> tag. Attribute Information
Standard: HTML 4
Common: No ALIGN={LEFT, CENTER, RIGHT}
Sample:
Specifies how the floating frame lines up with
He called it a <I ID=“123”>Doo-Dad</I>! respect to the left and right sides of the
STYLE=“…” browser window.
Standard: HTML 4; deprecated usage.
Specifies Style Sheet commands that apply to
Use Style Sheets instead.
italicized text. Common: No
Standard: HTML 4 Sample:
Common: No <IFRAME ALIGN=LEFT SRC=”goats.html”
Sample: NAME=”g1”>
<I STYLE=”color: green”>
44 <IFRAME>

BORDER=”n” Standard: HTML 4


E

Common: No
Indicates the thickness of a border around a Sample:
floating frame (in pixels).
<IFRAME SRC=”joe.html” NAME=”Joe”
C

Standard: Internet Explorer 4 WIDTH=500 HEIGHT=200>


Common: No
Sample: HSPACE=”n”
N

<IFRAME SRC=”joe.html” NAME=”Joe” Indicates the size (in pixels) of left and right
BORDER=5> margins within the floating frame.
E

BORDERCOLOR=“#RRGGBB” or “...” Standard: Internet Explorer 4


Common: No
Specifies (in hexadecimal RGB values or the Sample:
R

color name) the color of the border around a


floating frame. <IFRAME SRC=”joe.html” NAME=”Joe”
HSPACE=10 VSPACE=10>
Standard: Internet Explorer 4
E

Common: No ID=”…”
Sample: Assigns a unique ID selector to an instance of
F

<IFRAME SRC=”joe.html” NAME=”Joe” the <IFRAME> tag. When you then assign a style
BORDERCOLOR=#5A3F2E> to that ID selector, it affects only that one
instance of the <IFRAME> tag.
E

FRAMEBORDER={0,1}
Standard: HTML 4
Indicates whether the floating frame has visi- Common: No
R

ble borders. A value of 0 indicates no border, Sample:


and a value of 1 indicates a visible border.
<IFRAME SRC=”Joe.html” NAME=”Joe”
Standard: HTML 4 ID=“123”>
Common: No
Sample: MARGINHEIGHT=”n”
S

<IFRAME SRC=”main.html” NAME=”main” Specifies the size of the top and bottom mar-
FRAMEBORDER=0> gins (in pixels) within the floating frame.

FRAMESPACING=”n” Standard: HTML 4


Common: No
R

Indicates the space (in pixels) between adja- Sample:


cent floating frames.
<IFRAME SRC=”top.html” NAME=”topbar”
Standard: Internet Explorer 4 MARGINHEIGHT=50>
E

Common: No
Sample: MARGINWIDTH=”n”
T

<IFRAME SRC=”joe.html” NAME=”Joe” Specifies the size of the left and right margins
FRAMESPACING=10> (in pixels) within the floating frame.
HEIGHT=”n” Standard: HTML 4
S

Common: No
Specifies the vertical dimension (in pixels) of Sample:
the floating frame.
A

<IFRAME SRC=”body.html” NAME=”body”


MARGINWIDTH=50>
M
<IMG> 45 1

NAME=“…” Standard: HTML 4


Common: No
Assigns the frame a unique name. You can use Sample:
this name within other frames to load new
documents in the frame and to manipulate the <IFRAME SRC=”dots.html” NAME=”dots”
STYLE=”background: red”>
attributes of the frame.
Standard: HTML 4 WIDTH=n
Common: No Specifies the horizontal dimension (in pixels)
Sample: of the floating frame.
<IFRAME SRC=”joe.html” NAME=”Joe”
Standard: HTML 4
WIDTH=500 HEIGHT=200>
Common: No
NORESIZE Sample:

Specifies that the floating frame cannot resize. <IFRAME SRC=”joe.html” NAME=”Joe”
WIDTH=500 HEIGHT=200>
Because the HTML 4 specification forbids re-
sizable inline frames, this attribute is only rele- VSPACE=n
vant to Internet Explorer.
Indicates the size (in pixels) of top and bottom
Standard: Internet Explorer margins within the floating frame.
Common: No
Sample: Standard: Internet Explorer 4
Common: No
<IFRAME SRC=”joe.html” NAME=”Joe” Sample:
NORESIZE>
<IFRAME SRC=”joe.html” NAME=”Joe”
SCROLLING={YES, NO} HSPACE=10 VSPACE=10>
Indicates whether the floating frame has Other Attributes
scrollbars.
This tag also accepts the lang, dir, onClick,
Standard: HTML 4 onDblClick, onMouseDown, onMouseUp,
Common: No onMouseOver, onMouseMove, onMouseOut,
Sample: onKeyPress, onKeyDown, and onKeyUp attributes.
<IFRAME SRC=”top.html” SCROLLING=NO> See the Element-Independent Attributes section
of this reference for definitions and examples.
SRC=“URL”
Specifies the relative or absolute location of the
document file to load in the floating frame.
<IMG>
Standard: HTML 4 Places an inline image in a document. You can
Common: No use the attributes ISMAP= and USEMAP= with the
Sample: <IMG> tag to implement image maps.

<IFRAME NAME=”pics” SRC=”pics/”> Standard: HTML 2


Common: Yes
STYLE=“…” Paired: No
Sample:
Specifies Style Sheet commands that apply to
the floating frame. <IMG SRC=”images/left_arrow.gif” ALT=”<-“>
46 <IMG>

Attribute Information BORDER=”n”


E

Specifies the width (in pixels) of a border


ALIGN={LEFT, RIGHT, TOP, MIDDLE, around an image. The default value is usually 0
BOTTOM}
C

(no border). The border color is the color of


Specifies the appearance of text that is near an normal text within your document.
inline graphic image. For example, if you use Standard: HTML 3.2
N

RIGHT, the image appears flush to the right edge Common: Yes
of the document, and the text appears to its Sample:
left. Using LEFT produces the opposite effect.
<IMG SRC=”portrait.jpg” BORDER=2>
E

HTML 2 mentions only attribute values of TOP,


CLASS=“…”
MIDDLE, and BOTTOM. TOP aligns the top of the
R

first line of text after the <IMG> tag to the top of Indicates which style class applies to the <IMG>
the image. BOTTOM (the default) aligns the bot- element.
tom of the image to the baseline of the text.
Standard: HTML 4
E

MIDDLE aligns the baseline of the first line of Common: No


text with the middle of the image. Sample:
F

HTML 3.2 added LEFT and RIGHT to the list of <IMG CLASS=”casual” SRC=”dots.gif”>
attribute values.
CONTROLS
E

You can use the <BR> tag to control specific


points where text stops wrapping around an If the image is a video file, indicates the play-
image and continues below the instance of the back controls that appear below the image.
R

image. Standard: Internet Explorer 2


Standard: HTML 2; deprecated in HTML Common: No
4 in favor of Style Sheets Sample:
Common: Yes <IMG DYNSRC=”foo.avi” CONTROLS>
Sample:
S

DATAFLD=“…”
<IMG SRC=”red_icon.gif” ALIGN=LEFT>
It’s about time for volunteers to Indicates a column in previously identified

pitch in.<BR CLEAR=ALL> tabular data.


ALT=“…” Standard: Internet Explorer 4
R

Common: No
Provides a textual description of images, Sample:
which is useful for visitors who have text-only
E

browsers. Some browsers may also display the <IMG SRC=”thing.gif” DATAFLD=”color”>
ALT= text as a floating message when the visitor DATASRC=“…”
places the mouse pointer over the image.
T

Specifies the location of tabular data to be


Standard: HTML 2 bound.
Common: Yes
S

Sample: Standard: Internet Explorer 4


Common: No
<IMG SRC=”smiley.gif” ALT=”:-)”> Sample:
A

<IMG SRC=”thing.gif” DATASRC=”#data_table”>


M
<IMG> 47 1

DYNSRC=“URL” ISMAP
Specifies the relative or absolute location of a Indicates that the graphic image functions as a
dynamic image (VRML, video file, and so on). clickable image map. The ISMAP= attribute in-
structs the browser to send the pixel coordi-
Standard: Internet Explorer 2
Common: No nates to the server image map CGI application
Sample: when a visitor selects the image with the mouse
pointer. When HTML 2 established the ISMAP=
<IMG DYNSRC=”foo.avi”> attribute, image maps were implemented in a
HEIGHT=”n” server-side fashion only. Now, client-side image
maps are more popular (see the USEMAP=
Specifies the vertical dimension of the image attribute).
(in pixels). If you don’t use this attribute, the
image appears in the default height. Use this Standard: HTML 2
Common: Yes
attribute, along with the WIDTH= attribute, to
Sample:
fit an image within a space. You can fit a large
image into a smaller space, and you can spread <A HREF=”/cgi-bin/image map/mymap”>
a smaller image. Some Web designers use the <IMG ISMAP SRC=”images/main.gif”></A>
WIDTH= and HEIGHT= attributes to spread a single LOWSRC=“URL”
pixel image over a large space to produce the
effect of a larger solid-color image. Indicates the absolute or relative location of a
lower resolution version of an image.
Standard: HTML 3.2
Common: Yes Standard: Netscape Navigator
Sample: Common: No
Sample:
<IMG SRC=”images/smiley.jpg” WIDTH=50
HEIGHT=50> <IMG SRC=”bigpic.jpg” LOWSRC=”lilpic.jpg”>

HSPACE=”n” LOOP={n, INFINITE}


Establishes a margin of white space (in pixels) Indicates the number of times a video file
to the left and right of a graphic image. (See plays back.
the VSPACE= attribute for how to control the
Standard: Internet Explorer 2
top and bottom margins around an image.) Common: No
Standard: HTML 3.2 Sample:
Common: Yes <IMG DYNSRC=”bar.avi” LOOP=INFINITE>
Sample:
NAME=“…”
<IMG SRC=”pics/pinetree.jpg” HSPACE=20
VSPACE=15> Specifies a name by which bookmarks, scripts,
ID=n and applets can reference the image.
Standard: Internet Explorer 4
Assigns a unique ID selector to an instance of
Common: No
the <IMG> tag. When you then assign a style to Sample:
that ID selector, it affects only that one instance
of the <IMG> tag. <IMG SRC=”tweakie.jpg” NAME=”img_1”>

Standard: HTML 4
Common: No
Sample:
<IMG SRC=”grapes.jpg” ID=“123”>
48 <IMG>

SRC=“URL” USEMAP=“URL”
E

Specifies the relative or absolute location of a Specifies the location of the client-side image
file that contains the graphic image you want map data (see the <MAP> tag). Because the <MAP>
C

to embed in a document. tag gives the map data an anchor name, be


sure to include the name with the URL of the
Standard: HTML 2
Common: Yes document that contains the map data.
N

Sample: Standard: HTML 3.2


<IMG SRC=”images/left_arrow.gif” Common: Yes
ALT=”<-“> Sample:
E

<IMG ISMAP SRC=”map1.gif”


START={FILEOPEN, MOUSEOVER}
USEMAP=”maps.html#map1”>
R

Specifies the event that triggers the playback of


VRML=“…”
a dynamic image. START=FILEOPEN starts play-
back when the browser has completely down- Specifies the absolute or relative location of a
E

loaded the file. START=MOUSEOVER starts playback VRML world to embed in a document.
when a visitor places the mouse pointer over
Standard: Internet Explorer 4
the image.
F

Common: No
Standard: Internet Explorer 2 Sample:
Common: No <IMG VRML=”vr/myroom.vrml”>
E

Sample:
VSPACE=”n”
<IMG DYNSRC=”ship.vrm” START=MOUSOVER>
R

Establishes a margin of white space (in pixels)


STYLE=“…”
above and below a graphic image. (See the
Specifies Style Sheet commands that apply to HSPACE= attribute for how to control the left
the inline image. and right margins of an image.)
Standard: HTML 4 Standard: HTML 3.2
S

Common: No Common: Yes


Sample: Sample:

<IMG SRC=”dots.gif” STYLE=”background: red”> <IMG SRC=”pics/pinetree.jpg” HSPACE=20


VSPACE=15>
TITLE=“…”
R

WIDTH=”n”
Specifies text assigned to the tag. You might
use this attribute for context-sensitive help Specifies the horizontal dimension of the
E

within the document. Browsers may use this to image (in pixels). If you don’t use this
show tool tips over the image. attribute, the image appears in the default
width. Use this attribute, along with the
T

Standard: HTML 4
HEIGHT= attribute, to fit an image within a
Common: No
Sample: space. You can fit a large image into a smaller
space, and you can spread a smaller image.
S

<IMG SRC=”pics/jill.jpg” Some Web designers use WIDTH= and HEIGHT= to


TITLE=”Image”> spread a single pixel image over a large space
A

to produce the effect of a larger solid-color


image.
M
<INPUT> 49 1

Standard: HTML 3.2 ACCEPT=“…”


Common: Yes
Sample: Specifies a list of acceptable MIME types for
submitted files.
<IMG SRC=”images/smiley.jpg” WIDTH=50
HEIGHT=50> Standard: HTML 4
Common: No
Other Attributes Sample:
This tag also accepts the lang, dir, onClick, <INPUT TYPE=FILE ACCEPT=”image/gif”>
onDblClick, onMouseDown, onMouseUp, Please submit a GIF image.
onMouseOver, onMouseMove, onMouseOut,
CHECKED
onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section Use with TYPE=RADIO or TYPE=CHECKBOX to set
of this reference for definitions and examples. the default state of those input methods
to True.

<INPUT> Standard: HTML 2


Common: Yes
Identifies several input methods for forms. Sample:
This tag must appear between the opening and
<INPUT TYPE=CHECKBOX CHECKED
closing <FORM> tags.
NAME=”foo” VALUE=”1”><BR>
Standard: HTML 2 2 <INPUT TYPE=CHECKBOX NAME=”foo”
Common: Yes VALUE=”2”><BR>
Paired: No
Sample: CLASS=“…”

<FORM ACTION=”/cgi-bin/order/” METHOD=POST> Indicates which style class applies to the


<INPUT NAME=”qty” TYPE=”TEXT” SIZE=5> <INPUT> element.
<INPUT TYPE=”submit” VALUE=”Order”> Standard: HTML 4
</FORM> Common: No
Sample:
Attribute Information
<INPUT CLASS=”casual” TYPE=TEXT
ALIGN={LEFT, CENTER, RIGHT} NAME=”age”>

Lines up a graphical submit button (TYPE= DATAFLD=“…”


IMAGE). The behavior of this tag is identical to Selects a column from previously identified
that of the ALIGN= attribute of the <IMG> tag. tabular data.
Standard: HTML 3.2; deprecated Standard: Internet Explorer 4
in HTML 4 in favor of Common: No
Style Sheets Sample:
Common: Yes
Sample: <DIV DATASRC=”#data_table”>
<INPUT TYPE=TEXT NAME=”color”
<INPUT TYPE=IMAGE SRC=”picture.gif” DATAFLD=”colorvals”>
ALIGN=RIGHT>
50 <INPUT>

DATASRC=“…” NAME=“…”
E

Specifies the location of tabular data to be Gives a name to the value you pass to the form
bound. processor. For example, if you collect a person’s
C

last name with an input method of type TEXT,


Standard: Internet Explorer 4
Common: No you assign the NAME= attribute something like
Sample: “lastname.” This establishes a name-value pair
N

for the form processor.


<INPUT TYPE=TEXT DATASRC=”#data_table”
DATAFLD=”dataval1”> Standard: HTML 2
Common: Yes
E

DISABLED=“…” Sample:
Disables an instance of the input method so Enter your phone number: <INPUT TYPE=”text”
R

that data cannot be accepted or submitted. NAME=”phone” SIZE=10>


Standard: HTML 4 NOTAB
Common: No
E

Sample: Removes the input element from the tab order.

<INPUT TYPE=PASSWORD NAME=”Pass” Standard: Internet Explorer


F

DISABLED> Common: No
Sample:
ID=”n”
Hair color:
E

Assigns a unique ID selector to an instance of <INPUT TYPE=TEXT NAME=”hcolor” NOTAB>


the <INPUT> tag. When you then assign a style
READONLY
R

to that ID selector, it affects only that one


instance of the <INPUT> tag. Indicates that changes to the input method
data cannot occur.
Standard: HTML 4
Common: No Standard: HTML 4
Sample: Common: No
S

Sample:
Age:
<INPUT TYPE=TEXT NAME=”age” ID=“123”> <INPUT TYPE=TEXT NAME=”desc”

VALUE=”1/4 inch flange assy”


MAXLENGTH=”n” READONLY>
R

Indicates the number of characters you can SIZE=”n”


enter into a text input field and is only useful
to input methods of type TEXT or PASSWORD. Specifies the width of the input method (in
E

Contrary to the SIZE= attribute, MAXLENGTH= characters). This applies only to input methods
does not affect the size of the input field of type TEXT or PASSWORD. HTML 4 specifies
shown on the screen. size measurements in pixels for all other input
T

methods, but pixel size specification is little


Standard: HTML 2
supported.
Common: Yes
Sample:
S

Standard: HTML 2
Common: Yes
Phone: <INPUT TYPE=TEXT NAME=”phone”
Sample:
MAXLENGTH=11>
A

Your Age: <INPUT TYPE=”text” NAME=”Age”


SIZE=5><BR>
M
<INPUT> 51 1

SRC=“URL” TYPE=“…”
Implements a graphic image for a submit but- Indicates the kind of input method to use.
ton. For this to work, indicate TYPE=IMAGE. Valid values are TEXT, PASSWORD, RADIO,
CHECKBOX, SUBMIT, RESET, IMAGE, FILE, HIDDEN,
Standard: HTML 3.2
Common: Yes and BUTTON.
Sample: TEXT produces a simple one-line text input field
<INPUT TYPE=IMAGE SRC=”/images/push- that is useful for obtaining simple data such as a
button.gif”> person’s name, a person’s age, a dollar amount,
and so on. To collect multiple lines of text, use
STYLE=“…” the <TEXTAREA> tag.
Specifies Style Sheet commands that apply to PASSWORD gives the visitor a simple one-line text
the input element. input field similar to the TEXT type. When visi-
Standard: HTML 4 tors enter data into the field, however, they do
Common: No not see what they type.
Sample:
TYPE=RADIO produces a small radio button that
<INPUT TYPE=RADIO NAME=”food” can be turned on and off. Use radio buttons
VALUE=”1” STYLE=”background: red”> when you want a visitor to select only one of
TABINDEX=“n” several items. For multiple-value selections, see
the CHECKBOX type or the <SELECT> tag.
Specifies where the input method appears in
the tab order. For example, TABINDEX=3 places the SUBMIT produces a button that, when selected,
cursor at the input element after the visitor submits all the name-value pairs to the form
presses the Tab key three times. processor.

Standard: Internet Explorer RESET sets all the input methods to their empty
Common: No or default settings.
Sample:
TYPE=IMAGE replaces the submit button with an
Credit card number: image. The behavior of this value is identical
<INPUT TYPE=TEXT NAME=”ccard” to that of the submit button, except that the
TABINDEX=5> x,y coordinates of the mouse position over the
TITLE=“…” image when selected are also sent to the form
processor.
Specifies text assigned to the tag. You might
use this attribute for context-sensitive help BUTTON creates a button with no specific behav-
within the document. Browsers may use this to ior that can interact with scripts.
show tool tips over the input method. Standard: HTML 2
Standard: HTML 4 Common: Yes
Common: No Sample:
Sample: <FORM METHOD=POST ACTION=”/cgi-
<INPUT TYPE=RADIO NAME=”cc” bin/thingie”>
VALUE=”visa” TITLE=”Visa”> Name: <INPUT TYPE=TEXT NAME=”name”><BR>
Password: <INPUT TYPE=PASSWORD
NAME=”pass”><BR>
52 <INPUT>

Ice Cream: Vanilla<INPUT TYPE=RADIO Attribute Information


E

VALUE=”1” CHECKED NAME=”ice_cream”>


Chocolate<INPUT TYPE=RADIO VALUE=”2”
NAME=”ice_cream”><br>
CITE=“URL”
C

<INPUT TYPE=SUBMIT VALUE=”Send Data…”> Indicates address of reference (definitive


</FORM> source, for example) for insertion.
USEMAP=“URL”
N

Standard: HTML 4
Common: No
Indicates the relative or absolute location of a
Sample:
client-side image map to use with the form.
E

<INS CITE=”http://www.w3.org/”>HTML 2 was


Standard: HTML 4 used for 2 years.</INS>
Common: No
Sample: CLASS=“…”
R

<INPUT SRC=”mapimage.gif” Indicates which style class applies to the <INS>


USEMAP=”maps.html#map1”> element.
E

VALUE=“…” Standard: HTML 4


Common: No
Sets the default input value method. Required
F

Sample:
when <INPUT> is set to TYPE=RADIO or CHECKBOX.
<INS CLASS=”joeadd”>POP stands for Post
Standard: HTML 2
E

Office Protocol</INS>
Common: Yes
Sample: DATETIME=“…”
R

<INPUT TYPE=HIDDEN NAME=”id” Indicates the date and time in precisely this for-
VALUE=”123”> mat: YYYY-MM-DDThh:mm:ssTZD. For example,
Other Attributes 1997-07-14T08:30:00-07:00 indicates July 14,
1997, at 8:30 AM, in U.S. Mountain Time (7 hours
This tag also accepts the lang, dir, onfocus, from Greenwich time). This time could also be
S

onblur, onselect, onchange, onClick, presented as 1997-07-14T08:30:00Z.


onDblClick, onMouseDown, onMouseUp,
onMouseOver, onMouseMove, onMouseOut, Standard: HTML 4

Common: No
onKeyPress, onKeyDown, and onKeyUp attrib-
Sample:
utes. See the Element-Independent Attributes
R

section of this reference for definitions and <INS DATETIME=”1997-07-14T08:30:00Z”>POP


examples. stands for Post
Office Protocol</INS>
E

<INS> ID=”…”
Assigns a unique ID selector to an instance of
T

Indicates text to be inserted in the document.


the <INS> tag. When you then assign a style to
May be either block-level or inline, as necessary.
that ID selector, it affects only that one instance
Standard: HTML 4 of the <INS> tag.
S

Common: No
Paired: Yes Standard: HTML 4
Sample: Common: No
A

Sample:
<P>HTTP stands for HyperText
<INS>Transfer</INS>Protocol</P>
M
<KBD> 53 1

<INS ID=“123”>WWW stands for World Wide Attribute Information


Web</INS>
STYLE=“…” ACTION=“URL”
Specifies Style Sheet commands that apply to Specifies the URL of the application that
the inserted text. processes the search query. If you don’t include
ACTION=, the query goes to a URL formed from
Standard: HTML 4 the document base (see the <BASE> tag).
Common: No
Sample: Standard: HTML 2
Common: Yes
<INS STYLE=”background: blue;
Sample:
color: white”>ESP stands for
extra-sensory perception.</INS> <ISINDEX ACTION=”/cgi-bin/index-search”>
TITLE=“…” PROMPT=“…”
Specifies text assigned to the tag. You might Changes the input prompt for keyword index
use this attribute for context-sensitive help searches. If you don’t specify PROMPT=, the
within the document. Browsers may use this to browser displays a default prompt.
show tool tips over the inserted text.
Standard: HTML 3.2
Standard: HTML 4 Common: Yes
Common: No Sample:
Sample:
<ISINDEX PROMPT=”Search for something”>
<INS TITLE=”Definition”>More deleted

K
text.</INS>
Other Attributes
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp,
onMouseOver, onMouseMove, onMouseOut,
<KBD>
onKeyPress, onKeyDown, and onKeyUp attributes. Specifies keyboard input within a document.
See the Element-Independent Attributes section
Standard: HTML 2
of this reference for definitions and examples.
Common: Yes
Paired: Yes
Sample:
<ISINDEX>
Press <KBD>CTRL+S</KBD> to save your
Inserts an input field into the document so document.
that visitors can enter search queries. The
queries then go to a CGI application indicated Attribute Information
by the ACTION= attribute.
Standard: HTML 2; deprecated in HTML CLASS=“…”
4 in favor of <FORM>
Indicates which style class applies to the <KBD>
Common: Yes
Paired: No element.
Sample: Standard: HTML 4
<ISINDEX PROMPT=”Keyword Search” Common: No
ACTION=”/cgi-bin/search.cgi”> Sample:
Now press the <KBD CLASS=”casual”>F4
</KBD> key!
54 <KBD>

ID=”…”

L
E

Assigns a unique ID selector to an instance of


the <KBD> tag. When you then assign a style to
C

that ID selector, it affects only that one instance


of the <KBD> tag. <LABEL>
Standard: HTML 4 Provides identifying text for a form widget.
N

Common: No
Sample: Standard: HTML 4
Common: No
Press <KBD ID=“123”>F1</KBD> for help.
E

Paired: Yes
Sample:
STYLE=“…”
<LABEL FOR=”idname”>First Name</LABEL>
R

Specifies Style Sheet commands that apply to <INPUT TYPE=”TEXT” ID=”idname”>


the text within the <KBD> tags.
Standard: HTML 4 Attribute Information
E

Common: No
Sample: ACCESSKEY=“…”
F

<KBD STYLE=”background: red”>F10</KBD> Assigns a keystroke to the element.


TITLE=“…” Standard: HTML 4
E

Common: No
Specifies text assigned to the tag. You might Sample:
use this attribute for context-sensitive help
R

within the document. Browsers may use this to <LABEL FOR=”idname” ACCESSKEY=H>
show tool tips over the keyboard text. CLASS=“…”
Standard: HTML 4 Indicates which style class applies to the
Common: No
<INPUT> element.
Sample:
S

Standard: HTML 4
Now press the <KBD
Common: No
TITLE=”Keyboard stuff”>F4</KBD> key.
Sample:

Other Attributes <LABEL FOR=”idname” CLASS=”short”>First


R

This tag also accepts the lang, dir, onClick, Name</LABEL>


onDblClick, onMouseDown, onMouseUp, <INPUT TYPE=”TEXT” ID=”idname”>
onMouseOver, onMouseMove, onMouseOut, FOR=“…”
E

onKeyPress, onKeyDown, and onKeyUp attributes.


See the Element-Independent Attributes section Specifies the ID of the widget associated with
of this reference for definitions and examples. the label.
T

Standard: HTML 4
Common: No
Sample:
S

<LABEL FOR=”idname”>First Name</LABEL>


<INPUT TYPE=”TEXT” ID=”idname”>
A
M
<LAYER> 55 1

ID=“n” Other Attributes


Assigns a unique ID selector to an instance of This tag also accepts the lang, dir, onfocus,
the <INPUT> tag. When you then assign a style onblur, onselect, onchange, onClick, onDblClick,
to that ID selector, it affects only that one onMouseDown, onMouseUp, onMouseOver,
instance of the <INPUT> tag. onMouseMove, onMouseOut, onKeyPress,
onKeyDown, and onKeyUp attributes. See the
Standard: HTML 4
Common: No Element-Independent Attributes section of this
Sample: reference for definitions and examples.

<LABEL FOR=”idname” ID=”234”>First


Name</LABEL> <LAYER>
<INPUT TYPE=”TEXT” ID=”idname”>
Defines a layer within a document, which
STYLE=“…” you can than manipulate with JavaScript.
Specifies Style Sheet commands that apply to Specify the layer’s contents by placing HTML
the input element. between the <LAYER> tags or by using the SRC=
attribute.
Standard: HTML 4
Common: No Standard: Netscape Navigator 4
Sample: Common: No
Paired: Yes
<LABEL FOR=”idname” STYLE=”background : Sample:
red”>First Name</LABEL>
<INPUT TYPE=”TEXT” ID=”idname”> <LAYER SRC=”top.html” HEIGHT=100
WIDTH=100 Z-INDEX=4 NAME=”top”
TABINDEX=“n” VISIBILITY=SHOW>
</LAYER>
Specifies where the input method appears in
the tab order. For example, TABINDEX=3 places the Attribute Information
cursor at the input element after the visitor
presses the Tab key three times. ABOVE=“…”
Standard: HTML 4 Specifies the name of a layer above which the
Common: No
current layer should appear.
Sample:
Standard: Netscape Navigator 4
Credit card number:
Common: No
<INPUT TYPE=TEXT NAME=”ccard”
Sample:
TABINDEX=5>
<LAYER SRC=”grass.gif” Z-INDEX=1
TITLE=“…” NAME=”Grass” VISIBILITY=SHOW>
Specifies text assigned to the tag. You might <LAYER SRC=”dog.gif” ABOVE=”Grass”
use this attribute for context-sensitive help NAME=”Dog”>
within the document. Browsers may use this to
show tool tips over the input method.
Standard: HTML 4
Common: No
Sample:
<INPUT TYPE=RADIO NAME=”cc”
VALUE=”visa” TITLE=”Visa”>
56 <LAYER>

BACKGROUND=“URL” Standard: Netscape Navigator 4


E

Common: No
Specifies the relative or absolute location of an Sample:
image file that the browser tiles as the back-
<LAYER SRC=”hawk.jpg” CLIP=”20%,20%”>
C

ground of the layer.


</LAYER>
Standard: Netscape Navigator 4
Common: No HEIGHT=”n”
N

Sample: Specifies the vertical dimension of the layer (in


<LAYER Z-INDEX=5 NAME=”info” pixels or as a percentage of the browser win-
BACKGROUND=”goo.gif”> dow height).
E

<H1>Hi there</H1></LAYER>
Standard: Netscape Navigator 4
BELOW=“…” Common: No
R

Sample:
Specifies the name of a layer below which the
current layer should appear. <LAYER SRC=”frame.gif” ABOVE=”bg”
NAME=”frame” WIDTH=200 HEIGHT=200>
E

Standard: Netscape Navigator 4


Common: No LEFT=”n”
Sample:
F

Specifies the layer’s horizontal position (in pixels)


<LAYER BACKGROUND=”road.jpg” relative to the left edge of the parent layer. Use
NAME=”Road” UNDER=”Car”> the TOP= attribute for vertical positioning.
E

</LAYER>
Standard: Netscape Navigator 4
BGCOLOR=“#RRGGBB” or “...” Common: No
R

Sample:
Specifies the background color of the layer. Use
either the hexadecimal RGB values or the color <LAYER LEFT=100 TOP=150>
name. This layer is at {100,150}
</LAYER>
Standard: Netscape Navigator 4
S

Common: No NAME=“…”
Sample:
Gives the layer a name by which other layer

<LAYER BGCOLOR=#FF0011> definitions and JavaScript code can reference it.


<DIV ALIGN=CENTER>
<H1><BLINK>EAT AT JOES!</BLINK></H1> Standard: Netscape Navigator 4
R

</DIV> Common: No
</LAYER> Sample:
<LAYER SRC=”car.gif” NAME=”CarPic”
E

CLIP=“x1, y1, x2, y2”


ABOVE=”Road”>
Indicates the dimensions of a clipping rectan- </LAYER>
T

gle that specifies which areas of the layer are SRC=“URL”


visible. Areas outside this rectangle become
transparent. Specifies the relative or absolute location of the
S

file containing the contents of the layer.


You can give the x and y coordinates in pixels
or as percentages to indicate relative portions of Standard: Netscape Navigator 4
Common: No
A

the layer. You can omit x1 and y1 if you want to


clip from the top left corner of the layer. Sample:
<LAYER SRC=”ocean.jpg”></LAYER>
M
<LEGEND> 57 1

TOP=”n” <LEGEND>
Specifies the layer’s vertical position (in pixels) Specifies a description for a fieldset. Use inside
relative to the top edge of the parent layer. Use <FIELDSET> tags.
the LEFT= attribute for horizontal positioning.
Standard: HTML 4
Standard: Netscape Navigator 4 Common: No
Common: No Paired: Yes
Sample: Sample:
<LAYER LEFT=100 TOP=150> <FORM><FIELDSET>
This layer is at {100,150} <LEGEND VALIGN=TOP ALIGN=CENTER>
</LAYER> Test Grades For COOKING 101
</LEGEND>…
VISIBILITY={SHOW, HIDE, INHERIT}
</FORM>
Indicates whether the layer is initially visible.
VISIBILITY=SHOW indicates the layer is initially
visible. VISIBILITY=HIDE indicates the layer is Attribute Information
not initially visible. VISIBILITY=INHERIT indi-
cates the layer has the same initial visibility ALIGN={TOP, BOTTOM, LEFT, RIGHT}
attribute as its parent layer. Indicates whether the legend appears at the
Standard: Netscape Navigator 4 top, bottom, left, or right of the fieldset.
Common: No
Standard: HTML 4
Sample:
Common: No
<LAYER SRC=”grass.gif” Z-INDEX=1 Sample:
NAME=”Grass” VISIBILITY=SHOW>
<LEGEND ALIGN=TOP>
WIDTH=“n” Seattle Staff Directory
</LEGEND>
Specifies the horizontal dimension of the layer
(in pixels or as a percentage of the browser CLASS=“…”
window width). Indicates which style class applies to the
Standard: Netscape Navigator 4 <LEGEND> element.
Common: No Standard: HTML 4
Sample: Common: No
<LAYER SRC=”frame.gif” ABOVE=”bg” Sample:
NAME=”frame” WIDTH=200 HEIGHT=200> <LEGEND CLASS=”casual”>Hydrogen vs
Z-INDEX=”n” Oxygen</LEGEND>

Specifies where the layer appears in the stack ID=”…”


of layers. Higher values indicate a position Assigns a unique ID selector to an instance of
closer to the top of the stack. the <LEGEND> tag. When you then assign a style
Standard: Netscape Navigator 4 to that ID selector, it affects only that one
Common: No instance of the <LEGEND> tag.
Sample:
Standard: HTML 4
<LAYER Z-INDEX=0 NAME=”Bottom”> Common: No
You may never see this text if Sample:
other layers are above it.
<LEGEND ID=“123”>Great
</LAYER>
Painters</LEGEND>
58 <LEGEND>

STYLE=“…” Attribute Information


E

Specifies Style Sheet commands that apply to


the contents of the <LEGEND> tags. CLASS=“…”
C

Standard: HTML 4 Indicates which style class applies to the <LI>


Common: No element.
Sample:
N

Standard: HTML 4
<LEGEND STYLE=”background: red”> Common: No
Sample:
TITLE=“…”
E

<LI CLASS=”casual”>Dogs
Specifies text assigned to the tag. You might
use this attribute for context-sensitive help ID=n
R

within the document. Browsers may use this to Assigns a unique ID selector to an instance of
show tool tips over the legend. the <LI> tag. When you then assign a style to
Standard: HTML 4 that ID selector, it affects only that one instance
E

Common: Yes of the <LI> tag.


Sample:
Standard: HTML 4
F

<LEGEND TITLE=”of Sleepy Hollow”> Common: No


Sample:
Other Attributes
E

<LI ID=“123”>Bees</LI>
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp, STYLE=“…”
R

onMouseOver, onMouseMove, onMouseOut, Specifies Style Sheet commands that apply to


onKeyPress, onKeyDown, and onKeyUp attributes. the list item.
See the Element-Independent Attributes section
of this reference for definitions and examples. Standard: HTML 4
Common: No
Sample:
S

<LI> <LI STYLE=”background: red”>


Places items into ordered (see the <OL> tag),

TITLE=“…”
menu (see the <MENU> tag), directory (see the
<dir> tag), and unordered (see the <UL> tag) Specifies text assigned to the tag. You might
R

lists. use this attribute for context-sensitive help


within the document. Browsers may use this to
Standard: HTML 2 show tool tips over the list item.
E

Common: Yes
Paired: Yes, optional Standard: HTML 4
Sample: Common: No
T

Sample:
My favorite foods are:<UL>
<LI>Pepperoni Pizza <LI TITLE=”List Item”>Thingie
<LI>Lasagna
S

<LI>Taco Salad TYPE=“…”


<LI>Bananas Specifies the bullets for each unordered list
A

</UL>
item (see the <UL> tag) or the numbering for
each ordered list item (see the <OL> tag). If you
omit the TYPE= attribute, the browser chooses a
M

default type.
<LINK> 59 1

Valid TYPE values for unordered lists are DISC, within the <HEAD> section. For example, if
SQUARE, and CIRCLE. you access the current document by choosing
a hyperlink from the site’s home page, you can
Valid TYPE values for ordered lists are 1 for ara-
establish a relationship between the current
bic numbers, a for lowercase letters, A for upper-
document and the site’s home page (see the
case letters, i for lowercase roman numerals,
REL= attribute). At this time, however, most
and I for uppercase roman numerals.
browsers don’t use most of these relationships.
Standard: HTML 3.2 You can place several <LINK> tags within the
Common: Yes <HEAD> section of your document to define
Sample: multiple relationships.
<UL> With newer implementations of HTML, you
<LI TYPE=SQUARE>Food can also use the <LINK> tag to establish infor-
<OL>
mation about Cascading Style Sheets. Some
<LI TYPE=1>Spaghetti
<LI TYPE=1>Tossed Salad other relationships that the <LINK> tag defines
</OL> include the following:
</UL> CONTENTS: A table of contents.
VALUE=“…” INDEX: An index.
GLOSSARY: A glossary of terms.
Sets a number in an ordered list. Use this
COPYRIGHT: A copyright notice.
attribute to continue a list after interrupting it
NEXT: The next document in a series (use
with something else in your document. You
with REL=).
can also set a number in an ordered list with
PREVIOUS: The previous document in a series
the START= attribute of the <OL> tag.
(use with REV=).
Because unordered lists do not increment, the START: The first document in a series.
VALUE= attribute is meaningless when used HELP: A document offering help or more
with them. information.
Standard: HTML 3.2 BOOKMARK: A bookmark links to a important
Common: Yes entry point within a longer document.
Sample: STYLESHEET: An external Style Sheet.
ALTERNATE: Different versions of the same
<OL TYPE=1> document. When used with lang, ALTERNATE
<LI VALUE=5>Watch implies a translated document; when used
<LI>Compass with MEDIA, it implies a version for a differ-
</OL> ent medium.
Other Attributes Standard: HTML 2
This tag also accepts the lang, dir, onClick, Common: Yes
Paired: No
onDblClick, onMouseDown, onMouseUp,
Sample:
onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes. <HEAD>
See the Element-Independent Attributes section <TITLE>Prices</TITLE>
of this reference for definitions and examples. <LINK REL=Top HREF=
”http://www.raycomm.com/”>
<LINK REL=Search HREF=
<LINK> ”http://www.raycomm.com/search.html”>
</HEAD>
Establishes relationships between the current
document and other documents. Use this tag
60 <LINK>

Attribute Information REL=Top defines the site home page or the top of
E

the site hierarchy. REL=Contents usually defines


HREF=“URL” the location of a resource that lists the contents
of the site. REL=Index provides a link to an index
C

Indicates the relative or absolute location of of the site. REL=Glossary indicates the location
the resource you are establishing a relationship of a glossary resource. REL=Copyright indicates
to/from. the location of a copyright statement. REL=Next
N

Standard: HTML 2 and REL=Previous establish relationships


Common: Yes between documents or resources in a series.
Sample: REL=Help indicates the location of a help
E

resource. REL=Search specifies the location of a


<LINK REL=Prev HREF=”page1.html”>
search resource. REL=Style Sheet specifies infor-
MEDIA=“…” mation about Style Sheets.
R

Specifies the destination medium for style Standard: HTML 2


information. It may be a single type or a Common: Yes
E

comma-separated list. Media types include the Sample:


following: <LINK REL=Help HREF=”/Help/index.html”>
F

<LINK REL=Style Sheet HREF=”sitehead.css”>


Screen—for online viewing (default setting)
</HEAD>
Print—for traditional printed material and
for documents on screen viewed in print REV=“…”
E

preview mode
Establishes reverse relationships between the
Projection—for projectors
current document and other resources. One
R

Braille—for Braille tactile feedback devices


common use is REV=”made”, after which you
Speech—for a speech synthesizer can set the HREF= attribute to a mailto: URL to
All—applies to all devices contact the author of the document.
Standard: HTML 4 Standard: HTML 2
Common: No
S

Common: Yes
Sample: Sample:
<LINK MEDIA=SCREEN REL=”STYLESHEET” <LINK REV=made

HREF=”/global.css”> HREF=”mailto:[email protected]”>
NAME=“…”
R

TARGET=“…”
Specifies a name by which bookmarks, scripts, Specifies the name of a frame in which the ref-
and applets can reference the relationship. erenced link appears.
E

Standard: Internet Explorer 4 Standard: Internet Explorer 4


Common: No Common: No
T

Sample: Sample:
<LINK REL=”Search” HREF=”/search.html” <LINK TARGET=”_blank” REL=”Home”
NAME=”Search”> HREF=”http://www.mememe.com/”>
S

REL=“…” TITLE=“…”
A

Defines the relationship you are establishing Specifies text assigned to the tag that can be
between the current document and another used for context-sensitive help within the doc-
resource. The HTML 3.2 specification includes ument. Browsers may use this to show tool tips.
M

several standard values for the REL= attribute.


<MAP> 61 1

Standard: HTML 4
Common:
Sample:
Yes

<LINK REL=Top HREF=”/index.html”


TITLE=”Home Page”>
M
<MAP>
TYPE=“…”
Specifies a container for client-side image map
Specifies the MIME type of a Style Sheet to data. Inside the <MAP> container, you place
import with the <LINK> tag. instances of the <AREA> tag.
Standard: HTML 4 Standard: HTML 3.2
Common: No Common: Yes
Sample: Paired: Yes
<LINK REL=STYLESHEET TYPE=”text/css” Sample:
HREF=”/style/main.css”> <MAP NAME=”mainmap”> <AREA NOHREF
Other Attributes ALT=”Home” SHAPE=RECT COORDS=”0,0,100,100”>
<AREA HREF=”yellow.html” ALT=”Yellow”
This tag also accepts the lang, dir, onfocus, SHAPE=RECT COORDS=”100,0,200,100”>
onblur, onchange, onselect, onClick, <AREA HREF=”blue.html” ALT=”Blue”
onDblClick, onMouseDown, onMouseUp, SHAPE=RECT COORDS=”0,100,100,200”>
onMouseOver, onMouseMove, onMouseOut, <AREA HREF=”red.html” ALT=”Red”
SHAPE=RECT COORDS=”100,100,200,200”>
onKeyPress, onKeyDown, and onKeyUp attributes.
</MAP>
See the Element-Independent Attributes section
of this reference for definitions and examples. Attribute Information

<LISTING> CLASS=“…”

Specifies preformatted text to include within a Indicates which style class applies to the
document. Unlike the <PRE> tags, the browser element.
does not interpret HTML tags within the Standard: HTML 4
<LISTING>tags. HTML 3.2 declared this tag Common: No
obsolete, so use <PRE> instead. Sample:
Standard: Obsolete <MAP CLASS=”casual” NAME=”simba”>
Common: Yes
Paired: Yes ID=“…”
Sample: Indicates an identifier to associate with the
The output from these reports is shown map. You can also use this to apply styles to
below. the object.
<LISTING>
Company Q1 Q2 Q3 Q4
Standard: HTML 4
—————- ——— ——— ———- ———-
Common: No
Widget Inc. 4.5m 4.6m 6.2m 4.5m
Sample:
Acme Widget 5.9m 10.2m 7.3m 6.6m <MAP ID=”123” NAME=”simba”>
West Widget 2.2m 1.3m 3.1m 6.1m
</LISTING>
62 <MAP>

NAME=“…” Attribute Information


E

Establishes a name for the map information


you can later reference by the USEMAP=.attribute ALIGN={LEFT, CENTER, RIGHT, TOP,
BOTTOM}
C

of the <IMG> tag.


Standard: HTML 3.2 Specifies the alignment of text outside the
Common: Yes marquee.
N

Sample:
Standard: Internet Explorer
<MAP NAME=”housemap”> Common: No
. . . Sample:
E

<IMG SRC=”house.gif” USEMAP=”#housemap”


<MARQUEE WIDTH=200 HEIGHT=50
BORDER=0 ALT=”Map of House”>
ALIGN=LEFT DIRECTION=LEFT>
R

STYLE=“…” How To Groom Your Dog</MARQUEE>

Specifies Style Sheet commands that apply to BEHAVIOR={SLIDE, SCROLL, ALTERNATE}


E

the contents within the <MAP> tags. Indicates the type of scrolling. BEHAVIOR=
Standard: HTML 4 SCROLL scrolls text from one side of the marquee,
Common: No across, and off the opposite side. BEHAVIOR=
F

Sample: SLIDE scrolls text from one side of the marquee,


<MAP STYLE=”background: black”> across, and stops when the text reaches the
E

opposite side. BEHAVIOR=ALTERNATE bounces


TITLE=“…” the marquee text from one side to the other.
R

Specifies text assigned to the tag. You might Standard: Internet Explorer
use this attribute for context-sensitive help Common: No
within the document. Browsers may use this to Sample:
show tool tips. <MARQUEE DIRECTION=LEFT
Standard: HTML 4 BEHAVIOR=ALTERNATE>
S

Common: No GO BEARS! WIN WIN WIN!


Sample: </MARQUEE>
BGCOLOR=“#RRGGBB” or “...”

<MAP TITLE=”Image map spec”>


Specifies the background color of the marquee.
<MARQUEE>
R

Use a hexadecimal RGB color value or a color


Displays a scrolling text message within a name.
document. Only Internet Explorer recognizes Standard: Internet Explorer
E

this tag. Common: No


Sample:
Standard: Internet Explorer
T

Common: No <MARQUEE BGCOLOR=”red” DIRECTION=LEFT>


Paired: Yes Order opera tickets here!
Sample: </MARQUEE>
S

<MARQUEE DIRECTION=LEFT BEHAVIOR=SCROLL


SCROLLDELAY=250 SCROLLAMOUNT=10>
A

Big sale today on fuzzy wuzzy widgets!


</MARQUEE>
M
<MARQUEE> 63 1

DATAFLD=“…” HSPACE=”n”
Selects a column from a block of tabular data. Specifies the size of the margins (in pixels) to
the left and right of the marquee.
Standard: Internet Explorer 4
Common: No Standard: Internet Explorer
Sample: Common: No
Sample:
<MARQUEE DATASRC=”#data_table”
DATAFLD=”nitems”> <MARQUEE DIRECTION=LEFT HSPACE=25>
Check out our detailed product
DATAFORMATAS={TEXT, HTML, NONE} descriptions!</MARQUEE>
Specifies how items selected from tabular data ID=“…”
format within the document.
Assigns a unique ID selector to an instance of
Standard: Internet Explorer 4
the <MARQUEE> tag. When you then assign a
Common: No
Sample: style to that ID selector, it affects only that one
instance of the <MARQUEE> tag.
<MARQUEE DATASRC=”#data_table”
DATAFLD=”nitems” DATAFORMATAS=HTML> Standard: Internet Explorer 4
Common: No
DATASRC=“…” Sample:
Specifies the location of tabular data to be <MARQUEE ID=”3d4”>
bound within the document.
LOOP={n, INFINITE}
Standard: Internet Explorer 4
Common: No Controls the appearance of the marquee text.
Sample: Standard: Internet Explorer
<MARQUEE DATASRC=”#data_table” Common: No
DATAFLD=”nitems”> Sample:
<MARQUEE LOOP=5>
DIRECTION={LEFT, RIGHT}
December 12 is our big, all-day sale!
Indicates the direction in which the marquee </MARQUEE>
text scrolls. SCROLLAMOUNT=”n”
Standard: Internet Explorer
Indicates how far (in pixels) the marquee text
Common: No
Sample: shifts between redraws. Decrease this value for
a smoother (but slower) scroll; increase it for a
<MARQUEE DIRECTION=LEFT> faster (but bumpier) scroll.
Order opera tickets here!
</MARQUEE> Standard: Internet Explorer
Common: No
HEIGHT=”n” Sample:
Specifies the vertical dimension of the mar- <MARQUEE SCROLLAMOUNT=10
quee (in pixels). SCROLLDELAY=40>Plant a tree for Arbor Day!
</MARQUEE>
Standard: Internet Explorer
Common: No SCROLLDELAY=”n”
Sample:
Indicates how often (in milliseconds) the mar-
<MARQUEE WIDTH=300 HEIGHT=50> quee text redraws. Increase this value to slow
GO BEARS!</MARQUEE>
64 <MARQUEE>

the scrolling action; decrease it to speed the <MENU>


E

scrolling action.
Defines a menu list. Use the <LI> tag to indi-
Standard: Internet Explorer
cate list items. Use <UL> instead of this depre-
Common: No
C

Sample: cated element.

<MARQUEE DIRECTION=RIGHT Standard: HTML 2; deprecated


N

SCROLLDELAY=30>Eat at Joe’s!</MARQUEE> in HTML 4


Common: No
STYLE=“…” Paired: Yes
Sample:
E

Specifies Style Sheet commands that apply to


the text within the <MARQUEE> tags. Now you can:<MENU>
<LI>Eat the sandwich
R

Standard: Internet Explorer 4 <LI>Place the sandwich in the fridge


Common: No <LI>Feed the sandwich to the dog
Sample: </MENU>
E

<MARQUEE STYLE=”background: red”>


Attribute Information
TITLE=“…”
F

Specifies text assigned to the tag. You might CLASS=“…”


use this attribute for context-sensitive help Indicates which style class applies to the
E

within the document. Browsers may use this to <MENU> element.


show tool tips over the marquee.
Standard: HTML 4
R

Standard: Internet Explorer 4 Common: No


Common: No Sample:
Sample:
<MENU CLASS=”casual”>
<MARQUEE TITLE=”Scrolling Marquee”> <LI>Information
<LI>Members
VSPACE=”n”
S

<LI>Guests
Specifies the size of the margins (in pixels) at </MENU>
the top and bottom of the marquee.

COMPACT
Standard: Internet Explorer Specifies that the menu list appear in a space-
R

Common: No
saving form.
Sample:
Standard: HTML 2; deprecated
<MARQUEE DIRECTION=LEFT VSPACE=25>
in HTML 4
E

Check out our detailed product


Common: Yes
descriptions!</MARQUEE>
Sample:
T

WIDTH=”n” <H2>Drinks Available</H2>


Specifies the horizontal dimension (in pixels) <MENU COMPACT>
of the marquee. <LI>Cola</LI>
S

<LI>Fruit Drink</LI>
Standard: Internet Explorer <LI>Orange Juice</LI>
Common: No <LI>Water</LI>
A

Sample: </MENU>
<MARQUEE WIDTH=300>
Go Bears!</MARQUEE>
M
<META> 65 1

ID=“…” <META>
Assigns a unique ID selector to an instance of Specifies information about the document to
the <MENU> tag. When you then assign a style to browsers, applications, and search engines.
that ID selector, it affects only that one Place the <META> tag within the document
instance of the <MENU> tag. head. For example, you can use the <META> tag
Standard: HTML 4 to instruct the browser to load a new docu-
Common: No ment after 10 seconds (client-pull), or you can
Sample: specify keywords for search engines to associ-
You’ll need the following:
ate with your document.
<MENU ID=“123”> Standard: HTML 2
<LI>Extra socks Common: Yes
<LI>Snack crackers Paired: No
<LI>Towel Sample:
</MENU>
<HEAD>
STYLE=“…” <TITLE>Igneous Rocks In North America
</TITLE>
Specifies Style Sheet commands that apply to <META HTTP-EQUIV=”Keywords”
the menu list. CONTENT=”Geology, Igneous, Volcanos”>
Standard: HTML 4 </HEAD>
Common: Yes
Sample: Attribute Information
<MENU STYLE=”background: black; color: CONTENT=“…”
white”>
Assigns values to the HTTP header field.
TITLE=“…” When using the REFRESH HTTP header, assign
Specifies text assigned to the tag. You might a number along with a URL to the CONTENT=
use this attribute for context-sensitive help attribute; the browser then loads the specified
within the document. Browsers may use this to URL after the specified number of seconds.
show tool tips over the menu list. Standard: HTML 2
Standard: HTML 4 Common: Yes
Common: No Sample:
Sample: <META HTTP-EQUIV=”Refresh”
<MENU TITLE=”Menu List”> CONTENT=”2; URL=nextpage.html”>

Other Attributes HTTP-EQUIV=“…”


This tag also accepts the lang, dir, onClick, Indicates the HTTP header value you want to
onDblClick, onMouseDown, onMouseUp, define, such as Refresh, Expires, or Content-
onMouseOver, onMouseMove, onMouseOut, Language. Other header values are listed in
onKeyPress, onKeyDown, and onKeyUp attributes. RFC2068.
See the Element-Independent Attributes sec- Standard: HTML 2
tion of this reference for definitions and Common: Yes
examples. Sample:
<META HTTP-EQUIV=”Expires” CONTENT=
”Tue, 04 Aug 1997 22:39:22 GMT”>
66 <META>

NAME=“…” WIDTH=“n”
E

Specifies the name of the association you are Indicates the horizontal dimension (in pixels
defining, such as Keywords or Description. . or as a percentage of the total width available)
C

of each column.
Standard: HTML 2
Common: Yes Standard: Netscape Navigator 4
Sample: Common: No
N

Sample:
<META NAME=”Keywords” CONTENT=
”travel,automobile”> <MULTICOL COLS=2 WIDTH=”30%”>
<META NAME=”Description” CONTENT=”The Nash
E

Metro moves fast and goes beep beep.”>


Other Attributes
N
R

This tag also accepts the lang and dir attrib-


utes. See the Element-Independent Attributes
E

section of this reference for definitions and


examples.
<NOBR>
Disables line-wrapping for a section of text. To
F

force a word-break within a <NOBR> clause, use


<MULTICOL> the <WBR> tag.
E

Formats text into newspaper-style columns. Standard: Netscape Navigator


Common: Yes
Standard: Netscape Navigator 4
Paired: Yes
Common: No
R

Sample:
Paired: Yes
Sample: <NOBR>This entire line of text will
remain on one single line in the
<MULTICOL COLS=2 GUTTER=10>
browser window until the closing
. . .
tag appears. That doesn’t happen
</MULTICOL>
S

until right now.</NOBR>


Attribute Information Attribute Information

COLS=“n” CLASS=“…”
R

Indicates the number of columns.


Indicate which style class applies to the
Standard: Netscape Navigator 4 element.
E

Common: No
Sample: Standard: Netscape Navigator
Common: No
<MULTICOL COLS=4> Sample:
T

GUTTER=“n” <NOBR CLASS=”casual”>

ID=“…”
S

Indicates the width of the space (in pixels)


between multiple columns.
Assigns a unique ID selector to an instance of
Standard: Netscape Navigator 4 the <NOBR> tag. When you then assign a style to
A

Common: No that ID selector, it affects only that one


Sample: instance of the <NOBR> tag.
M

<MULTICOL COLS=3 GUTTER=15>


<OBJECT> 67 1

Standard: Netscape Navigator Standard: HTML 4


Common: No Common: No
Sample: Sample:
You’ll need the following: <NOFRAMES TITLE=”HTML for nonframed
<NOBR ID=“123”> browsers”>
STYLE=“…”
<NOSCRIPT>
Specifies Style Sheet commands that apply to
the nonbreaking text. Provides HTML content for browsers that do
not support scripts. Use the <NOSCRIPT> tags
Standard: Netscape Navigator inside a script definition.
Common: Yes
Sample: Standard: HTML 4
Common: No
<NOBR STYLE=”background: black”> Paired: Yes
Sample:
<NOFRAMES> <NOSCRIPT>
Provides HTML content for browsers that do Because you can see this, you can tell that
not support frames or are configured not to your browser will not run (or is set not to
run) scripts. </NOSCRIPT>
present frames. You can include a <BODY> tag
within the <NOFRAMES> section to provide addi-
tional formatting and Style Sheet features.
Standard:
Common:
Paired:
HTML 4
Yes
Yes
O
Sample: <OBJECT>
<FRAMESET COLS=”*,70”> Embeds a software object into a document.
<FRAME SRC=”frames/body.html” The object can be an ActiveX object, a Quick-
NAME=”body”> Time movie, or any other objects or data that a
<FRAME SRC=”frames/side.html” browser supports.
NAME=”side”>
</FRAMESET> Use the <PARAM> tag to supply parameters to
<NOFRAMES> the embedded object. You can place messages
<p>Your browser doesn’t support frames. and other tags between the <OBJECT> tags for
Please follow the links below for the rest browsers that do not support embedded
of the story. objects.
<p><a href=”Prices.html”>Prices</a> | <a
href=”About.html”>About Us</a> | <a Standard: HTML 4
href=”Contact.html”>Contact Us</a> Common: No
</NOFRAMES> Paired: Yes
Sample:
Attribute Information <OBJECT CLASSID=”/thingie.py”>
<PARAM NAME=”thing” VALUE=1>
TITLE=“…” Sorry. Your browser does not support
Specifies text assigned to the tag. You might embedded objects. If it supported these
objects you would not see this message.
use this attribute for context-sensitive help
</OBJECT>
within the document. Browsers may use this to
show tool tips.
68 <OBJECT>

Attribute Information Standard: HTML 4


E

Common: No
Sample:
ALIGN={LEFT, CENTER, RIGHT, TEXTTOP,
MIDDLE, TEXTMIDDLE, BASELINE, <OBJECT DATA=“shocknew.dcr”
C

TEXTBOTTOM, BASELINE} TYPE=”application/director” WIDTH=288


HEIGHT=200 BORDER=10>
Indicates how the embedded object lines up rela-
N

tive to the edges of the browser windows and/or CODEBASE=“…”


other elements within the browser window. Specifies the absolute or relative location of the
Using ALIGN=LEFT, ALIGN=RIGHT, or ALIGN= base directory in which the browser will look
E

CENTER will cause the embedded object to float for data and other implementation files.
between the edges of the window either to the Standard: HTML 4
R

left, right, or evenly between. The behavior is Common: No


similar to that of the ALIGN= attribute of the Sample:
<IMG> tag.
<OBJECT CODEBASE=”/~fgm/code/”>
E

ALIGN=TEXTTOP aligns the top of the embedded </OBJECT>


object with the top of the surrounding text. CODETYPE=“…”
F

ALIGN=TEXTMIDDLE aligns the middle of the


Specifies the MIME type for the embedded
embedded object with the middle of the sur- object’s code.
E

rounding text.
Standard: HTML 4
ALIGN=TEXTBOTTOM aligns the bottom of the Common: No
R

embedded object with the bottom of the sur- Sample:


rounding text.
<OBJECT
ALIGN=BASELINE aligns the bottom of the CODETYPE=”application/x-msword”>
embedded object with the baseline of the sur- </OBJECT>
rounding text. CLASS=“…”
S

ALIGN=MIDDLE aligns the middle of the embed-


Indicates which style class applies to the
ded object with the baseline of the surround- element.

ing text.
Standard: HTML 4
Standard: HTML 4; deprecated in favor
R

Common: No
of Style Sheets Sample:
Common: No
Sample: <OBJECT CLASS=”casual”
E

CODETYPE=”application/x-msword”>
<OBJECT DATA=“shocknew.dcr” </OBJECT>
TYPE=”application/director” WIDTH=288
T

HEIGHT=200 ALIGN=RIGHT> CLASSID=“…”


BORDER=“n” Specifies the URL of an object resource.
S

Indicates the width (in pixels) of a border Standard: HTML 4


around the embedded object. BORDER=0 indi- Common: No
cates no border. Sample:
A

<OBJECT
CLASSID=”http://www.raycomm.com/
M

bogus.class”>
<OBJECT> 69 1

DATA=“URL” Sample:
Specifies the absolute or relative location of the <OBJECT DATA=“shocknew.dcr”
embedded object’s data. TYPE=”application/director” WIDTH=288
HEIGHT=200 VSPACE=10 HSPACE=10>
Standard: HTML 4
Common: No HSPACE=“n”
Sample:
Specifies the size of the margins (in pixels) to
<OBJECT DATA=”/~fgm/goo.AVI”> the left and right of the embedded object.
</OBJECT>
Standard: HTML 4
DATAFLD=“…” Common: No
Sample:
Selects a column from a block of tabular data.
<OBJECT DATA=“shocknew.dcr”
Standard: Internet Explorer 4 TYPE=”application/director” WIDTH=288
Common: No HEIGHT=200 VSPACE=10 HSPACE=10>
Sample:
ID=“…”
<OBJECT DATA=”dataview.ocx”
DATASRC=”#data_table” Indicates an identifier to associate with the
DATAFLD=”datafld1”> embedded object. You can also use this to
apply styles to the object.
DATASRC=“…”
Standard: HTML 4
Specifies the location of tabular data to be Common: No
bound within the document. Sample:
Standard: Internet Explorer 4 <OBJECT DATA=“shocknew.dcr”
Common: No TYPE=”application/director” WIDTH=288
Sample: HEIGHT=200 VSPACE=10 HSPACE=10
<OBJECT DATA=”dataview.ocx” ID=”swave2”>
DATASRC=”#data_table”>
NAME=“…”
DECLARE Specifies the name of the embedded object.
Defines the embedded object without actually Standard: HTML 4
loading it into the document. Common: No
Standard: HTML 4 Sample:
Common: No <OBJECT CLASSID=”clsid:99B42120-6EC7-11CF-
Sample: A6C7-00AA00A47DD3” NAME=”Very Cool Thingie”>
<OBJECT CLASSID=”clsid:99B42120-6EC7-11CF- </OBJECT>
A6C7-00AA00A47DD3” DECLARE> SHAPES
</OBJECT>
Indicates that the embedded object has shaped
HEIGHT=“n” hyperlinks (that is, image maps).
Specifies the vertical dimension (in pixels) of Standard: HTML 4
the embedded object. Common: No
Standard: HTML 4 Sample:
Common: No <OBJECT DATA=”navbar.gif” SHAPES>
70 <OBJECT>

STANDBY=“…” Standard: HTML 4


E

Common: No
Specifies a message that the browser displays Sample:
while the object is loading.
<OBJECT DATA=“shocknew.dcr”
C

Standard: HTML 4 TYPE=”application/x-director” WIDTH=288


Common: No HEIGHT=200 VSPACE=10 HSPACE=10>
Sample:
N

USEMAP=“URL”
<OBJECT
STANDBY=”Please wait. Movie loading.” Indicates the relative or absolute location of a
WIDTH=100 HEIGHT=250> client-side image map to use with the embed-
E

<PARAM NAME=SRC VALUE=”TheEarth.AVI”> ded object.


<PARAM NAME=AUTOSTART VALUE=TRUE>
<PARAM NAME=PLAYBACK VALUE=FALSE> Standard: HTML 4
R

</OBJECT> Common: No
Sample:
TABINDEX=“n”
<OBJECT USEMAP=”maps.html#map1”>
E

Indicates the place of the embedded object in


the tabbing order.
VSPACE=“n”
F

Standard: HTML 4 Specifies the size of the margin (in pixels) at


Common: No the top and bottom of the embedded object.
Sample:
E

Standard: HTML 4
<OBJECT Common: No
CLASSID=”clsid:99B42120-6EC7-11CF-A6C7- Sample:
R

00AA00A47DD3” TABINDEX=3> <OBJECT DATA=”shocknew.dcr”


</OBJECT> TYPE=”application/director” WIDTH=288
TITLE=“…” HEIGHT=200 VSPACE=10 HSPACE=10>
</OBJECT>
Specifies text assigned to the tag. You might
WIDTH=“n”
S

use this attribute for context-sensitive help


within the document. Browsers may use this to Indicates the horizontal dimension (in pixels)
show tool tips over the embedded object. of the embedded object.

Standard: HTML 4 Standard: HTML 4


R

Common: No Common: No
Sample: Sample:
<OBJECT <OBJECT DATA=“shocknew.dcr”
E

TITLE=”Earth Movie” WIDTH=100 TYPE=”application/director” WIDTH=288


HEIGHT=250> HEIGHT=200 VSPACE=10 HSPACE=10>
<PARAM NAME=SRC VALUE=”TheEarth.AVI”>
T

<PARAM NAME=AUTOSTART VALUE=TRUE> Other Attributes


<PARAM NAME=PLAYBACK VALUE=FALSE>
This tag also accepts the lang, dir, onClick,
</OBJECT>
S

onDblClick, onMouseDown, onMouseUp,


TYPE=“…” onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes.
A

Indicates the MIME type of the embedded


See the Element-Independent Attributes section
object.
of this reference for definitions and examples.
M
<OL> 71 1

<OL> that ID selector, it affects only that one


instance of the <OL> tag.
Contains a numbered (ordered) list.
Standard: HTML 4
Standard: HTML 2 Common: No
Common: Yes Sample:
Paired: Yes
Recommended bicycle accessories:
Sample:
<OL ID=“123”>
<OL TYPE=i> <LI>Water bottle
<LI>Introduction <LI>Helmet
<LI>Part One <LI>Tire pump
<OL TYPE=A> </OL>
<LI>Chapter 1
<LI>Chapter 2 START=“…”
</OL> Specifies the value at which the ordered list
</OL>
should start.
Attribute Information Standard: HTML 2
Common: Yes
CLASS=“…” Sample:

Indicates which style class applies to the <OL> <OL TYPE=A START=F>
element. STYLE=“”…”
Standard: HTML 4 Specifies Style Sheet commands that apply to
Common: No
the ordered list.
Sample:
Standard: HTML 4
<OL CLASS=”casual”>
Common: Yes
<LI>Check engine oil
Sample:
<LI>Check tire pressures
<LI>Fill with gasoline <OL STYLE=”background: black; color:
<OL> white”>
COMPACT TITLE=“…”
Indicates that the ordered list appears in a Specifies text assigned to the tag. You might
compact format. This attribute may not affect use this attribute for context-sensitive help
the appearance of the list as most browsers do within the document. Browsers may use this to
not present lists in more than one format. show tool tips over the ordered list.
Standard: HTML 2, deprecated Standard: HTML 4
in HTML 4 Common: No
Common: No Sample:
Sample:
<OL TITLE=”Ordered list”>
<OL COMPACT>
TYPE=“…”
ID=“n”
Specifies the numbering style of the ordered
Assigns a unique ID selector to an instance of list. Possible values are 1 for arabic numbers, i
the <OL> tag. When you then assign a style to for lower case roman numerals, I for uppercase

You might also like