NLOAD="loadJScode"
ONUNLOAD="
unloadJScode"
VLINK="
color"
>
...
</BODY>

All color attributes can be represented by either a hexadecimal red-green-blue triplet or by a color name. See Appendix B, "Color values."

ALINK="color" changes the color of text that indicates a link in a document. This is the color the link flashes to when the user clicks it. The user can set a default color using the General Preferences command from the Netscape Navigator Options menu.

BACKGROUND="bgURL" specifies an image that displays in the background of the document. The URL value can be an absolute URL or a relative URL. The absolute URL is used as is without modification. The image is tiled (that is, the image is repeated in a grid) to fill the entire frame. Navigator 1.1

BGCOLOR="color" changes the color of the background. The user can set a default color using the General Preferences command from the Netscape Navigator Options menu. Navigator 1.1

LINK="color" changes the text color indicating a link in a document. This is the normal color for the link. The user can set a default color using the General Preferences command from the Netscape Navigator Options menu.

TEXT="color" changes the color of normal text (i.e. text not highlighted to indicate a link) in a document. The value is a hexadecimal red-green-blue triplet. The user can set a default color using the General Preferences command from the Netscape Navigator Options menu.

ONBLUR="blurJScode" specifies JavaScript code to execute when the window of the document loses focus. See the JavaScript Guide for information on event handlers.

ONFOCUS="focusJScode" specifies JavaScript code to execute when the window of the document acquires focus. See the JavaScript Guide for information on event handlers.

ONLOAD="loadJScode" specifies JavaScript code to execute when the document is loaded. See the JavaScript Guide for information on event handlers.

ONUNLOAD="unloadJScode" specifies JavaScript code to execute when the document is exited. See the JavaScript Guide for information on event handlers.

VLINK="color" changes the text color indicating a visited (followed) link in a document. The user can set a default color using the General Preferences command from the Netscape Navigator Options menu.

Example

The following example sets the background color to light yellow, ordinary text to black, unvisited links to blue, visited links to green, and active links to red.

<BODY BGCOLOR="lightyellow" TEXT="#000000" LINK="#0000FF"
VLINK="#00AA00" ALINK="#FF0000">

</BODY>

See also

FONT, HEAD


BR (line break)

The BR tag breaks the line in the text flow of your document. This lets you control where the next line of text appears, which is especially useful when including graphics in a document. Unlike the P tag, the BR tag does not add extra space.

The BR tag does not require a closing tag.

Syntax

<BR
CLEAR="
ALL"|"LEFT"|"RIGHT"
>

CLEAR lets you flow text around an image or figure. Navigator 1.1

Example

The following example inserts line breaks in a speech from Hamlet.

Hamlet's famous speech begins:<P>
To be, or not to be<BR>
That is the question<P>

This puts space after the introductory clause, but keeps the quote together. The last line uses the P tag to put more space before the next line.

_IMG SRC="tags1a10.gif" HEIGHT=142 WIDTH=378>

See also

P


CAPTION (display table caption)

Navigator 1.1

The CAPTION tag defines a caption for a table. Place the CAPTION tag within the TABLE tag but not inside the TD or the TR tags.

Syntax

<CAPTION ALIGN="BOTTOM"|"TOP">...</CAPTION>

ALIGN specifies the placement of the caption within a table.

Used within

TABLE

Example

The following example creates a three-column, four-row table, with the caption "Tables are as easy as one, two, three" aligned at the top of the table.

<TABLE BORDER CELLPADDING="8" CELLSPACING="4">

<CAPTION ALIGN="TOP"><B>Table 1</B>: Tables are as easy as one, two, three

</CAPTION>

<TR><TH> English </TH><TH> Spanish </TH><TH> German </TH></TR>

<TR><TD> one     </TD><TD> uno     </TD><TD> ein    </TD></TR>

<TR><TD> two     </TD><TD> dos     </TD><TD> zwei   </TD></TR>

<TR><TD> three   </TD><TD> tres    </TD><TD> drei   </TD></TR>

