Академический Документы
Профессиональный Документы
Культура Документы
E
C
T
N
For each tag’s attributes, we’ve provided sample code and indicated the following:
E
If tags and attributes appear in the HTML 4 standard, in the HTML 3.2 standard, or
in the HTML 2 standard, the version number appears next to Standard. We indicate
tags or attributes that are specific to a browser, such as Internet Explorer. In general, a
variety of browsers recognize technology-specific tags, such as those for frames, and
S
other browsers rarely recognize browser-specific tags. HTML 2 was the first official
HTML standard. The number of tags that this standard defined is small compared
with what is in use today. HTML 2 did not support tables, client-side image maps, or
’
frames. You can safely use all HTML 2 tags and attributes.
R
HTML 3.2 remains backward compatible with HTML 2, but provides many new
tags. Included in HTML 3.2 is support for tables, client-side image maps, embedded
applets, and many new attributes that help control alignment of objects within docu-
E
ments. You can assume that most browsers support or soon will support all HTML 3.2
tags and attributes.
T
HTML 4 remains backward compatible with other versions of HTML and expands
the capabilities to better address multiple languages and browser technologies such as
S
speech or Braille. Additionally, most formatting tags and attributes are deprecated
(strongly discouraged) in HTML 4 in favor of Style Sheets. At the time of writing, no
production browsers completely supported HTML 4, although Microsoft claimed that
A
!
Standard: HTML 2
Common: Yes
Paired: No
Sample:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD/ HTML 4
< !– – – –> Final//EN”>
Inserts comments into a document. Browsers
A
do not display comments, although comments
are visible in the document source.
Standard: HTML 2
Common: Yes
Paired: Yes <A>
Sample:
Also called the anchor tag, identifies a link or a
<!—— Here is the picture of Fido ——>
location within a document. You commonly
<IMG SRC=”fidopic.jpg”>
use this tag to create a hyperlink, using the
HREF= attribute. You can also use the <A> tag to
< !DOCTYPE> identify sections within a document, using the
Appears at the beginning of the document and NAME= attribute.
indicates the HTML version of the document. Standard: HTML 2
The HTML 2 standard is: Common: Yes
Paired: Yes
<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2 Sample:
//EN”>
<A HREF=”http://www.raycomm.com/”>Visit
The HTML 3.2 standard is:
RayComm</a>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD/ HTML 3.2
Final//EN”> Attribute Information
The HTML 4 standard is:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD/ HTML 4
ACCESSKEY=“…”
Final//EN”> Assigns a key sequence to the element.
4 <A>
Common: No
Sample: Assigns a unique ID selector to an instance of
the <A> tag. When you then assign a style to
<A HREF=”help.html” ACCESSKEY=”H”>
C
Common: No Sample:
Sample:
<A HREF=”#ingredients”>Ingredients</A><BR>
<A HREF=”next.html” CLASS=”casual”> <A NAME=”ingredients”><h1>Ingredients</H1>
Next</A>
REL=“…”
S
Standard: HTML 4
Common: No <A REV=”made”
Sample: HREF=”mailto:bob@company.com”>
E
Common: Yes
Sample:
<A HREF=”details.html”>More Info</a>
M
<ACRONYM> 5 1
SHAPE=“{RECT, CIRCLE, POLY}” Specifies text assigned to the tag that you can
use for context-sensitive help within the docu-
Specifies the type of shape used to represent ment. Browsers may use this to show tool tips
the clickable area. SHAPE=RECT indicates that the over the hyperlink.
shape is rectangular. SHAPE=CIRCLE specifies
that the shape is a circle. SHAPE=POLY indicates Standard: HTML 4
that the shape is a polygon represented by Common: Yes
three or more points. Sample:
ID=“…” <ADDRESS>
E
Common: No Sample:
Sample:
I live at:
<P><ACRONYM ID=“123”>HTTP</ACRONYM> stands
E
St.</ADDRESS>
tips over the text.
CLASS=“…”
Standard: HTML 4
’
CODE=“URL” HSPACE=“n”
E
Specifies the relative or absolute location of the Specifies an amount of blank space (measured
Java bytecode file on the server. in pixels) to the left and right of the Java
C
Sample:
<APPLET CODE=”http://www.raycomm.com/
checkers.class”> <APPLET HSPACE=”10”
Dang! Your browser does not support CODE=”/checkers.class”>
E
Java applets. You may want to consider Sorry. Due to the fact your browser
installing a newer web browser. does not support embedded Java
</APPLET> applets, you’ll have to play checkers
R
NAME=“…”
necessary Java class files on the WWW server.
If you set this attribute, you need not use Assigns the applet instance a name so that
F
explicit URLs in other references to the class other applets can identify it within the
files. For example, you would not need an document.
explicit reference in the CODE= attribute.
E
applets, you’d be looking at a very Passes program parameters to the Java applet.
attractive checkerboard right now.
</APPLET> Standard: HTML 3.2
’
Common: No
HEIGHT=“n” Sample:
R
Common: Yes
Sample: Sample:
<AREA SHAPE=”RECT” COORDS=”20,8,46,30”
<AREA SHAPE=”RECT” COORDS=”20,8,46,30”
HREF=”food.html”>
E
HREF=”food.html”>
ID=“…” STYLE=“…”
R
Assigns a unique ID selector to an instance of Specifies Style Sheet commands that apply to
the <AREA> tag. When you then assign a style to the image map area.
that ID selector, it affects this instance of the
E
Common: No
Sample: <AREA SHAPE=”RECT” COORDS=”20,8,46,30”
HREF=”food.html” STYLE=”background: red”>
<AREA ID=“123”>
E
TABINDEX=“n”
NOHREF
Indicates where the image map area appears in
R
Defines an image map area that does not link the tabbing order of the document.
to another document.
Standard: HTML 4
Standard: HTML 3.2 Common: Yes
Common: Yes Sample:
Sample:
S
NOTAB
Identifies which named frame the linked doc-
R
Excludes the image map area from the tab ument selected should load. For example,
order. when visitors select an area within an image
Standard: Internet Explorer map, the linked document may load in the
E
in HTML 4 in favor of
Style Sheets
HREF=“URL” Common: Yes
C
<BASE HREF=”http://www.raycomm.com/”>
comma-separated list of font names. The
TARGET=“…” browser selects the first name matching a font
R
available.
Identifies in which named frame you load a
document (see the HREF= attribute). Standard: HTML 3.2; deprecated
in HTML 4 in favor of
E
<BASEFONT> SIZE=“n”
Specifies the font size of normal text within a
R
Style Sheets
Standard: HTML 3.2; deprecated
in HTML 4 in favor of Common: Yes
Style Sheets Sample:
’
Sample:
<BDO>
<BASEFONT SIZE=”5”>
Indicates text that should appear with the
E
Sample:
explicit RGB hexadecimal values.
<P LANG=”IW” DIR=”RTL”>This Hebrew text
A
Standard: Internet Explorer Specifies text assigned to the tag. You might use
Common: No this attribute for context-sensitive help within
Sample: the document. Browsers may use this to show
tool tips over the text inside the <BIG> tags.
<BGSOUND SRC=”wah.wav”>
Standard: HTML 4
<BIG> Common:
Sample:
No
on and off.
Standard: Netscape Navigator; Style Standard: HTML 2
Sheets offer the same func- Common: Yes
Paired: Yes
E
Attribute Information
CITE=“…”
F
Standard: HTML 4
<BLINK> element. Common: No
Sample:
Standard: HTML 4
R
Common: No <BLOCKQUOTE
Sample: CITE=”http://www.clement.moore.com/
xmas.html”>
<BLINK CLASS=”casual”>NEW INFORMATION
Twas the night…
</BLINK>
</BLOCKQUOTE>
S
ID=”…”
CLASS=“…”
Assigns a unique ID selector to an instance of
Indicates which style class applies to the
’
STYLE=“…” ID=“…”
Specifies Style Sheet commands that apply to Assigns a unique ID selector to an instance of
S
the contents within the <BLINK> tags. the <BLOCKQUOTE> tag. When you then assign a
Standard: HTML 4 style to that ID selector, it affects only that one
A
in HTML 4 in favor of
Specifies the behavior of the background image Style Sheets
(see the BACKGROUND attribute.) BGPROPERTIES= Common: Yes
C
<BODY> element.
<BODY BGCOLOR=”silver” SCROLL=”NO”>
Standard: HTML 4
STYLE=“…”
F
Common: No
Sample: Specifies Style Sheet commands that apply to
<BODY CLASS=”casual”> the document body.
E
Specifies the width (in pixels) of a margin of Standard: HTML 3.2; deprecated
white space along the left edge of the entire in HTML 4 in favor of
R
document, which corresponds to documents use this attribute for context-sensitive help
not already visited by the browser. Color names within the document. Browsers may use this to
A
can substitute for the RGB hexadecimal values. show tool tips.
M
<BR> 17 1
STYLE=“…”
<BR>
Specifies Style Sheet commands that apply to
Breaks a line of continuous text and prevents the <BR> tag.
text alignment around images.
Standard: HTML 4
Standard: HTML 2 Common: No
Common: Yes Sample:
Paired: No
Sample: <BR STYLE=”background: red”>
18 <BR>
TITLE=“…” DISABLED
E
Specifies text assigned to the tag. You might Denies access to the input method.
use this attribute for context-sensitive help
Standard: HTML 4
C
Sample: NAME=“…”
<BUTTON TYPE=”BUTTON” VALUE=”Run Program” Gives a name to the value you pass to the form
onclick(doit)>Click it</BUTTON>
R
processor.
Attribute Information Standard: HTML 4
Common: Yes
ACCESSKEY=“…” Sample:
<BUTTON TYPE=”BUTTON” NAME=”RUNPROG”
S
Sample:
Specifies Style Sheet commands that apply to
R
Sample:
Indicates which style class applies to the
<BUTTON> element. <BUTTON STYLE=”background: red”
T
TYPE=”BUTTON” NAME=”RUNPROG”
Standard: HTML 4 VALUE=”Click to Run”>
Common: No
Sample: TABINDEX=“n”
S
the cursor at the button element after the visi- onMouseUp, onMouseOver, onMouseMove,
tor presses the Tab key three times. onMouseOut, onKeyPress, onKeyDown, and
onKeyUp attributes. See the Element-
Standard: HTML 4
Common: No Independent Attributes section of this refer-
Sample: ence for definitions and examples.
C
VALUE=”Click to Run” TABINDEX=”3”>
TITLE=“…”
Specifies text assigned to the tag. You might
use this attribute for context-sensitive help
within the document. Browsers may use this to
<CAPTION>
show tool tips over the input method. Used inside <TABLE> tags to specify a descrip-
tion for a table.
Standard: HTML 4
Common: No Standard: HTML 3.2
Sample: Common: Yes
Paired: Yes
<BUTTON TYPE=”SUBMIT” NAME=”cc” Sample:
VALUE=”visa” TITLE=”Visa”>
<TABLE>
TYPE=“…” <CAPTION VALIGN=”TOP” ALIGN=”CENTER”>
Indicates the kind of button to create. SUBMIT Test Grades For COOKING 101
</CAPTION>
produces a button that, when selected, submits
<TR>
all the name-value pairs to the form processor. <TH>Student</TH><TH>Grade</TH>
RESET sets all the input methods to their empty </TR>
or default settings. BUTTON creates a button with <TR>
no specific behavior that can interact with <TD>B. Smith</TD><TD>88</TD>
scripts. </TR>
<TR>
Standard: HTML 4 <TD>J. Doe</TD><TD>45</TD> </TR>
Common: Yes </TABLE>
Sample:
<BUTTON TYPE=”BUTTON” VALUE=”Send Data…” Attribute Information
onclick(verify())>
</FORM> ALIGN=“{TOP, BOTTOM, LEFT, RIGHT}”
VALUE=“…” Indicates whether the caption appears at the
top, bottom, left, or right of the table.
Sets the default value for the button face.
Standard: HTML 3.2; LEFT and RIGHT
Standard: HTML 4
added in HTML 4
Common: No
Common: Yes
Sample:
Sample:
<BUTTON TYPE=”BUTTON” NAME=”id”
<CAPTION ALIGN=”TOP”>
VALUE=”Press Me”>
Seattle Staff Directory
Other Attributes </CAPTION>
Standard: HTML 4
Common: No Positions text an equal distance between the left
Sample:
N
ID=”…”
Standard: HTML 3.2; deprecated
Assigns a unique ID selector to an instance of in HTML 4
R
<TABLE> <CITE>
<CAPTION ID=“123”>Great
E
Sample: Sample:
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
<COL ID=“123”>
Attribute Information
SPAN=“n”
’
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
Standard: HTML 4
Common: No STYLE=“…”
Sample:
Specifies Style Sheet commands that apply to
S
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>
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
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
<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
STYLE=“…” Common: No
Sample:
R
Common: No
Sample: This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp,
T
Specifies text assigned to the tag. You might of this reference for definitions and examples.
use this attribute for context-sensitive help
A
<COMMENT> ID=“…”
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:
<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
Common: No
Paired: Yes Common: No
Sample: Sample:
<DEL ID=“123”>WWW stands for World Wide
E
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
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
Common: No
Causes the list to appear in a compact format. Sample:
This attribute probably will not affect the
<DIR TITLE=”Directory List”>
C
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
<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
Common: No
Sample: Attribute Information
R
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>
Sample:
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp, <DL COMPACT>…
</DL>
C
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
CLASS=“…” Common: No
Sample:
Indicates which style class applies to the <DL>
element. <DL STYLE=”background: red”>
Common: No
Sample: Specifies text assigned to the tag. You might
use this attribute for context-sensitive help
<DL CLASS=”casual”>
’
<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:
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:
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
Common: No
Sample:
Paired: No
I have complained <EM ID=“123”>ten</EM> Sample:
E
Specifies text assigned to the tag. You might <EMBED SRC=”st.ocx” ACCESSKEY=”E”>
use this attribute for context-sensitive help
S
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 this reference for definitions and examples. of the current text font. ALIGN=”ABSBOTTOM” lines
M
<EMBED> 33 1
WIDTH=“n” ID=“…”
E
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
F TITLE=“…”
E
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
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
“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
ACTION=”/stat-collector.cgi”> Common: No
Sample:
ID=”…”
<FORM STYLE=”background: red”>
A
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
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:
’
NORESIZE SCROLLING=NO>
SCROLLING={YES, NO, AUTO} Standard: Netscape Navigator
Common: No
E
Common: Yes
Sample:
<FRAME NAME=”titleimg” SRC=”title.html”
A
SCROLLING=NO>
M
<FRAMESET> 39 1
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
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
care, you and your new bird will have <H1 STYLE=”background: red”>
a lasting, happy relationship.
<H2>Feeding</H2> TITLE=“…”
R
Standard: HTML 4
ter of a document. Common: No
Sample:
Standard: HTML 3.2; deprecated
’
Standard:
Common:
HTML 4
No
<HEAD>
Sample:
A
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>
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
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
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
<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
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:
Common: No
Indicates the thickness of a border around a Sample:
floating frame (in pixels).
<IFRAME SRC=”joe.html” NAME=”Joe”
C
<IFRAME SRC=”joe.html” NAME=”Joe” Indicates the size (in pixels) of left and right
BORDER=5> margins within the floating frame.
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
<IFRAME SRC=”main.html” NAME=”main” Specifies the size of the top and bottom mar-
FRAMEBORDER=0> gins (in pixels) within the floating frame.
’
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
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.
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
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
HTML 3.2 added LEFT and RIGHT to the list of <IMG CLASS=”casual” SRC=”dots.gif”>
attribute values.
CONTROLS
E
DATAFLD=“…”
<IMG SRC=”red_icon.gif” ALIGN=LEFT>
It’s about time for volunteers to Indicates a column in previously identified
’
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
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”>
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
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
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
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
DISABLED=“…” Sample:
Disables an instance of the input method so Enter your phone number: <INPUT TYPE=”text”
R
DISABLED> Common: No
Sample:
ID=”n”
Hair color:
E
Sample:
Age:
<INPUT TYPE=TEXT NAME=”age” ID=“123”> <INPUT TYPE=TEXT NAME=”desc”
’
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
Standard: HTML 2
Common: Yes
Phone: <INPUT TYPE=TEXT NAME=”phone”
Sample:
MAXLENGTH=11>
A
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>
Standard: HTML 4
Common: No
Indicates the relative or absolute location of a
Sample:
client-side image map to use with the form.
E
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
Common: No
onKeyPress, onKeyDown, and onKeyUp attrib-
Sample:
utes. See the Element-Independent Attributes
R
<INS> ID=”…”
Assigns a unique ID selector to an instance of
T
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
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
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
Common: No
Sample: ACCESSKEY=“…”
F
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:
’
Standard: HTML 4
Common: No
Sample:
S
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
<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
</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
’
</DIV> Common: No
</LAYER> Sample:
<LAYER SRC=”car.gif” NAME=”CarPic”
E
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>
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
<LI ID=“123”>Bees</LI>
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp, STYLE=“…”
R
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
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
</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
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
preview mode
Establishes reverse relationships between the
Projection—for projectors
current document and other resources. One
R
Common: Yes
Sample: Sample:
<LINK MEDIA=SCREEN REL=”STYLESHEET” <LINK REV=made
’
HREF=”/global.css”> HREF=”mailto:jdoe@somewhere.com”>
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
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
Standard: HTML 4
Common:
Sample:
Yes
<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>
Sample:
Standard: Internet Explorer
<MAP NAME=”housemap”> Common: No
. . . Sample:
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
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
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>
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
<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
<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”>
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
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
COLS=“n” CLASS=“…”
R
Common: No
Sample: Standard: Netscape Navigator
Common: No
<MULTICOL COLS=4> Sample:
T
ID=“…”
S
Common: No
Sample:
ALIGN={LEFT, CENTER, RIGHT, TEXTTOP,
MIDDLE, TEXTMIDDLE, BASELINE, <OBJECT DATA=“shocknew.dcr”
C
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
rounding text.
Standard: HTML 4
ALIGN=TEXTBOTTOM aligns the bottom of the Common: No
R
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
<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>
Common: No
Specifies a message that the browser displays Sample:
while the object is loading.
<OBJECT DATA=“shocknew.dcr”
C
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
</OBJECT> Common: No
Sample:
TABINDEX=“n”
<OBJECT USEMAP=”maps.html#map1”>
E
Standard: HTML 4
<OBJECT Common: No
CLASSID=”clsid:99B42120-6EC7-11CF-A6C7- Sample:
R
Common: No Common: No
Sample: Sample:
<OBJECT <OBJECT DATA=“shocknew.dcr”
E
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
72 <OL>
Sample: Common: No
Sample:
<OL TYPE=a>
N
Select an artist from the 1970s:<SELECT Specifies text assigned to the tag. You might
NAME=”artists”> use this attribute for context-sensitive help
’
<OPTION>Reo Speedwagon
</SELECT>
Standard: HTML 4
Common: No
Attribute Information Sample:
E
<OPTION TITLE=”Option”>Thingie
CLASS=“…”
VALUE=“…”
T
P Standard:
Common:
Sample:
HTML 4
No
Common: No
Specifies the horizontal dimension of the para- Sample:
graph (in pixels).
<PARAM DATA=”dataview.ocx”
C
Standard: HTML 4
This tag also accepts the lang, dir, onClick, Common: No
onDblClick, onMouseDown, onMouseUp, Sample:
R
object. Use the <PARAM> tag within the <OBJECT> Standard: HTML 4
or <APPLET> tags. Common: No
Sample:
R
Standard: HTML 4
Common: No <PARAM TITLE=”Object parameter”
Paired: No NAME=”size” VALUE=”0”>
Sample: TYPE=“…”
<OBJECT CLASSID=”/thingie.py”>
Specifies the MIME type of the data found at
S
Sample:
Common: No VALUE=“…”
Sample:
Specifies the value associated with the parame-
S
Common: No
DATASRC=“…” Sample:
Specifies the location of tabular data to be <PARAM NAME=”startyear” VALUE=”1920”>
M
WIDTH=“n” CLASS=“…”
E
Specifies the horizontal dimension of the pre- Indicates which style class applies to the
formatted text (in pixels). <BLOCKQUOTE> element.
C
of this reference for definitions and examples. instance of the <BLOCKQUOTE> tag.
Standard: HTML 4
Common: No
F
Q Sample:
On July 12, John wrote a profound
E
</BLOCKQUOTE>
Quotes a direct source within a paragraph. Use
<BLOCKQUOTE> to signify only a longer or block STYLE=“…”
quotation.
Specifies Style Sheet commands that apply to
Standard: HTML 4 the contents within the <BLOCKQUOTE> tags.
S
Common: No
Paired: Yes Standard: HTML 4
Sample: Common: No
’
Sample:
Dr. Henry remarked
<Q>I really like the procedure.</Q> <BLOCKQUOTE STYLE=”background: red”>
R
TITLE=“…”
Attribute Information
Specifies text assigned to the tag. You might
E
Sample:
Sample:
<BLOCKQUOTE
<BLOCKQUOTE TITLE=”Quotation”>
A
CITE=”http://www.clement.moore.com/
xmas.html”>
Twas the night…”
</BLOCKQUOTE>
M
<SCRIPT> 77 1
S
Sample:
<SAMP STYLE=”background: red”>
TITLE=“…”
<SAMP> Specifies text assigned to the tag. You might
use this attribute for context-sensitive help
Indicates a sequence of literal characters.
within the document. Browsers may use this to
Standard: HTML 2 show tool tips.
Common: Yes
Paired: Yes Standard: HTML 4
Sample: Common: No
Sample:
An example of a palindrome is the word
<SAMP>TOOT</SAMP>. <SAMP TITLE=”Sample”>
Other Attributes
Attribute Information
This tag also accepts the lang, dir, onClick,
CLASS=“…” onDblClick, onMouseDown, onMouseUp,
onMouseOver, onMouseMove, onMouseOut,
Indicates which style class applies to the onKeyPress, onKeyDown, and onKeyUp attributes.
<SAMP> element. See the Element-Independent Attributes section
Standard: HTML 4 of this reference for definitions and examples.
Common: No
Sample:
<SCRIPT>
The PC screen read:
<SAMP CLASS=”casual”>Command Not Found Contains browser script code. Examples
</SAMP> include JavaScript and VBScript. It is a good
idea to place the actual script code within the
ID=“…”
comment tags so that browsers that don’t sup-
Assigns a unique ID selector to an instance of port the <SCRIPT> tag code can ignore it.
the <SAMP> tag. When you then assign a style to Standard: HTML 3.2
that ID selector, it affects only that one Common: Yes
instance of the <SAMP> tag. Paired: Yes
Standard: HTML 4 Sample:
Common: No <SCRIPT LANGUAGE=”JavaScript”>
Sample: <!— . . . —>
</SCRIPT>
78 <SCRIPT>
hygiene
<OPTION VALUE=5>Other
LANGUAGE=“…” </SELECT>
C
ACCESSKEY=“…”
Sample:
<SCRIPT LANGUAGE=”JavaScript”>
Indicates a keystroke sequence associated with
the selection list.
E
SRC=“URL”
Standard: HTML 4
Specifies the relative or absolute location of a Common: No
R
Common: Yes
CLASS=“…”
Sample:
<SCRIPT type=”text/javascript”
Indicates which style class applies to the
F
SRC=”http://www.some.com/sc/script.js”> element.
</SCRIPT> Standard: HTML 4
E
TYPE=“…” Common: No
Sample:
Indicates the MIME type of the script. This is
<SELECT NAME=”color” CLASS=”casual”>
R
</SCRIPT>
<SELECT NAME=”color”
DATASRC=”#data_table” DATAFLD=”clr”>
<SELECT>
R
DISABLED
Specifies a selection list within a form. Use
the <OPTION> tags to specify items in the Denies access to the selection list.
E
selection list.
Standard: HTML 4
Standard: HTML 2 Common: No
T
<OPTION VALUE=1>Pest control the <SELECT> tag. When you then assign a style
<OPTION VALUE=2>Automotive lubricant
to that ID selector, it affects only that one
<OPTION VALUE=3>Preparing pastries
instance of the <SELECT> tag.
M
<SELECT> 79 1
MULTIPLE STYLE=“…”
Indicates that a visitor can select more than Specifies Style Sheet commands that apply to
one selection list item at the same time. the contents within the <SELECT> tags.
Standard: HTML 2 Standard: HTML 4
Common: Yes Common: Yes
Sample: Sample:
<SELECT MULTIPLE> <SELECT STYLE=”background: red”
NAME=”color”>
NAME=“…”
TABINDEX=“n”
Gives a name to the value you are passing to
the form processor. This establishes a name- Indicates where in the tabbing order the selec-
value pair with which the form processor appli- tion list is placed.
cation can work. Standard: HTML 4
Standard: HTML 2 Common: No
Common: Yes Sample:
Sample: <SELECT NAME=”salary TABINDEX=3>
What is your shoe size?
TITLE=“…”
<SELECT SIZE=4 NAME=”size”>
<OPTION>5 Specifies text assigned to the tag. You might
<OPTION>6 use this attribute for context-sensitive help
<OPTION>7 within the document. Browsers may use this to
<OPTION>8
show tool tips over the selection list.
<OPTION>9
<OPTION>10 Standard: HTML 4
</SELECT> Common: No
Sample:
READONLY
<SELECT TITLE=”Select List”
Indicates that your visitor cannot modify val- NAME=”Car”>
ues within the selection list.
Other Attributes
Standard: Internet Explorer 4
Common: No This tag also accepts the lang, dir, onfocus,
Sample: onblur, onchange, onselect, onClick,
<SELECT NAME=”color” READONLY> onDblClick, onMouseDown, onMouseUp,
onMouseOver, onMouseMove, onMouseOut,
SIZE=“n” onKeyPress, onKeyDown, and onKeyUp attributes.
See the Element-Independent Attributes section
Specifies the number of visible items in the
of this reference for definitions and examples.
selection list. If there are more items in the selec-
tion list than are visible, a scrollbar provides
access to the other items.
80 <SMALL>
Sample:
<P>Our lawyers said we need to include <SMALL TITLE=”Legalese”>Actually doing
some small print: any of this will subject you to
E
Attribute Information This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp,
onMouseOver, onMouseMove, onMouseOut,
E
CLASS=“…”
onKeyPress, onKeyDown, and onKeyUp attributes.
Indicates which style class applies to the See the Element-Independent Attributes section
of this reference for definitions and examples.
F
<SMALL> element.
Standard: HTML 4
Common: No <SPACER>
E
Sample:
A Netscape-specific tag that specifies a blank
<SMALL CLASS=”casual”>Void where
R
prohibited</SMALL>
space within the document. We recommend
using Style Sheets or other formatting tech-
ID=”…” niques unless you’re developing documents
exclusively for visitors using Netscape
Assigns a unique ID selector to an instance of
Navigator.
the <SMALL> tag. When you then assign a style
S
STYLE=“…”
SIZE=“n”
Specifies Style Sheet commands that apply to
T
the contents within the <SMALL> tags. Specifies the dimension of the spacer (in
pixels).
Standard: HTML 4
S
This tag also accepts the lang, dir, onClick, Specifies Style Sheet commands that apply to
onDblClick, onMouseDown, onMouseUp, the contents within the <STRIKE> tags.
C
TITLE=“…”
<STRIKE>, <S>
E
Standard: HTML 3.2; deprecated within the document. Browsers may use this to
in HTML 4 in favor of Style show tool tips over the text.
Sheets
Standard: HTML 4
E
Common: Yes
Paired: Yes Common: No
Sample: Sample:
F
Other Attributes
Attribute Information
This tag also accepts the lang, dir, onClick,
R
Common: No
Sample:
<STRIKE CLASS=”casual”>Truman</STRIKE> lost.
<STRONG>
’
Paired: Yes
instance of the <STRIKE> tag. Sample:
Standard: HTML 4 If you see a poisonous spider in the room
T
This tag also accepts the lang, dir, onClick, Standard: HTML 4
Common: No
onDblClick, onMouseDown, onMouseUp,
Sample:
onMouseOver, onMouseMove, onMouseOut,
onKeyPress, onKeyDown, and onKeyUp attributes. <HEAD>
See the Element-Independent Attributes section <TITLE>Washington DC Taverns</TITLE>
of this reference for definitions and examples. <STYLE TYPE=”text/css” MEDIA=”all”>
<!––
84 <STYLE>
TITLE=“…”
<P>Chemists refer to water as
Specifies text assigned to the tag. You might H<SUB>2</SUB>O.
E
CLASS=“…”
Standard: HTML 4
Common: No Indicates which style class applies to the <SUB>
Sample: element.
E
yellow } Sample:
LI DD { background: silver; color:
black } <SUB CLASS=”casual”>2</SUB>
E
––>
ID=”…”
</SCRIPT>
Assigns a unique ID selector to an instance of
R
TYPE=“…”
the <SUB> tag. When you then assign a style to
Specifies the MIME type of the Style Sheet that ID selector, it affects only that one
specification standard used. instance of the <SUB> tag.
Standard: HTML 4 Standard: HTML 4
S
Common: No Common: No
Sample: Sample:
. . . At the dentist I ask for lots of
’
<HEAD>
<TITLE>Washington DC Taverns</TITLE> NO<SUB ID=“123”>2</SUB>.
<STYLE TYPE=”text/css”>
R
<!–– STYLE=“…”
@import url(Error! Bookmark not defined. Specifies Style Sheet commands that apply to
H1 { background: black; color: white}
the contents within the <SUB> tags.
E
</STYLE> Sample:
</HEAD>
<SUB STYLE=”background: red”>
S
Other Attributes
TITLE=“…”
This tag also accepts the lang and dir attrib-
Specifies text assigned to the tag. You might
A
T
BGCOLOR=“#RRGGBB” or “...”
E
Sample:
Specifies the darker color used to draw 3-D bor-
<TABLE ALIGN=CENTER>
R
Specifies the external border lines around the RULES=ROWS indicates rule lines between rows.
table. For the FRAME= attribute to work, set the
RULES=COLS draws rule lines between columns.
BORDER= attribute with a non-zero value.
88 <TABLE>
Sample: Sample:
<TABLE BORDER=2 RULES=BASIC> <TABLE>
E
<THEAD>…
STYLE=“…” </THEAD>
Specifies Style Sheet commands that apply to <TFOOT>…
R
Sample:
<TABLE STYLE=”background: red”>
Attribute Information
F
show tool tips over the table. ALIGN=CHAR, on a specific character (the deci-
mal point).
Standard: HTML 4
Common: No Standard: HTML 4
Sample: Common: Yes
Sample:
S
<TABLE TITLE=”Table”>
<TR>
WIDTH=“n” <THEAD>
’
specified language.
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp, Standard: HTML 4
A
AXES=“…” CLASS=“…”
E
Lists AXIS values that pertain to the cell. Indicates which style class applies to the
<TD> element.
Standard: HTML 4
C
<TD AXES=”TV,
Programs”><B>Television</B></TD> <TD CLASS=”casual”>Jobs Produced</TD>
ALIGN={LEFT, RIGHT, CENTER, JUSTIFY, COLSPAN=“n”
E
CHAR}
Specifies that a table cell occupy one column
Specifies how text within the table header will more than the default of one. This is useful
R
line up with the edges of the table cells, or if when you have a category name that applies to
ALIGN=CHAR, on a specific character (the deci- more than one column of data.
mal point).
Standard: HTML 3.2
E
<TR><TD COLSPAN=2>Students</TD></TR>
<TR> <TR><TD>Bob Smith</TDH>
<TD><B>Television</B></TD> <TD>John Doe</TD>
E
<TD> </TR>
<IMG SRC=”tv.gif” ALT=”TV” BORDER=0>
</TD> BACKGROUND=“URL”
R
Standard: HTML 4
<TD BACKGROUND=”waves.gif”>
Common: No
R
Sample:
<TR><TD BGCOLOR=”Pink”>Course Number</TD>
<TD ALIGN=”CHAR” CHAR=”,” CHAROFF=”7”> <TD BGCOLOR=”Blue”>Time taught</TD></TR>
A
M
<TD> 91 1
BASELINE}
Aligns the contents of a cell with the top, bot- ACCESSKEY=“…”
C
tom, baseline, or middle of the cell. Assigns a keystroke sequence to the <TEXTAREA>
Standard: HTML 3.2 element.
Common: Yes
N
Standard: HTML 4
Sample: Common: No
<TD VALIGN=TOP><IMG SRC=”images/bud.gif Sample:
BORDER=0></TD>
E
Sample:
<TD WIDTH=200 ALIGN=LEFT><H2>African <TEXTAREA CLASS=”casual”>
Species</H2></TD>
E
COLS=“n”
Other Attributes
Indicates the width (in character widths) of the
R
<TEXTAREA> DATAFLD=“…”
’
Defines a multiple-line text input field within Selects a column from a previously identified
R
a form. Place the <TEXTAREA> tags inside the source of tabular data (see the DATASRC=
<FORM> tags. To specify a default value in a attribute).
<TEXTAREA> field, place the text between Standard: Internet Explorer 4
E
DATASRC=“…”
Enter any comments here:
<TEXTAREA NAME=”comments” COLS=40 Specifies the source of data for data binding.
A
ROWS=5>
No Comments.
</TEXTAREA>
M
<TEXTAREA> 93 1
<TFOOT> CHAROFF=“n”
E
Defines a table footer within a table. It must Specifies the number of characters from the
precede the <TBODY> tag. left at which the alignment character appears.
C
<TR>
<TD>Totals</TD><TD>$100.25</TD></TR> Indicates which style class applies to the
</TFOOT> <TFOOT> element.
R
</TABLE>
Standard: HTML 4
Attribute Information Common: No
Sample:
E
Standard: HTML 4
Common: Yes Standard: HTML 4
Sample: Common: No
Sample:
<TR>
<THEAD> <TFOOT ID=“123”>
S
<TH><B>Television</B></TH> STYLE=“…”
<TH>
<IMG SRC=”tv.gif” ALT=”TV” BORDER=0> Specifies Style Sheet commands that apply to
’
</TR>
Common: No
CHAR=“…” Sample:
E
specified language. Specifies text assigned to the tag. You might use
this attribute for context-sensitive help within
Standard: HTML 4
the document. Browsers may use this to show
S
Common: No
Sample: tool tips over the table footer.
Common: No
Sample:
<TFOOT TITLE=”Table Footer”>
M
<TH> 95 1
CHAROFF=“n”
AXIS=“…”
Specifies the number of characters from the
Specifies an abbreviated cell name. left at which the alignment character appears.
Standard: HTML 4 Standard: HTML 4
Common: No Common: No
Sample: Sample:
<TH AXIS=”TV”><B>Television</B></TH> <TH ALIGN=”CHAR” CHAR=”,” CHAROFF=”7”>
96 <TH>
Specifies the relative or absolute location of a Indicates the lighter color used to form 3-D
graphic image file for the browser to load as borders around the table cell. You can specify
C
a background graphic for the table cell. the color with its hexadecimal RGB values or
with its color name.
Standard: Internet Explorer, Netscape
Navigator Standard: Internet Explorer 4
N
Common: No Common: No
Sample: Sample:
<TH BACKGROUND=”waves.gif”> <TH BORDERCOLORLIGHT=#FFFFFF
E
BORDERCOLORDARK=#88AA2C>
BGCOLOR=“#RRGGBB” or “...”
CLASS=“…”
R
Sample:
<TH CLASS=”casual”>Jobs Produced</TH>
<TR><TH BGCOLOR=”Pink”>Course Number</TH>
E
Common: No Sample:
Sample:
<TR><TH COLSPAN=2>Students</TH></TR>
’
the color with its hexadecimal RGB values or Assigns a unique ID selector to an instance of
with its color name. the <TH> tag. When you then assign a style to
that ID selector, it affects only that one instance
Standard: Internet Explorer 4
T
<TH ID=“123”>
M
<THEAD> 97 1
Common: Yes
Sample: STYLE=“…”
R
<TH>
Common: No
<IMG SRC=”tv.gif” ALT=”TV” BORDER=0>
Sample:
</TH>
F
CHAR=“…”
Specifies text assigned to the tag. You might
Specifies the character on which cell contents use this attribute for context-sensitive help
R
align, if ALIGN=”CHAR”. If you omit CHAR=, the within the document. Browsers may use this to
default value is the decimal point in the speci- show tool tips over the table head.
fied language.
Standard: HTML 4
Standard: HTML 4 Common: No
Common: No Sample:
S
Sample:
<THEAD TITLE=”Table Heading”>
<THEAD ALIGN=”CHAR” CHAR=”,”>
VALIGN={TOP, MIDDLE, BOTTOM, BASE-
’
CHAROFF=“n” LINE}
R
Specifies the number of characters from the Aligns the contents of the table header with
left at which the alignment character appears. respect to the top and bottom edges of the
Standard: HTML 4 header container.
E
Common: No
Indicates the darker color for the 3-D borders Sample:
around the table row. You can specify the color
<TR CLASS=”casual”>
C
Common: No </TR>
Sample:
ID=“n”
<TR BORDERCOLORLIGHT=”silver”
E
Indicates the lighter color for 3-D borders of the <TR> tag.
around the table row. You can specify the color Standard: HTML 4
E
<TR BORDERCOLORLIGHT=”silver” Indicates that text within table cells in the row
BORDERCOLORDARK=”black”> not wrap. This may cause the table to expand
beyond the horizontal dimensions of the cur-
R
Standard: HTML 4
Common: No all cells in the table row.
Sample: Standard: HTML 4
S
<TT> TITLE=“…”
Displays text in a monospace font. Specifies text assigned to the tag. You might use
this attribute for context-sensitive help within
Standard: HTML 2
the document. Browsers may use this to show
Common: Yes
Paired: Yes tool tips over the text within the <TT> tags.
Sample: Standard: HTML 4
After I typed in help, the words Common: No
<TT>help: not found</TT> appeared Sample:
on my screen. Now, type <TT TITLE=”User Typing”>
MAIL</TT> and hit the <KBD>ENTER</KBD> key.
102 <TT>
Sample:
This tag also accepts the lang, dir, onClick,
onDblClick, onMouseDown, onMouseUp, <U ID=“123”>
C
of this reference for definitions and examples. the contents within the <U> tags.
Standard: HTML 4
Common: No
U
E
Sample:
<U STYLE=”background: red”>
R
TITLE=“…”
<U> Specifies text assigned to the tag. You might
E
Underlines text in a document. Use this tag use this attribute for context-sensitive help
with moderation since underlined text can within the document. Browsers may use this to
confuse visitors accustomed to seeing hyper- show tool tips over the underlined text.
F
Indicates which style class applies to the <U> of this reference for definitions and examples.
element.
R
Standard: HTML 2
ID=“n” Common: Yes
Assigns a unique ID selector to an instance of Paired: Yes
S
Sample:
the <U> tag. When you then assign a style to
that ID selector, it affects only that one instance Before you can begin, you need:<UL>
A
This tag also accepts the lang, dir, onClick, Specifies Style Sheet commands that apply to
onDblClick, onMouseDown, onMouseUp, the contents within the <VAR> tags.
C
TITLE=“…”
V
E
CLASS=“…”
Indicates which style class applies to the <VAR>
W
’
element.
Standard: HTML 4
R
Common: No
Sample: <WBR>
E
<VAR ID=“123”>
<XMP> 105 1
X
for more information about language codes.
Standard: HTML 4
Common: No
Sample:
<XMP> <P>The following quote is in German.
<Q LANG=”DE”>Guten Tag!</Q></P>
Includes preformatted text within a document.
Unlike the <PRE> tag, the browser does not dir=“{LTR, RTL}”
interpret HTML tags within the <XMP> tags.
Specifies the direction (left to right or right
HTML 3.2 declared this tag obsolete; so use
to left) for the text used within the section.
<PRE> instead.
This attribute is used most often within docu-
Standard: Obsolete ments to override site-wide language direction
Common: No specifications.
Paired: Yes
Sample: Standard: HTML 4
Common: No
The output from these reports is Sample:
shown below.
<XMP> <P>The following quote is in Hebrew,
Company Q1 Q2 Q3 Q4 therefore written right to left, not left
—————- ——- ——- ——- ——- to right. <Q LANG=”IW” DIR=”RTL”>Hebrew
Widget Inc 4.5m 4.6m 6.2m 4.5m text goes here and is presented right to
Acme Widget 5.9m 10.2m 7.3m 6.6m left, not left to right. </Q></P>
West Widget 2.2m 1.3m 3.1m 6.1m
</XMP> Event Handlers
Each of the following event handlers helps link
Element-Independent visitor actions to scripts. See the JavaScript ref-
Attributes and Event erence for a fuller explanation of their use, and
see Chapter 11 for JavaScript instructions.
Handlers
Many HTML elements accept the attributes onLoad=“…”
and event handlers described in this section.
Occurs when the browser finishes loading a
See the cross-references from individual ele-
window or all frames within a <FRAMESET>.
ments for specific support information.
This handler works with <BODY> and
<FRAMESET> elements.
Attributes
onUnload=“…”
lang=“…” Occurs when the browser removes a document
Specifies the language used within the section. from a window or frame. This handler works
This attribute is used most often within docu- with <BODY> and <FRAMESET> elements.
ments to override site-wide language specifica-
tions. Use standard codes for languages, such as onClick=“…”
DE for German, FR for French, IT for Italian, and Occurs when a visitor clicks the mouse over
IW for Hebrew. See ISO Specification 639 at an element. This handler works with most
www.sil.org/sgml/iso639a.html elements.
106 <XMP>
elements.
Occurs when a visitor presses and releases a key
onMouseDown=“…” over an element. This handler works with most
N
elements.
Occurs when a visitor presses the mouse but-
ton over an element. This handler works with
onKeyDown=“…”
most elements.
E
onReset=“…”
Occurs when a visitor moves the mouse while
still over an element. This handler works with Occurs when a visitor resets a form. This han-
most elements. dler works only with <FORM>.
S
onMouseOut=“…” onSelect=“…”
Occurs when a visitor moves the mouse away Occurs when a visitor selects text in a text
’
from an element. This handler works with field. This handler works with the <INPUT> and
most elements. <TEXTAREA> elements.
R
onFocus=“…” onChange=“…”
Occurs when a visitor moves the focus to an Occurs when a visitor modifies a field and
E
element either with the mouse or the tab key. moves the input focus to a different control.
This handler works with <LABEL>, <INPUT>, This handler works with <INPUT>, <SELECT>,
T
onBlur=“…”
S