</TABLE>

_IMG SRC="tags1a11.gif" HEIGHT=240 WIDTH=377>

See also

TABLE, TD, TH, TR


CENTER (center a block of text)

Navigator 1.1

The CENTER tag centers the enclosed block of text.

Syntax

<CENTER>...</CENTER>

Example

The following example centers a heading.

<CENTER>

<H1>Netscape's Mascot Mozilla</H1>

</CENTER>

_IMG SRC="tags1a12.gif" HEIGHT=116 WIDTH=378>


CITE (citation)

The CITE tag marks a block of text as a citation. The citation should be a small citation, such as a book title. Use the BLOCKQUOTE tag for long quotations. Netscape Navigator displays citations in italics.

Syntax

<CITE>...</CITE>

Example

The following example displays the citation in italics.

Mozilla said to the crowd, <CITE>Visit Netscape's website</CITE>.

_IMG SRC="tags1a13.gif" HEIGHT=90 WIDTH=378>

See also

BLOCKQUOTE


CODE (program code text)

The CODE tag displays text in the fixed-width font, as determined in Options|General Preferences.

For large sections of code where formatting is important use the PRE tag to preserve the space characters and line breaks used in the program listing.

Syntax

<CODE>...</CODE>

Example

The following example displays a code sample:

The C programming language lets you construct simple and complex loops.
The following loop prints the numbers 1 to 10:<P>

<CODE>

          for (x=1; x<10; x++)

          printf("x=%d", x);

</CODE>

_IMG SRC="tags1a14.gif" HEIGHT=127 WIDTH=378>

See also

KBD, PRE, SAMP


DD (definition description)

The DD tag marks a definition in a definition list. The DD tag must be used within the scope of a DL tag and should be used in conjunction with the DT tag (the term being defined). The DD tag does not require a closing tag.

Syntax

<DD>

Used within

<DL>

Example

See the example for DL.

See also

DL, DT


DIR (directory lists)

Deprecated

The DIR tag creates a definition list where each item in the list can be no longer than 20 characters. Some web browsers display items in the list in columns across the screen. Navigator always displays the items in a single column. To mark the individual items within the list, use the LI tag. A single list item can contain additional paragraphs, marked with the P tag.

Syntax

<DIR>...</DIR>

Example          

Several HTML character tags are:

<DIR>

<LI> I: displays text in italics</LI>

<LI> B: displays text in bold</LI>

<LI> KYBD: displays text in typewriter font</LI>

</DIR>

_IMG SRC="tags1a15.gif" HEIGHT=155 WIDTH=377>

See also          

UL


DIV (section of a document)

Navigator 2.0

The DIV tag encloses a division of a document, such as a chapter, appendix, or section, enabling you to apply alignment to all paragraphs in that division.

Syntax

<DIV
ALIGN="LEFT"|"CENTER"|"RIGHT"
>

ALIGN specifies the horizontal alignment of the division. The value can be:

Used within

<BODY>

Example

One way to position a table is to enclose it in the scope of a DIV tag.

<TABLE BORDER>

<TR>

<TD><P>A <TD><P>ADDRESS <TD><P>APPLET <TD><P>AREA

</TR>

<TR>

<TD><P>B <TD><P>BASE <TD><P>BASEFONT <TD><P>BIG

</TR>

</TABLE>

<DIV ALIGN=CENTER>

<TABLE BORDER>

<TR>

<TD><P>A <TD><P>ADDRESS <TD><P>APPLET <TD><P>AREA

</TR>

<TR>

<TD><P>B <TD><P>BASE <TD><P>BASEFONT <TD><P>BIG

</TR>

</TABLE>

</DIV>

<DIV ALIGN=RIGHT>

<TABLE BORDER>

<TR>

<TD><P>A <TD><P>ADDRESS <TD><P>APPLET <TD><P>AREA

</TR>

<TR>

<TD><P>B <TD><P>BASE <TD><P>BASEFONT <TD><P>BIG

</TR>

</TABLE>

</DIV>

_IMG SRC="tags1a16.gif" HEIGHT=189 WIDTH=385>

See also

P


DL (definition list)

The DL tag encloses a definition list. A definition contains terms and definitions. Netscape Navigator displays the terms left aligned and the definitions indented on the next line.

Syntax

<DL COMPACT>...</DL>

COMPACT "compacts" the definition list by placing the term defined by the DT tag on the same line as the definition defined by the DD tag, provided the term is short enough.

Example

The following example defines three HTML terms.

All HTML files contain the following tags:<P>

<DL COMPACT>

<DT>HTML

<DD>This tag marks a text file as an HTML document.

<DT>HEAD

<DD>This tag defines the heading for the HTML document.

<DT>BODY

<DD>This tag defines the body for the HTML document.

<DT>DL

<DD>This tag defines a definition list in the HTML document.

<DT>DT

<DD>This tag defines a term in a definition list in the HTML document.

<DT>DT

<DD>This tag defines a definition in a definition list in the HTML
document.

</DL>

_IMG SRC="tags1a17.gif" HEIGHT=231 WIDTH=383>

See also

DD, DT


DT (definition term)

The DT tag specifies the term defined in a definition list. The corresponding DD tag specifies the definition. The DT tag does not require a closing tag.

Syntax

<DT>

Used within

<DL>

Example

See the example for DL.

See also

DL, DT


EM (emphasize text)

The EM tag marks text for emphasis.

Netscape Navigator displays emphasized text in italics.

Syntax

<EM>...</EM>

Example

We ship your products overnight <EM>for free</EM>!

_IMG SRC="tags1a18.gif" HEIGHT=88 WIDTH=378>

See also

I


EMBED (insert object)

Navigator 2.0.

The EMBED tag lets you display output from a plug-in application in an HTML document. To display, the plug-in application must be installed. When loaded, the applet runs automatically.

Syntax

<EMBED
ALIGN="
LEFT"|"RIGHT"|"TOP"|"BOTTOM"
BORDER="
pixBorder"
FRAMEBORDER="NO"
HEIGHT="
pixHeight"                                                                                                                         required
HIDDEN="TRUE|FALSE
HSPACE="pixHoriz"
NAME="
appletName"
PALETTE="FOREGROUND"|"BACKGROUND"
PLUGINSPAGE="
instrURL"
SRC="
Location"                                                                                                                         Either SRC or TYPE is required
TYPE="MIMEtype"                                                                                                                         Either SRC or TYPE is required
VSPACE="pixVert"
WIDTH="
pixWidth"
>
...
</EMBED>

Any attributes other than those listed are passed through to the plug-in.

ALIGN specifies the alignment for the applet.

BORDER="pixBorder" specifies the size, in pixels, of the border around the applet in pixels.

FRAMEBORDER="NO" specifies that the frame has no border.

HEIGHT="pixHeight" specifies the height in pixels needed by the applet.

HIDDEN="TRUE"|"FALSE" specifies whether the plug-in is visible on the page. The value TRUE overrides any HEIGHT and WIDTH to make a zero-sized plug-in. The default is FALSE.

HSPACE="value" specifies a margin in pixels between the left and right edges of the applet and surrounding text and images. Navigator 1.1

NAME="appletName" specifies the name of the applet.

PALETTE="FOREGROUND"|"BACKGROUND" is relevant only on the Windows platform. A value of FOREGROUND makes the palette used by the plug-in be the foreground palette. Similarly, a value of BACKGROUND makes the plug-in use the background palette, which is also the default.

PLUGINSPAGE="instrURL" specifies the URL that contains the instructions for installing the plug-in. This URL used by the assisted installation process if the plug-in registered for the MIME type of this EMBED tag is not found.

VSPACE="value" specifies a margin in pixels between the top and bottom edges of the applet and surrounding text and images.Navigator 1.1

TYPE="MIMEtype" specifies the MIME type of the EMBED tag, which in turn determines which plug-in to load. Use TYPE instead of SRC for plug-ins that require no data or plug-ins that fetch all their data dynamically.

WIDTH="pixWidth" specifies the width in pixels in which the object must fit. The object is scaled to fit the specified height and width.

Example

The following example embeds two objects, MyMovie.mov and Game.ids in the document.

<EMBED SRC="MyMovie.mov" WIDTH="150" HEIGHT="250" CONTROLS="TRUE">

<EMBED SRC="Game.ids" WIDTH="400" HEIGHT="300"> 

See also

APPLET, PARAM


FONT (change color, face, size)

Navigator 1.1

The FONT tag lets you change the color, size, and face (font family) of the font. You can specify the default font size for a document using the BASEFONT tag. The FONT tag overrides any other font settings. In other words, text within the scope of the FONT tag is displayed in the color and size you specify, regardless of any other settings.

Syntax

<FONT
COLOR="
color"
FACE="
fontlist"
SIZE="
fontSize"
>
...
</FONT>

COLOR="color" defines the desired text color. The color value is a hexadecimal red-green-blue triplet, or a color name. See Appendix B, "Color values."Navigator 2.0

FACE="fontlist" specifies a comma-separated list of fonts as your preferred font choices for the text in the scope of the FONT tag. Navigator searches for the first font in the list; if the font is present, Navigator uses it; otherwise the search continues. If none of the fonts is found, Navigator 3.0

SIZE="fontSize" defines the size of the font, in a range from 1 to 7, with a default size of 3. You can also specify the size using a plus or minus sign in front of the number to change the size with respect to the base font size.

Example

The following example displays "color" in red and increases the font size of "size" to 2 sizes larger than the base font.

The &lt;FONT&gt; tag changes the text

<FONT COLOR="#FF2222">color</FONT> or

<FONT SIZE="+2">size</FONT> or

<FONT SIZE="+2" COLOR="#FF2222">both</FONT>.

_IMG SRC="tags1a19.gif" HEIGHT=92 WIDTH=378>

See also

BASEFONT


FORM (create form)

The FORM tag creates an HTML form, which lets users input text and make choices from elements such as checkboxes, radio buttons, and selection lists. A user fills out the form, and then submits the form by clicking a button.

You define and specify the features of a form by using the following tags nested within the FORM tag:

A document can have multiple forms, but forms cannot be nested--you cannot have a form within a form.

**add cross-ref to chapter 2 here**

Syntax

<FORM
ACTION="
ServerURL"                                                                                                               required, if any action is to occur
ENCTYPE="EncodingType"
METHOD="GET"|"POST"
NAME="
FormName"
ONRESET="
resetJScode"
ONSUBMIT="
submitJScode"
TARGET="
WindowName"
>
...
</FORM>

ACTION="ServerURL" specifies the URL of the server where the form information is sent. This attribute can specify a CGI or LiveWire application on the server; it can also be a mailto: URL if the form is to be mailed to someone.

ENCTYPE="EncodingType" specifies the MIME encoding of the data sent:

METHOD specifies how information is sent to the server specified by ACTION.

NAME="FormName" specifies the name of the form. The name is not displayed on the form. Since there can be multiple forms on the same page, the NAME attribute is used by JavaScript to differentiate different forms.

ONRESET="resetJScode" specifies JavaScript code that executes when a user resets the form, as with a RESET button. See the JavaScript Guide for information on event handlers.

ONSUBMIT="submitJScode" specifies JavaScript code that executes when a user submits the form, as with a SUBMIT button. See the JavaScript Guide for information on event handlers.

TARGET="WindowName" specifies the window that form responses are displayed in. When a user submits a form with a TARGET attribute, server responses are displayed in the specified window instead of the window that contains the form. Navigator 2.0.

Example

The following example creates a form called LoginForm that contains text fields for user name and password, a submit button, and a cancel button.

<FORM NAME="LoginForm">

<B>User name:</B><INPUT TYPE="text" NAME="userName" SIZE="10">

<P>

<B>Password:</B><INPUT TYPE="password" NAME="password" SIZE="12">

<P>

<INPUT TYPE="submit" VALUE="Log in"

                    ACTION="http://my-site.org/cgi-bin/myx.cgi">

<INPUT TYPE="button" VALUE="Cancel" onClick="window.close()">

</FORM>

_IMG SRC="tags1a20.gif" HEIGHT=168 WIDTH=376>

See also

SELECT, TEXTAREA

Tag reference list, Part 2


FRAME (create an independent window region)

The FRAME tag creates a frame, which is an individual, independently scrolling region of a web page. The FRAMESET tag defines a group of frames that display in one Netscape Navigator window. The FRAME tag defines each individual frame in the Netscape Navigator window. Each frame can be defined with unique features and characteristics using the FRAME tag's attributes.

The content that each frame displays is determined by a distinct URL. Links in a frame can cause a related frame to point to a different URL, and frames can be targeted by other URLs within the same window.

Syntax

<FRAME
BORDERCOLOR="
color"
FRAMEBORDER="YES"|"NO"
MARGINHEIGHT="
pixMarHeight"
MARGINWIDTH="
pixMarWidth"
NAME="
frameName"
NORESIZE
SCROLLING="YES"|"NO"|"AUTO"
SRC="
URL"                                                                                                                        required
>

BORDERCOLOR="color" specifies the color of the frame's borders. The color value is a hexadecimal red-green-blue triplet, or a color name. See Appendix B, "Color values."Navigator 3.0

Because frame borders are shared, Navigator must resolve any border color conflicts.

    1. Any attribute appearing in the outermost FRAMESET has the lowest priority.
    2. This attribute is, in turn, overridden by any attribute used in a nested FRAMESET tag.
    3. Finally, any BORDERCOLOR attribute in the current FRAME tag overrides all previous FRAMESET tag uses.

If there is a conflict for two colors of equal priority both set on the same edge, the behavior is undefined.

FRAMEBORDER determines whether frame borders are displayed. Navigator 3.0

When FRAMEBORDER appears in a FRAMESET tag, it sets a default FRAMEBORDER value for all frames in the frameset.

When FRAMEBORDER appears in the FRAME tag, it applies only to that particular frame, overriding any FRAMEBORDER established by an outer FRAMESET tag.

A border shared between frames is plain only if all adjacent frames have the FRAMEBORDER attribute set to NO.

When neither a FRAME nor a FRAMESET governing that FRAME has set FRAMEBORDER, the default setting is YES.

MARGINHEIGHT="pixMarHeight" specifies a margin in pixels between the top and bottom edges of the frame and the frame contents.

MARGINWIDTH="pixMarWidth" specifies a margin in pixels between the left and right edges of the frame and the frame contents.

Tag reference list, Part 2Go to Tag reference section, Part 2


Tags2


FRAMESET (define a group of frames)

The FRAMESET tag defines a group of frames that appear in a single Netscape Navigator window. You define and specify the features of the group of frames by using the following tags nested within the FRAMESET tag:

The only place the FRAMESET tag is used is in a frame definition document. A frame definition document is an HTML document that contains the layout for each frame and frameset that make up a Navigator window. An HTML document that contains a FRAMESET tag cannot contain a BODY tag.

Syntax

<FRAMESET
BORDER="
pixWidth"
BORDERCOLOR="
color"
COLS="
ColumnWidthList"                                                                                                               Either COLS or ROWS is required
FRAMEBORDER="YES"|"NO"
ONBLUR="
blurJScode"
ONFOCUS="
focusJScode"
ONLOAD="
loadJScode"
ONUNLOAD="
unloadJScode"
ROWS="
RowHeightList"                                                                                                              Either COLS or ROWS is required
>
...
</FRAMESET>

BORDER="pixWidth"specifies the thickness of frame borders for all frames in a frameset. A setting of BORDER="0" causes all frames in the frameset to have no bor