This chapter contains an alphabetical listing of all HTML tags supported in Navigator 3.0 and earlier. The tags are presented in the following format: _IMG SRC="tags1a.gif" HEIGHT=419 WIDTH=512_
The following sections comprise an alphabetical reference of all tags supported by Netscape Navigator 3.0 and earlier.
The A tag lets you define anchors and links.
An anchor marks a section of an HTML document and provides a way for links to connect that part of the document. The A tag typically encloses text or images that represent an anchor, such as a heading in a document or a logo. Navigator does not use any special formatting to indicate that the text or image represent an anchor.
Anchors cannot be nested within other A tags. You can enclose most character and paragraph formatting within the A tag.
<A
NAME="AnchorName" required
for an anchor
>
...
</A>
ADDRESS, DD, DT, H1 through H6, LI, P, PRE
This example defines the heading text "Welcome to the Marine Mammal page" as an anchor in a document:
<A NAME="mammal_intro"><H2>Welcome to the Marine Mammal page</H2></A>
If this anchor is in a file called intro.html, you could define a jump to the anchor as follows:
<A HREF="intro.html#mammal_intro">Introduction to marine mammals</A>
A link connects an HTML document to another document (such as another HTML file or a graphic file) or part of a document (an anchor in an HTML file). Navigator displays link text and ordinary text differently, so users can easily distinguish hypertext jumps. By default, Navigator displays links as blue underlined text or blue-bordered graphics and visited links as magenta. The default color for links can be changed in Navigator using the General Preferences command from the Options menu. When the user clicks a link or image, the reference specified by the HREF attribute is loaded into the window or frame specified by the TARGET attribute.
The destination of the link is usually another document or a section of a document. The destination can also be a protocol that specifies items such as an email message or an FTP site. To jump to a specific section of a document, the HREF attribute should reference the NAME attribute of an existing anchor.
<A
HREF="Location" required
for a link
NAME="AnchorName" optional
(and uncommon) in a link
ONCLICK="clickJScode"
ONMOUSEOUT="outJScode"
ONMOUSEOVER="overJScode"
TARGET="WindowName"
> ... </A>
HREF="Location" specifies a destination URL for the anchor or link.
NAME="AnchorName" specifies a name for the anchor. A link to the anchor uses this value for its HREF attribute.
ONCLICK="clickJScode" specifies JavaScript code to execute when a user clicks the image or link text. See the JavaScript Guide for information on event handlers.
ONMOUSEOUT="outJScode" specifies JavaScript code to execute when a user moves the mouse pointer out of the image or link text. See the JavaScript Guide for information on event handlers.
ONMOUSEOVER="overJScode" specifies JavaScript code to execute when a user moves the mouse pointer over the image or link text. See the JavaScript Guide for information on event handlers.
TARGET="WindowName" is only used if the anchor is also a link. It specifies the window that the link is loaded into. Navigator 2.0.
ADDRESS, DD, DT, H1 through H6, LI, P, PRE
This example uses both text and a graphic as a link. When a user clicks either the word "Download" or the image, Navigator loads the document specified by the URL in the HREF attribute in the current browser window. It loads in the current browser window because no TARGET attribute is present.
This page is enhanced for Netscape Navigator. You can view this page using other browsers, but it will appear best with Navigator.<P> <A HREF="http://home.netscape.com/index.html">Download </A>Netscape Navigator now! <A HREF="http://home.netscape.com/index.html"> <IMG SRC="now_bu.gif" ALIGN="texttop" ALT="Netscape Now"> </A>
_IMG SRC="tags1a1.gif" HEIGHT=147 WIDTH=377>
The ADDRESS tag displays address information in a format determined by each browser (Netscape Navigator displays addresses in italic). An address can include authorship information and is usually placed at the top or bottom of a document.
The following example displays the address in italic.
You can reach us at: <P> <ADDRESS> Netscape Communications Corporation<BR> 501 East Middlefield Road<BR> Mountain View, CA 94043<BR> </ADDRESS>
_IMG SRC="tags1a2.gif" HEIGHT=135 WIDTH=378>
Navigator 2.0
The APPLET tag specifies a Java applet for the Navigator to load. Applet resources (including their classes) are normally loaded relative to the CODEBASE tag. Use the PARAM tag to specify parameters required by the applet.
<APPLET
ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE"|"ABSBOTTOM"|
"TEXTTOP"|"MIDDLE"|"BASELINE"|"BOTTOM"
ALT="alternateText"
ARCHIVE="archiveURL"
CODE="appletURL" required
CODEBASE="classFileDirectory"
HEIGHT="pixHeight" required
HSPACE="pixHoriz"
MAYSCRIPT
NAME="value"
VSPACE="pixVert"
WIDTH="pixWidth" required
>
...
</APPLET>
ALIGN specifies the alignment for the applet. If you do not specify a value for ALIGN, Navigator uses "BOTTOM" as the default.
ALT="alternateText" specifies text to display for browsers that do not support the APPLET tag. Navigator 3.0
ARCHIVE="archiveURL" specifies a file to be downloaded to the user's disk, and then searched for the classFileName specified in the CODE attribute. The archiveURL is sought relative to the classFileDirectory. The suffix on the archiveURL must be .zip, but the file must not be compressed. Classes not found in the archiveURL are searched for through the standard mechanism. Navigator 3.0
CODE ="classFileName" specifies the filename of the applet you want to load. The file name must end with a .class extension.
CODEBASE="classFileDirectory" changes the URL specified by the BASE tag. If the CODEBASE attribute is defined, it specifies a location to find applet resources. The value can be an absolute URL or a relative URL. An absolute URL is used as is without modification and is not affected by the document's BASE tag. When the CODEBASE attribute is relative, then it is relative to the document-URL defined by the BASE tag. If no base tag is specified, then it is relative to the directory where the HTML file is.
HEIGHT="pixHeight" specifies the height (in pixels) that the applet needs.
HSPACE="pixHoriz" specifies the horizontal space (in pixels) that the applet needs between itself and surrounding text.
MAYSCRIPT permits the applet to access JavaScript. Use this attribute to determine whether or not an applet can access JavaScript on a page without your knowlege. Accessing JavaScript when the MAYSCRIPT attribute is not specified results in an exception. Navigator 3.0
NAME ="value" specifies the name of the applet, so that different applets in the same window can refer to (and communicate with) one another..
VSPACE="pixVert" specifies the vertical space (in pixels) that the applet needs between itself and surrounding text.
WIDTH="pixWidth" specifies the width (in pixels) that the applet needs. The applet is scaled to fit the specified height and width.
The following example displays a sky with moving stars.
<APPLET CODEBASE="http://www.netscape.com/comprod/products/navigator/ version_2.0/java_applets/StarField" CODE="stars.class" WIDTH="400" HEIGHT="100"> <PARAM NAME="numstars" VALUE="50"> </APPLET>
The AREA tag defines a client-side image map. An image map is a graphic that has clickable regions that link to different URLs. For example, you can have an image with a square and a circle where a click in the square takes you to one page and a click in the circle takes you to a different page.
Different areas of an image map can jump to different Web pages. _IMG SRC="tags1a3.gif" HEIGHT=99 WIDTH=324>
Client-side image maps are defined by MAP and AREA tags. When a user clicks the image, Navigator determines what URL to load based, on the information in the AREA tag. The USEMAP attribute of the IMG tag specifies an image as a client-side image map. The MAP tag contains one or more AREA tags. Each AREA tag describes a different region as a hyperlink in the image and specifies the URL to which it connects.
<AREA
COORDS="x1,y1,x2,y2,..." required
|"x-center,y-center,radius"
HREF="Location" required
NAME="areaName"
NOHREF
ONMOUSEOUT="outJScode"
ONMOUSEOVER="overJScode"
SHAPE="CIRCLE"|"RECT"|"POLY"|"DEFAULT"
TARGET="WindowName">
COORDS specifies the coordinates of the region defined by the AREA tag.
HREF="Location" specifies the URL of the document to load when a user clicks the area.
NAME="areaName" specifies the map name to be used with the USEMAP attribute of the IMG tag. The value of the areaName must begin with an alphanumeric character.
NOHREF specifies that no URL is loaded when a user clicks the area.
ONMOUSEOUT="outJScode" specifies JavaScript code to execute when a user moves the mouse pointer out of the image or link text. See the JavaScript Guide for information on event handlers.
ONMOUSEOVER="overJScode" specifies JavaScript code to execute when a user moves the mouse pointer over the image or link text. See the JavaScript Guide for information on event handlers.
Defining regions in an image _IMG SRC="tags1a4.gif" HEIGHT=166 WIDTH=461>
SHAPE specifies the shape of the map. Each shape has its own form of the COORDS attribute:
If no SHAPE is defined, RECT is used.
TARGET="WindowName" specifies the frame or window that the linked URL is loaded into. When a user clicks an area that has a TARGET attribute, the URL is loaded in the specified window or frame instead of in that containing the area. Navigator2.0.
In this example, an image map is used to help users navigate a web site. The following illustration shows what the finished image map looks like to a user: _IMG SRC="tags1a5.gif" HEIGHT=213 WIDTH=611>
Each button is a separate region of the image map. The seven buttons correspond to regions defined by seven AREA tags. The following code defines the map:
<MAP NAME="mainmap"> <AREA COORDS="0,0,65,24" HREF="/escapes/index.html"> <AREA COORDS="66,0,132,24" HREF="/comprod/index.html"> <AREA COORDS="133,0,185,24" HREF="http://merchant.netscape.com/netstore/index.html" TARGET="_top"> <AREA COORDS="186,0,248,24" HREF="/newsref/index.html"> <AREA COORDS="249,0,318,24" HREF="/assist/index.html"> <AREA COORDS="319,0,390,24" HREF="/commun/index.html"> <AREA COORDS="391,0,467,24" HREF="/business_solutions/index.html"> </MAP>
Because no SHAPE attribute is specified for any AREA tag, the shape of each region defaults to a rectangle. The third AREA tag uses the "_top" value for its TARGET attribute to specify that its URL is loaded into the full Navigator window.
The image used for the toolbar is nav.gif, an interlaced GIF. The IMG tag that loads nav.gif uses the USEMAP attribute to specify that the image is a client-side image map. The value of the USEMAP attribute, #mainmap, is also the value used for the NAME attribute of the MAP tag. The value assigned to USEMAP is a standard URL, so the "#" signals that it is in the current web page. The following code associates the map with the image:
<IMG SRC="nav.gif" WIDTH="468" HEIGHT="25" BORDER="0" USEMAP="#mainmap">
The B tag displays text in boldface.
The following example displays "Netscape Navigator" in bold.
My preferred browser is <B>Netscape Navigator</B>.
_IMG SRC="tags1a6.gif" HEIGHT=89 WIDTH=378>
The BASE tag specifies the base URL for the document (from which all relative links in the document are to be resolved) or the base target for the document (identifying the default window in which a followed link displays).
When building complex, multi-page documents, you might want to specify a base URL for the main document (master HTML file). To do this, establish a base URL, then give relative URL addresses for all referenced documents.
If the document is moved, and the base URL is specified using the BASE tag, all relative references to URLs are updated relative to the new location of the base URL.
If you have a document that contains links, and you move it to a different URL, but do not specify a base URL, then when Netscape Navigator resolves any relative URLs within the document it will resolve them with respect to the new location, thus probably invalidating them.. If you do specify a base URL, the relative URLS are resolved with respect to that base.
The BASE tag does not require a closing tag.
<BASE
HREF="baseURL" required
TARGET="WindowName"
>
HREF="baseURL" specifies the location of the document as an absolute or relative URL. The absolute URL is used as is without modification. If a relative URL is specified, all subsequent links are relative to this URL.
TARGET="WindowName" identifies the default window or frame where any links activated from the current document will display. Navigator 2.0.
The following example sets http://home.netscape.com as the base URL for the document.
<HEAD> <BASE HREF="http://home.netscape.com/"> </HEAD> Information about Netscape and its products can be found at <A HREF="comprod/index.html">Company & Products</A>. </HEAD>
The BASEFONT tag specifies a default font size. If the user has set a default font size in Navigator (using the General Preferences command from the Options menu), this tag overrides it. If the base font size is not defined, the default is 3.
<BASEFONT
SIZE="fontSize"
>
...
</BASEFONT>
SIZE="fontSize" specifies the font size from 1 to 7 (the default is 3).Navigator 1.1
The following example uses the BASEFONT tag to set the default font size to 2, then enlarges and decreases the font size using the FONT tag. All changes made to the font size are relative to the base font size (2).
<I>Netscape Navigator</I> lets the user select a comfortable base font size, <BASEFONT SIZE="2"> but this can be reset for all or part of a page. <FONT SIZE="+3"> Doing so causes subsequent font size changes </FONT> <FONT SIZE="-1"> to execute relative to the new base font size.</FONT> <BASEFONT SIZE="3">
_IMG SRC="tags1a7.gif" HEIGHT=123 WIDTH=377>
Navigator 2.0
The BIG tag increases the font size from its current value by one.
The following example increases the font size in three steps for "bigger, and bigger, and bigger."
When he told a lie, his nose grew <BIG>bigger, and <BIG>bigger, and <BIG>bigger.</BIG></BIG></BIG>
_IMG SRC="tags1a8.gif" HEIGHT=97 WIDTH=377>
The BLINK tag makes text blink on and off in Netscape Navigator.
The following example displays "Blinking text" as blinking text.
<BLINK> Blinking text </BLINK> can be annoying, so use it sparingly.
The BLOCKQUOTE tag indents a block of text. Use the BLOCKQUOTE tag for longer quotations, and the CITE tag for short quotations.
The following example displays the quotation in a block format.
Marc Andreessen, vice president of technology and cofounder of Netscape, said recently: <BLOCKQUOTE> "Moving Worlds is extremely exciting because it extends Netscape Navigator into a whole new dimension. Moving Worlds enables developers to build 3D applications and content that leverage all the technologies supported by the Netscape software platform: Java, JavaScript, advanced HTML, frames, and Plug-Ins. Netscape is committed to integrating 3D technology into the Netscape software platform and to providing a seamless blend of 2D and 3D elements to bring rich, lifelike activity to the Internet." </BLOCKQUOTE>
_IMG SRC="tags1a9.gif" HEIGHT=240 WIDTH=378>
The BODY tag specifies the main content of a document. Each HTML document begins with a <HEAD>...</HEAD>, then concludes with a <BODY>...</BODY>.) Within the body of your document you can include the tags that define global characteristics of the document--the layout and structure of the document and all links to text and graphics.
<BODY
ALINK="color"
BACKGROUND="bgURL"
BGCOLOR="color"
LINK="color"
TEXT="color"
ONBLUR="blurJScode"
ONFOCUS="focusJScode"
ONLOAD="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.
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>
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.
<BR
CLEAR="ALL"|"LEFT"|"RIGHT"
>
CLEAR lets you flow text around an image or figure. Navigator 1.1
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>
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.
<CAPTION ALIGN="BOTTOM"|"TOP">...</CAPTION>
ALIGN specifies the placement of the caption within a table.
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
Navigator 1.1
The CENTER tag centers the enclosed block of text.
The following example centers a heading.
<CENTER> <H1>Netscape's Mascot Mozilla</H1> </CENTER>
_IMG SRC="tags1a12.gif" HEIGHT=116 WIDTH=378>
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.
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>
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.
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>
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.
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.
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>
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.
<DIV
ALIGN="LEFT"|"CENTER"|"RIGHT"
>
ALIGN specifies the horizontal alignment of the division. The value can be:
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>
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.
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.
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>
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.
The EM tag marks text for emphasis.
Netscape Navigator displays emphasized text in italics.
We ship your products overnight <EM>for free</EM>!
_IMG SRC="tags1a18.gif" HEIGHT=88 WIDTH=378>
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.
<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.
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">
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.
<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.
The following example displays "color" in red and increases the font size of "size" to 2 sizes larger than the base font.
The <FONT> 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>
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**
<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.
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>
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.
<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.
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
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.
<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 border between them. A setting of BORDER="3" causes a border of 3 pixels. If no BORDER tag is present, the default is 5 pixels. The BORDER tag can be used only on an outermost FRAMESET tag. Navigator 3.0
BORDERCOLOR="color" specifies the color of a frame's borders. The value of color 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.
If there is a conflict for two colors of equal priority both set on the same edge, the behavior is undefined.
COLS="ColumnWidthList" specifies a comma-separated list of values giving the width of each frame in the frameset. If one of the values is missing, the corresponding frame is sized to fit by the browser. The browser can approximate some values to make the total height of the rows equal to the height of the window or the total width of the columns equal to the width of the window. ColumnWidthList can be:
FRAMEBORDER determines how frame borders are displayed.Navigator 3.0
When FRAMEBORDER appears in the FRAMESET tag, it sets a default FRAMEBORDER value for all frames in that frameset. When FRAMEBORDER appears in a 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.
ONBLUR="blurJScode" specifies JavaScript code to execute when the window containing the frameset loses focus. See the JavaScript Guide for information on event handlers.Navigator 3.0
ONFOCUS="focusJScode" specifies JavaScript code to execute when the window containing the frameset loses focus. See the JavaScript Guide for information on event handlers.Navigator 3.0
ONLOAD="loadJScode" specifies JavaScript code to execute when the frameset is loaded into the frame. See the JavaScript Guide for information on event handlers.
ONUNLOAD="unloadJScode" specifies JavaScript code to execute when the frameset is unloaded (exited). See the JavaScript Guide for information on event handlers.
ROWS="RowHeightList" specifies a comma-separated list of values giving the height of each frame in the frameset. If one of the values is missing, the corresponding frame is sized to fit by the browser. The browser can approximate some values to make the total height of the rows equal to the height of the window or the total width of the columns equal to the width of the window. RowHeightList can be:
Example 1: frameset with two frames
The following example creates a set of two frames. The frameset is kept in a separate document file, such as index.html, that contains no other information. When users navigate to the file, index.html is loaded, and the FRAMESET tag within index.html then loads the individual URLS referenced in the FRAME tag.
<FRAMESET COLS="30%,70%"> <FRAME SRC="toc.html" NAME="listFrame"> <FRAME SRC="topic.html" NAME="contentFrame"> </FRAMESET>
The two frames appear as columns because COLS is specified within the FRAMESET tag. The left frame uses 30% of the available space, and the right frame uses the remaining 70% of the space. By default, the frames in this example have scroll bars and are resizable, because no values are specified for the SCROLLING and NORESIZE attributes.
The code in this example creates a set of frames similar to the following: _IMG SRC="tags2a.gif" HEIGHT=213 WIDTH=614>
The frameset described in this example acts as a table of contents. The table of contents entries in the left frame are always available to the user. When users click a link in the left frame, the right frame navigates to the chosen topic. Each link in the left frame (the toc.html document file) uses "contentFrame" as the value of its TARGET attribute, which forces the right frame to display the target text.
The following example creates a frameset that contains a nested frameset.
<FRAMESET ROWS="90%,10%"> <FRAMESET COLS="30%,70%"> <FRAME SRC="category.html" NAME="listFrame"> <FRAME SRC="titles.html" NAME="contentFrame"> </FRAMESET> <FRAME SRC="navigate.html" NAME="navigateFrame"> </FRAMESET>
The code in this example creates two sets of frames similar to the following: _IMG SRC="tags2a1.gif" HEIGHT=213 WIDTH=574>
HTML has six levels of headings, numbered 1 through 6, with 1 being the most prominent. Headings are displayed in different fonts (larger and bold) than normal body text.
<H1 ALIGN="LEFT"|"CENTER"|"RIGHT">...</H1>
<H2 ALIGN="LEFT"|"CENTER"|"RIGHT">...</H2>
<H3 ALIGN="LEFT"|"CENTER"|"RIGHT">...</H3>
<H4 ALIGN="LEFT"|"CENTER"|"RIGHT">...</H4>
<H5 ALIGN="LEFT"|"CENTER"|"RIGHT">...</H5>
<H6 ALIGN="LEFT"|"CENTER"|"RIGHT">...</H6>
ALIGN specifies the horizontal alignment of the heading. The value can be:
The following example demonstrates the use of the H1 through H6 tags.
<H1>Level 1 heading</H1> <H2>Level 2 heading</H2> <H3>Level 3 heading</H3> <H4>Level 4 heading</H4> <H5>Level 5 heading</H5> <H6>Level 6 heading</H6>
_IMG SRC="tags2a2.gif" HEIGHT=248 WIDTH=378>
The HEAD tag defines the HTML document header. The header contains information about the document, and can be used to define JavaScript functions to be used in the document. None of the information in the HEAD tag is displayed by the Web browser, except for text contained by the TITLE tag. You should be careful not to put any of your document content (other than JavaScript) in the HEAD tag.
The tags that can occur in a header are <BASE>, <ISINDEX>, <META>, <SCRIPT>, and <TITLE>.
<HEAD> <TITLE> Mozilla speaks out</TITLE> <BASE HREF="http://www.mozilla.com"> </HEAD>
_IMG SRC="tags2a3.gif" HEIGHT=73 WIDTH=378>
The HR tag draws a horizontal line across the document frame or window. You can use a horizontal line to visually divide information or sections. The HR tag doesn't require a closing tag.
<HR
ALIGN="CENTER"|"LEFT"|"RIGHT"
NOSHADE
SIZE="pixThick"
WIDTH="value"
>
ALIGN specifies the horizontal alignment of lines that do not span the width of the page. Navigator 1.1
NOSHADE removes any line shading, producing a solid black line. Navigator 1.1
SIZE="pixThick" indicates the thickness of the line in pixels. The default is 2 pixels. Navigator 1.1
WIDTH="pixPct" defines the horizontal width of the line. The default is the width of the page. The measurement value can be a number of pixels or a percentage of the page width or frame width. Navigator 1.1
The following example draws a horizontal rule between two sentences.
This text appears above a thick, unshaded, centered horizontal rule. <HR NOSHADE ALIGN="CENTER" WIDTH="50%" SIZE="8"> This text appears below the same horizontal rule.
_IMG SRC="tags2a4.gif" HEIGHT=114 WIDTH=379>
The HTML tag identifies your document as an HTML document. These tags should be the first and last tags in any HTML document. This lets the client render the contents of your document correctly.
The following example begins and ends a short document with the HTML tag.
<HTML> <BODY> This is a small HTML file. </BODY> </HTML>
The I tag displays text in italic.
The following example displays "italics" in italics.
Putting text in <I> italics </I> can slant its meaning
_IMG SRC="tags2a5.gif" HEIGHT=88 WIDTH=376>
The IMG tag specifies an image to include in an HTML document. Navigator supports the following types of image formats:
<IMG
ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE"|"ABSBOTTOM"|
"TEXTTOP"|"MIDDLE"|"BASELINE"|"BOTTOM"
ALT="AlternateText"
BORDER="pixBorder"
HEIGHT="height"
HSPACE="pixHorzMarg"
ISMAP
LOWSRC="Location"
NAME="imgName"
ONABORT="imgLoadJScode"
ONERROR="errorJScode"
ONLOAD="imgLoadJScode"
SRC="Location" required
USEMAP="Location#MapName"
VSPACE="pixVertMarg"
WIDTH="width"
>
ALIGN specifies the alignment of the image in relation to the surrounding text. If you do not specify a value for ALIGN, Navigator uses "BOTTOM" as the default.Navigator 1.1
ALT="AlternateText" specifies the simple text that a browser should display if it does not support the IMG tag, or if the user has suspended image loading.
BORDER="value" specifies the width, in pixels, of an image border. Navigator 1.1
HEIGHT="pixels"|"value%" specifies the height of the image either in pixels or as a percentage of the window height. Navigator 1.1
HSPACE="value" specifies a margin in pixels between the left and right edges of the image and surrounding text and images. Navigator 1.1
ISMAP specifies the image as a server-side image map.
LOWSRC="Location" specifies the URL of a low-resolution version of the image.
NAME="imgName" specifies a name by which JavaScript can refer to the image.
ONABORT="imgAbortJScode" specifies JavaScript code to execute when the user terminates the loading of an image. See the JavaScript Guide for information on event handlers.
ONERROR="errorJScode" specifies the JavaScript code to execute when the JavaScript encounters an error. See the JavaScript Guide for information on event handlers.
ONLOAD="imgLoadJScode" specifies the JavaScript event handler to execute when the image is loaded. See the JavaScript Guide for information on event handlers.
SRC="Location" specifies the URL of the image to be displayed in the document.
USEMAP="Location#MapName" specifies the image as a client-side image map. You must specify the URL of the file that contains the map definition, followed by a # symbol, and then the name of the map.
VSPACE="value" specifies a margin in pixels between the top and bottom edges of the image and surrounding text and images.Navigator 1.1
WIDTH="pixels"|"value%" specifies the width of the image either in pixels or as a percentage of the window width.Navigator 1.1
The following example uses all the IMG attributes to improve performance:
<IMG SRC="http://www.HomeWorld.com/logo.gif" LOWSRC="http://www.HomeWorld.com/lowlogo.jpg" ALT="Welcome to Netscape" WIDTH="468" HEIGHT="25" BORDER="0">
This example uses the following attributes to improve performance:
Example 2: text wrapping around an image
In this example, an image is aligned on the right side of the Navigator window, and text flows around it to the left: _IMG SRC="tags2a6.gif" HEIGHT=146 WIDTH=505>
The following HTML code creates the image alignment and text wrap shown in the previous illustration:
<IMG SRC="logo.jpg" ALIGN="right" ALT="Welcome to Netscape" HSPACE="10" VSPACE="5"> <BIG><B>W</B></BIG>e are committed to ensuring that our customers receive answers to their questions and that they enjoy trouble-free use of our products.<P>
In this example, the HSPACE attribute creates a 10-pixel margin below the image, and the VSPACE attribute creates a 5-pixel margin to the left.
The INPUT tag lets you create input fields inside a form. An input field lets the user enter information on an HTML form. The TYPE attribute determines the specific sort of form element to be created:
In addition to the fields defined using INPUT, two types of input fields--selection lists and textarea elements--are defined using the SELECT and TEXTAREA tags.
<INPUT TYPE="BUTTON"
NAME="buttonName" required
VALUE="buttonText"
ONCLICK="JScode"
>
NAME="buttonName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONCLICK="JScode" specifies JavaScript code to execute when a user clicks the button. See the JavaScript Guide for information on event handlers.
VALUE="buttonText" specifies the text to be displayed on the button.
The following example is a JavaScript example that creates a button named CalcButton. The text "Calculate" is displayed on the face of the button. When the button is clicked, the function CalcFunction() is called.
<FORM> <INPUT TYPE="button" VALUE="Calculate" NAME="CalcButton" onClick="CalcFunction(this.form)"> </FORM>
_IMG SRC="tags2a7.gif" HEIGHT=105 WIDTH=379>
<INPUT TYPE="CHECKBOX"
CHECKED
NAME="checkboxName" required
ONCLICK="JScode"
VALUE="checkboxValue"
>
textToDisplay
CHECKED indicates that the checkbox is selected.
NAME="checkboxName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONCLICK="clickJScode" specifies JavaScript code to execute when a user clicks the checkbox. See the JavaScript Guide for information on event handlers.
textToDisplay specifies the label to display next to the checkbox.
VALUE="checkboxValue" specifies the value to be returned to the server when the checkbox is selected and the form is submitted. The default value is ON.
The following example displays a group of four checkbooks that all appear checked by default.
<FORM> <B>Specify your music preferences (check all that apply):</B> <BR><INPUT TYPE="checkbox" NAME="musicpref_rnb" CHECKED> R&B <BR><INPUT TYPE="checkbox" NAME="musicpref_jazz" CHECKED> Jazz <BR><INPUT TYPE="checkbox" NAME="musicpref_blues" CHECKED> Blues <BR><INPUT TYPE="checkbox" NAME="musicpref_newage" CHECKED> New Age </FORM>
_IMG SRC="tags2a8.gif" HEIGHT=158 WIDTH=377>
<INPUT TYPE="FILE"
NAME="name" required
VALUE="value"
>
NAME="name" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
VALUE="value" specifies the initial value of the input element.
The following example creates a file upload element.
<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD="POST"> <B>First name:</B><INPUT TYPE="text"> <BR><B>Last name:</B><INPUT TYPE="text"> <P><B>Brief description of the problem:</B> <BR><INPUT TYPE="text" SIZE="45"> <P><B>Please attach a file with your event log.</B> <BR><B>File name:</B><INPUT TYPE="file"> <P><INPUT TYPE="submit" VALUE="Submit Report"> <INPUT TYPE="button" VALUE="Cancel" onClick="window.close()"> </FORM>
_IMG SRC="tags2a9.gif" HEIGHT=247 WIDTH=462>
<INPUT TYPE="HIDDEN"
NAME="hiddenName" required
VALUE="hiddenValue"
>
NAME="hiddenName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form. This tag provides a mechanism for delivering a value to the server without the user having entered it, but note that it is not very "hidden" because the user can discover it by using the View|Document Source sequence.
VALUE="hiddenValue" specifies the initial value of the input element.
This example creates a form called LoginForm that contains text fields for user name and password, a submit button with the text "Log in" displayed on its face, and a cancel button. A hidden element, DefaultPass, stores the initial value of the password field.
<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" VALUE="treasure"> <INPUT TYPE="hidden" NAME="DefaultPass" VALUE="treasure"> <P><INPUT TYPE="submit" VALUE="Log in"> <INPUT TYPE="button" VALUE="Cancel" onClick="window.close()"> </FORM>
_IMG SRC="tags2a10.gif" HEIGHT=167 WIDTH=375>
<INPUT TYPE="IMAGE"
ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE"|"ABSBOTTOM"|
"TEXTTOP"|"MIDDLE"|"BASELINE"|"BOTTOM"
NAME="name"
SRC="Location"
>
ALIGN specifies the alignment of the image in relation to the surrounding text. If you do not specify a value for ALIGN, Navigator uses "BOTTOM" as the default.Navigator 1.1
NAME="name" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form. When Navigator sends the offsets of the image to the server, it sends them as name.x and name.y.
SRC="Location" specifies the URL of the image to be displayed in the document.
This example creates an image element. When the user clicks the image, the form is submitted.
<FORM> ... <CENTER><INPUT TYPE="image" SRC="signnow.gif"></CENTER> ... </FORM>
<INPUT TYPE="PASSWORD"
MAXLENGTH="maxChar"
NAME="passwordName" required
ONSELECT="jJScode"
SIZE="charsLength"
VALUE="textValue"
>
MAXLENGTH="maxChar" specifies the maximum number of characters a password box can accept.
NAME="passwordName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONSELECT="JScode" specifies JavaScript code to execute when a user selects some of the text in the text element. See the JavaScript Guide for information on event handlers.
SIZE="charsLength" specifies the length of the input field, in characters . When TYPE="text" or TYPE="password", value is the width, specified in characters, of the input field.
VALUE="textValue" specifies the initial value of the password, if any.
This example shows a password element. If the user enters a password containing more than 25 characters, the text scrolls to make room for the additional characters.
<FORM> <B>Password:</B> <INPUT TYPE="password" NAME="password" VALUE="" SIZE="25"> </FORM>
<INPUT TYPE="RADIO"
CHECKED
NAME="radioName" required
ONCLICK="JScode"
VALUE="buttonValue" required
>
textToDisplay
CHECKED indicates that the rradio button is selected. .
NAME="radioName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form. All radio buttons that have the same name constitute a radio group; only one radio button of a group can be set at one time.
ONCLICK="clickJScode" specifies JavaScript code to execute when a user clicks the radio button. See the JavaScript Guide for information on event handlers.
textToDisplay specifies the label to display next to the radio button.
VALUE="value" specifies the value that is returned to the server when the radio button is selected and the form is submitted. This defaults to ON.
The following example creates a radio button group.
<FORM> <B>Category:</B> <BR><INPUT TYPE="radio" NAME="category" VALUE="liv" CHECKED> Living <BR><INPUT TYPE="radio" NAME="category" VALUE="din"> Dining <BR><INPUT TYPE="radio" NAME="category" VALUE="bed"> Bedroom <BR><INPUT TYPE="radio" NAME="category" VALUE="bth"> Bath <BR><INPUT TYPE="radio" NAME="category" VALUE="grd"> Garden <BR><INPUT TYPE="radio" NAME="category" VALUE="shp"> Shop </FORM>
_IMG SRC="tags2a11.gif" HEIGHT=186 WIDTH=378>
<INPUT TYPE="RESET"
NAME="resetName" required
ONCLICK="JScode"
VALUE="buttonText"
>
NAME="resetName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONCLICK="JScode" specifies JavaScript code to execute when a user clicks the button. See the JavaScript Guide for information on event handlers.
VALUE="buttonText" specifies the text to display on the face of the reset button. .
This example displays a text element with the default value "CA" and a reset button with the text "Clear Form" displayed on its face. If the user types a state abbreviation in the text element and then clicks the Clear Form button, the original value of "CA" is restored.
<FORM> <B>State: </B><INPUT TYPE="text" NAME="state" VALUE="CA" SIZE="2"> <P><INPUT TYPE="reset" VALUE="Clear Form"> </FORM>
_IMG SRC="tags2a12.gif" HEIGHT=136 WIDTH=377>
<INPUT TYPE="SUBMIT"
NAME="submitName" required
VALUE="buttonText"
>
NAME="submitName" specifies the name of the input element. The name is not displayed on the form.
VALUE="buttonText" specifies the text to display on the face of the submit button.
The following example creates a submit button called SubmitButton. The text "Done" is displayed on the face of the button.
<FORM> <INPUT TYPE="submit" NAME="SubmitButton" VALUE="Done"> </FORM>
_IMG SRC="tags2a13.gif" HEIGHT=105 WIDTH=377>
<INPUT TYPE="TEXT"
MAXLENGTH="maxChar"
NAME="textName" required
ONBLUR="blurJScode"
ONCHANGE="changeJScode"
ONFOCUS="focusJScode"
ONSELECT="JScode"
SIZE="lengthChar"
VALUE="textValue"
>
MAXLENGTH="maxChar" specifies the maximum number of characters a text box can accept.
NAME="textName" specifies the name of the input element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONBLUR="blurJScode" specifies JavaScript code to execute when the text element loses focus. See the JavaScript Guide for information on event handlers.
ONCHANGE="changeJScode" specifies JavaScript code to execute when the text element loses focus and its value has been modified. See the JavaScript Guide for information on event handlers.
ONFOCUS="focusJScode" specifies JavaScript code to execute when a user clicks the text element. See the JavaScript Guide for information on event handlers.
ONSELECT="JScode" specifies JavaScript code to execute when a user selects some of the text in the text element. See the JavaScript Guide for information on event handlers.
SIZE="lengthChar" specifies the length of the input field, in characters . When TYPE="text" or TYPE="password", value is the width, specified in characters, of the input field.
VALUE="textValue" specifies the initial value of the text element.
The following example creates a text element that is 25 characters long. The text field appears immediately to the right of the words "Last name:". The text field is blank when the form loads.
<FORM> <B>Last name:</B> <INPUT TYPE="text" NAME="last_name" VALUE="" SIZE="25"> </FORM>
_IMG SRC="tags2a14.gif" HEIGHT=112 WIDTH=377>
The ISINDEX tag indicates that the document has a searchable index. An HTML index document can be read and queried using a keyword search, if the server has access to a search engine. Generally, documents with the ISINDEX tag include a user interface element (such as a button) or a prompt to initiate the search. You can control the text that appears as part of the search by using the PROMPT attribute.
The keywords are passed to the server by adding a question mark to the end of the URL followed by a list of keywords separated by a plus sign. For example:
http://www.acme.com/products/index.htm?inventory+ordering+shipping
Note that ISINDEX does not require a closing tag.
PROMPT="text" specifies the text that appears as the search prompt in the browser. Navigator 1.1
The following example uses the ISINDEX tag.
<HEAD> <ISINDEX> <TITLE> Finding the Perfect Glaze </TITLE> </HEAD> <BODY> <FORM> <INPUT TYPE="SUBMIT" NAME="SubmitButton" VALUE="Search"> </FORM> </BODY>
_IMG SRC="tags2a15.gif" HEIGHT=165 WIDTH=380>
The KBD tag indicates text that is a keyboard key. Netscape Navigator displays the specified text in the current fixed-width font as determined by the font setting (Options|General Preferences).
The <KBD>ENTER</KBD> key lets you ...
_IMG SRC="tags2a16.gif" HEIGHT=88 WIDTH=378>
The KEYGEN tag facilitates the generation of key material and submission of the public key as part of an HTML form. This mechanism is designed for use in web-based certificate management systems. It displays a menu of key-size choices from which the user must choose one. Then, when the submit button is pressed, a key pair of the selected size is generated. The private key is encrypted and stored in the local key database.
The public key and challenge string are DER encoded as PublicKeyAndChallenge, and then digitally signed with the private key to produce a SignedPublicKeyAndChallenge. The SignedPublicKeyAndChallenge is base64 encoded, and the ASCII data is finally submitted to the server as the value of a name-value pair, where the name is name as specified by the NAME attribute of the KEYGEN tag.
<KEYGEN
NAME="name" required
CHALLENGE="challenge"
>
NAME="name" specifies the name for the name-value pair.
CHALLENGE="challenge" specifies the challenge string to be packaged with the public key in the PublicKeyAndChallengefor use in verification of the form submission. If no challenge string is provided, then it is encoded as an IA5STRING of length zero.
<FORM.....> ... <KEYGEN NAME="somekey" CHALLENGE="1125983021"> ... </FORM>
The LI tag indicates an item in a list. A single list item can contain additional paragraphs, marked with the P tag.
The LI tag does not require a closing tag.
<LI
TYPE=
"DISC"|"CIRCLE"|"SQUARE" | within
UL
"A"|"a"|"I"|"i"|"1" within
OL
VALUE="number"
>
TYPE specifies the type of symbol or numbering sequence to use before each item.
DISC specifies a solid bullet
CIRCLE specifies a hollow bullet
SQUARE specifies a square bullet
A specifies a sequence of uppercase letters
a specifies a sequence of lowercase letters
I specifies a sequence of uppercase Roman numerals
i specifies a sequence of lowercase Roman numerals
1 specifies a sequence of numbers.
VALUE="number" indicates the starting number for an item in a numbered list. This attribute is valid only in an ordered list. See "OL (ordered list)" on page 131 for information on the types of numbering available.
The following example defines three HTML terms. Note the use of < and > as one way to represent the less-than and greater-than characters.
The <LI> tag allows you to:<P> <UL> <LI>Identify items in a numbered list <LI>Identify items in an unordered list <LI>Identify items in a directory list <LI>Identify items in a menu </UL>
_IMG SRC="tags2a17.gif" HEIGHT=168 WIDTH=375>
An image map is a graphic that contains hyperlinks. The image map can be divided into many regions, and each region of the map can point to a different URL. When a user clicks a specific region of the image map, Navigator loads a specific URL.
Client-side image maps are defined by the MAP and AREA tags and loaded into the Navigator as hypergraphics. When a user clicks the image, Navigator determines what URL to load based on the information in the AREA tag. The USEMAP attribute of the IMG tag specifies an image as a client-side image map.
<MAP
NAME="mapName" required
>
...
</MAP>
NAME="mapName" specifies the name of the map.
In this example, an image map is used as a toolbar to help users navigate in a web site. The following illustration shows what the finished image map looks like to a user: _IMG SRC="tags2a18.gif" HEIGHT=80 WIDTH=612>
Each button on the toolbar is a separate region of the image map. The seven buttons correspond to regions defined by seven AREA tags. The following code defines the map:
<MAP NAME="mainmap"> <AREA COORDS="0,0,65,24" HREF="/escapes/index.html"> <AREA COORDS="66,0,132,24" HREF="/comprod/index.html"> <AREA COORDS="133,0,185,24" HREF="http://merchant.netscape.com/netstore/index.html" TARGET="_top"> <AREA COORDS="186,0,248,24" HREF="/newsref/index.html"> <AREA COORDS="249,0,318,24" HREF="/assist/index.html"> <AREA COORDS="319,0,390,24" HREF="/commun/index.html"> <AREA COORDS="391,0,467,24" HREF="/business_solutions/index.html"> </MAP>
Because no SHAPE attribute is specified for any AREA tag, the shape of each region defaults to a rectangle. The third AREA tag uses the "_top" value for its TARGET attribute to specify that its URL is loaded into the full Navigator window.
The image used for the toolbar is nav.gif, an interlaced GIF. The IMG tag that loads nav.gif uses the USEMAP attribute to specify that the image is a client-side image map. The value of the USEMAP attribute, mainmap, is also the value used for the NAME attribute of the MAP tag. The following code associates the map with the image:
<IMG SRC="nav.gif" WIDTH="468" HEIGHT="25" BORDER="0" USEMAP="#mainmap">
Deprecated
The MENU tag defines a list of simple items, such as you would use to create a menu. This tag works just like the UL tag. The items should be short, no longer than one line. Each is begun by the <LI> tag.
The following example creates a simple menu.
Netscape Navigator supports these platforms:
<MENU> <LI> UNIX <LI> Windows <LI> Macintosh </MENU>
_IMG SRC="tags2a19.gif" HEIGHT=128 WIDTH=378>
The META tag specifies meta-document information or creates an HTTP response header. The META tag provides a way to store information about the document that is not available elsewhere in the document. For example, the META tag can contain catalog, author, or index information that various search engines can use.
The META tag creates a special HTTP response header that the server sends to the client before transmitting the HTML document. This form of the META syntax is frequently used to implement client pull.
When you create an HTTP header with META, do not override a response header field that is normally returned by the server. Use META to create a special response header field, such as a "refresh" field that implements client pull.
<META
CONTENT="value" required
HTTP-EQUIV="FieldName"
NAME="name"
>
CONTENT="FieldContent" specifies the value of the HTTP response header field created by HTTP-EQUIV.Navigator 1.1
HTTP-EQUIV="FieldName" specifies the name of the HTTP response header field.
NAME="name" specifies a name for the meta-document information. Different programs that access meta-document information expect different values for this attribute
Example 1: indexing information
In this example, the META tag stores indexing information that a search engine uses when it accesses the document. This search engine expects the NAME attribute to have a value of "keywords" when a document is indexed. Search utilities and some webcrawlers used by web search servers will catalog this information. The index keywords are stored as the value of the CONTENT attribute.
<HEAD> <TITLE>HTML Reference</TITLE> <META NAME="keywords" CONTENT="HTML documentation reference Netscape"> </HEAD>
This document is indexed under the terms "HTML", "documentation", "reference", and "Netscape".
Example 2: a special HTTP header
In this example, the META tag creates a special HTTP header field called "Creation_Date". This field is returned by the server when an HTTP connection for this document is established.
<HEAD> <META NAME="Creation_Date" CONTENT="July 17, 1995 19:24:00"> </HEAD>
This example creates the following HTTP header field:
Creation_Date: July 17, 1995 19:24:00
In this example, the META tag creates a special HTTP header field that implements a client pull animation. The animation shows three different views of a dog; these views, when loaded sequentially, simulate the dog running. The CONTENT attribute specifies that each view of the dog is displayed for three seconds.
When a user loads spot1.html, the file is displayed for three seconds. Then the second file, spot2.html is loaded. After three more seconds elapse, spot3.html is loaded by the browser. The following code is contained in a file called spot1.html:
<HEAD> <TITLE>See Spot Run</TITLE> <META NAME="refresh" CONTENT="3,URL='http://www.homepage.com/spot2.html'"> </HEAD> <BODY> <IMG SRC="spot1.gif"> </BODY>
The file spot2.html contains the following information:
<HEAD> <TITLE>See Spot Run</TITLE> <META NAME="refresh" CONTENT="3;URL='http://www.homepage.com/spot3.html'"> </HEAD> <BODY> <IMG SRC="spot2.gif"> </BODY>
Similarly, the file spot3.html contains a reference to spot3.gif within an IMG tag.
Tag reference list Part 3Go to Tag reference section, Part 3
Navigator 3.0
The MULTICOL tag establishes an area of the document as having multiple, equal-width columns.
<MULTICOL
COLS="number" required
GUTTER="gwidth"
WIDTH="colwidth"
>
...
</MULTICOL>
COLS="number" specifies the number of text columns for the text display. Netscape Navigator attempts to flow elements evenly across the columns to make each column be about the same height. Unless the WIDTH attribute is present, column width is adjusted to fill the available view.
GUTTER="gwidth" specifies the number of pixels to appear between columns. If it is not specified, Netscape Navigator uses 10.
WIDTH="colwidth" specifies the width of each column in the group, in pixels. All columns are the same width. If WIDTH is not present, its value is determined by subtracting from the display width the number of pixels that constitute the gutter and then dividing by the number of columns
The following example uses the MULTICOL tag to display three columns of text.
<MULTICOL COLS="3" WIDTH="520" > <P> HyperText Markup Language (HTML) is a set of tags and attributes that mark how text is organized and displayed by web browsers. </P><P> HTML documents are files containing text and tags written for the HyperText Transport Protocol (HTTP)--the protocol used throughout the World Wide Web. </P><P> HTML tags define both the structure of a web page and the way the marked text displays in a browser such as Netscape Navigator. Tags mark the start and the end of text. For example, you can use the H1 tag to mark text as a first-level heading. When a web browser such as Netscape Navigator displays that text, it appears in a large font, </P><P> HTML documents may have different appearances on different browsers. Even if all of your readers use Netscape Navigator, they all might not see your HTML page in the same way because they can configure Netscape Navigator to use different fonts and to override your color settings. </P> </MULTICOL>
_IMG SRC="tags3a.gif" HEIGHT=292 WIDTH=396>
Navigator 1.1
The NOBR tag ensures that a line of text does not wrap to the next line. This tag is useful for words or phrases that must be kept together on one line. However, note that if the line of text is long, it can extend beyond the margin of the browser window, so the user must use scrollbars to view the text.
The following example uses the NOBR tag to display a long line of text.
<NOBR> Line breaks are not inserted into the text contained within a <NOBR> block. This tag should be used with care, since it can create <i>really</i> long lines of text. </NOBR>
_IMG SRC="tags3a1.gif" HEIGHT=74 WIDTH=589>
Use the NOEMBED tag if your document might be displayed on a browser that cannot display content from plug-in programs, and you want to provide alternative content. Browsers that can display objects ignore all text in the NOEMBED tag.
The following example uses the NOEMBED tag to provide alternate information for a browser that cannot embed objects.
<NOEMBED> Sorry -- this page requires a web browser that can display objects. We recommend <I>Netscape Navigator</i>. </NOEMBED> <EMBED SRC="MyMovie.mov", WIDTH="150"> <EMBED SRC="Game.ids", WIDTH="400">
Use the NOFRAMES tag to provide alternative content for browsers to display if they do not recognize frames. Browsers that can display frames ignore all text in the NOFRAMES tags unless a file called by a frame tag is missing or unreachable by the browser.
Place the NOFRAMES tag within the FRAMESET tag.
The following example uses the NOFRAMES tag within the FRAMESET tag.
<FRAMESET ROWS="50%,*"> <FRAME SRC="upper.html"> <FRAME SRC="lower.html"> <NOFRAMES> Sorry -- this page requires a web browser that supports frames. We recommend <I>Netscape Navigator</i>. </NOFRAMES> </FRAMESET>
Navigator 3.0
The NOSCRIPT tag delimits the content for a browser to display when JavaScript is not available, or when the user has turned off support for JavaScript by means of the Network|Languages preferences setting.
The OL tag creates an ordered, or numbered, list. The default numbering style is determined by the browser, but you can use the tag's attributes to change the numbering sequence. Use LI to designate the individual list items.
<OL
START="value"
TYPE="value"
>
...
</OL>
START="value" indicates the starting number for the list. The number must be a positive integer.Navigator 1.1
TYPE="value" defines the type of numbering sequence used for each list item, depending on the type of list the item is in. Navigator 1.1 The value can be:
The following example uses the LI tag to define three list elements in an ordered list. The numbers are roman numerals and begin with the number three.
The following steps outline how to create HTML files:
<OL START="3" TYPE="I"> <LI> Use a text editor or Netscape Navigator Gold to create your HTML file. <LI> Put the HTML files on a web server. <LI> Test the files by accessing them with the server's URL. </OL>
_IMG SRC="tags3a2.gif" HEIGHT=160 WIDTH=378>
The OPTION tag specifies a single option within the scope of a SELECT tag.
<OPTION
VALUE="optionValue"
SELECTED
>
...
</OPTION>
VALUE="OptionValue" specifies a value that is returned to the server when the option is selected and the form is submitted. When no VALUE attribute is present, the value returned is the same as the text following the <OPTION> tag.
SELECTED specifies that the option is selected by default.
The following example uses OPTION to specify the selections in a SELECT list. The user can select only one item from this list. The value returned to the server is "Standard", "2-day", or "speedy".
<FORM> ... <B>Shipping method:</B><BR> <SELECT> <OPTION> Standard <OPTION SELECTED> 2-day <OPTION VALUE="speedy"> Overnight </SELECT> ... </FORM>
_IMG SRC="tags3a3.gif" HEIGHT=136 WIDTH=378>
The P tag specifies a paragraph. You must use the P tag to separate content because in HTML carriage returns aren't significant. The P tag puts space after the paragraph (unlike the BR tag). Most browsers do not recognize the ending tag.
<P
ALIGN="LEFT"|"CENTER"|"RIGHT"
>
...
</P>
ALIGN specifies the horizontal alignment of the paragraph. Navigator 1.1 The value can be:
The following example uses the P tag to break the text into two paragraphs.
<P > The <P> tag begins
a new paragraph.
<P> The </P> tag can terminate a paragraph, but few
web browsers require it. As a result, few authors user it.
_IMG SRC="tags3a4.gif" HEIGHT=122 WIDTH=377>
The PARAM tag assigns a value for a parameter required by an applet.
<PARAM
NAME="value" required
VALUE="value" required
>
NAME="value" specifies the name of the variable.
VALUE="value" specifies the value for the variable.
The following example uses the PARAM tag to assign values to variables required by the applet.
<APPLET CODEBASE="http://www.netscape.com/comprod/products/navigator/version_2.0/java_applets/StarField"
CODE="stars.class" WIDTH="400" HEIGHT="100">
<PARAM NAME="numstars" VALUE="50">
</APPLET>
Deprecated in favor of PRE.
The PLAINTEXT tag displays text in a plain text style, with no additional styles (bold, italics, underlined). The PLAINTEXT tag suppresses interpretation of all HTML tags within its scope.
The following example uses the PLAINTEXT tag.
<PLAINTEXT> The <B>PLAINTEXT</B> tag suppresses interpretation of HTML tags that <I>follow</I> it to the end of the document.
The PRE tag displays preformatted text in the fixed-width font as determined by the font setting (Options|General Preferences). Using this tag you can insert and reproduce formatted text, preserving its original layout, but you have to use entities for the <> and other symbols. The <PRE> tag suspends text joining and blank suppression. This makes the <PRE> tag useful for duplicating blocks of text that were created for some text-only form, such as electronic mail messages and news postings.
The PRE tag does not suppress interpretation of other HTML tags, unlike XMP and PLAINTEXT.
The mail message said: <PRE> To: Lee Smith From: Chris Brown Subject: Meeting schedule Date: Fri, 13 Sep 1996 22:00:05 9/17/96 8:00 a.m. Room 218 9/18/96 9:00 a.m. Room 218 9/23/96 2:00 p.m. Room 111 </PRE>
Navigator 3.0
See "STRIKE (strikeout type)" on page 143. The <S> ... </S> pair is exactly equivalent to the <STRIKE> ... </STRIKE> pair.
The SAMP tag delimits a sequence of literal characters, such as example text. The text is rendered in the fixed-width font, as determined in Options|General Preferences. It is equivalent to the XMP tag.
When writing HTML documents, be sure to start with a basic HTML document layout: <SAMP> <HTML> <HEAD> </HEAD> <BODY> </BODY> <</HTML> </SAMP>
The SCRIPT tag specifies client-side JavaScript code. Anything that you enter within the SCRIPT tag is treated as a script element by the browser. For example, text within angle brackets is interpreted by the browser as a script element, not as an HTML element.
See the JavaScript Guide for more information.
<SCRIPT
LANGUAGE="LanguageName" required
unless SRC is present
SRC="Location"
>
...
</SCRIPT>
LANGUAGE="LanguageName" specifies the program language. If the LANGUAGE attribute is not specified, the default value is JavaScript.
You can specify JavaScript 1.1 for scripts to be executed by the 1.1 version of JavaScript (compatible with Navigator 3.0), or JavaScript 1.0 for scripts to be executed by the 1.0 version. Navigator 3.0
SRC="Location" specifies the URL of the script, if you want to load a script from a separate file. The suffix on a Location specifies the scripting language. The web server maps the suffix to the MIME time, so a script that contains JavaScript code should have a suffix that maps to "appliation/x-javascript" Navigator 3.0
Example 1: using the SCRIPT tag
The following example uses the SCRIPT tag to define a JavaScript script. Because the SCRIPT tag is contained within the HEAD tag, the script is loaded before anything else in the document is loaded. The JavaScript code in this example defines a function which opens another browser window.
<SCRIPT LANGUAGE="JavaScript"> function createWindow() { answerWindow=window.open(answerWindowUrl) } </SCRIPT>
Example 2: using the SRC attribute
The following example uses the SRC attribute to specify the location of a file containing JavaScript code:
<SCRIPT LANGUAGE="JavaScript" SRC="http://www.netscape.com/myScript.js"> </SCRIPT>
The SELECT tag defines a selection list on an HTML form. A selection list lets the user choose one or more items from a list.
When a form is submitted to the server, the value portion of a selection list's name=value pair is the text that follows the selected OPTION tag.
<SELECT
NAME="selectName" required
MULTIPLE
ONBLUR="blurJScode"
ONCHANGE="changeJScode"
ONCLICK="JScode"
ONFOCUS="focusJScode"
SIZE="ListLength"
>
...
</SELECT>
MULTIPLE specifies that multiple items can be selected. If omitted, only one item can be selected from the list.
NAME="selectName" specifies the name of the select element. This value is the name portion of the name-value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONBLUR="blurJScode" specifies JavaScript code to execute when the select element loses focus. See the JavaScript Guide for information on event handlers.
ONCHANGE="changeJScode" specifies JavaScript code to execute when the select element loses focus and its value has been modified. See the JavaScript for information on event handlers.
ONCLICK="JScode" specifies JavaScript code to execute when a user clicks the button. See the JavaScript Guide for information on event handlers.
ONFOCUS="focusJScode" specifies JavaScript code to execute when a user clicks the select element or tabs to it. See the JavaScript Guide for information on event handlers.
SIZE="ListLength" specifies the number of options visible when the form is displayed. If the list contains more options than specified by size, the list is displayed with scrollbars.
The following example creates a list. The user can select only one item from this list.
<FORM> ... <B>Shipping method:</B><BR> <SELECT> <OPTION> Standard <OPTION SELECTED> 2-day <OPTION> Overnight </SELECT> ... </FORM>
_IMG SRC="tags3a5.gif" HEIGHT=136 WIDTH=376>
If the SIZE attribute is omitted as shown here, the list is displayed as a pull-down list, as shown in the Shipping Method list in the previous figure. If SIZE is present, the list looks similar to the Music Types list in the previous figure.
The following example creates a list. The MULTIPLE attribute lets the user select multiple items from this list.
<FORM> ... <B>Music types for your free CDs:</B><BR> <SELECT NAME="music_type_multi" MULTIPLE> <OPTION> R&B <OPTION> Jazz <OPTION> Blues <OPTION> Reggae </SELECT> ... </FORM>
_IMG SRC="tags3a6.gif" HEIGHT=139 WIDTH=378>
Example 3: multiple selection with default
In the following example, all three options can be chosen, but bananas are selected by default.
<FORM> ... <SELECT NAME="fruit_choices" MULTIPLE> <OPTION>Apples <OPTION SELECTED>Bananas <OPTION>Cherries </SELECT> ... </FORM>
_IMG SRC="tags3a7.gif" HEIGHT=136 WIDTH=378>
The SERVER tag specifies server-side JavaScript statements that are compiled by LiveWire. (Contrast this with the SCRIPT tag, which specifies client-side JavaScript statements.) When a script is specified within the SERVER tag, LiveWire runs it on the server. See the LiveWire Developer's Guide for more information about JavaScript in LiveWire.
The following example uses the SERVER tag to define a LiveWire script. This LiveWire script connects to a database server:
<SERVER> database.connect("INFORMIX", "blue", "ADMIN", "MANAGER", "mydb") </SERVER>
Navigator 2.0
The SMALL tag displays text in a smaller font size than the default font size. The text displays one size smaller (n-1). You can specify the default font size using the BASEFONT tag. Unless defined by the user, the default font size is 3.
The following example decreases the font size two times for "smaller, and smaller."
<FONT SIZE="+1"> When Alice ate from the Caterpillar's mushroom, she grew <SMALL>smaller and <SMALL>smaller.</SMALL></SMALL> </FONT>
_IMG SRC="tags3a8.gif" HEIGHT=90 WIDTH=377>
Navigator 3.0
The SPACER tag provides better control over the spacing of objects and whitespace in HTML pages. It governs the space between words or between lines, or creates a spacing rectangle, similar to an invisible image.
<SPACER
ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE"|"ABSBOTTOM"|
"TEXTTOP"|"MIDDLE"|"BASELINE"|"BOTTOM"
HEIGHT="value"
SIZE="value"
TYPE="HORIZONTAL"|"VERTICAL"|"BLOCK"
WIDTH="value"
>
ALIGN applies only when the spacer is of type BLOCK, and specifies the alignment of the spacing rectangle in relation to the surrounding text. If you do not specify a value for ALIGN, Navigator uses "BOTTOM" as the default.
HEIGHT="value" applies only when the spacer is of type BLOCK, and specifies the height of the spacing rectangle in pixels.
SIZE="pixelSize" depents on the value of TYPE. When the spacer is of type BLOCK, pixelSize specifies the absolute width or height in pixels of the spacing rectangle. When the spacer is of type HORIZONTAL or VERTICAL pixelSize specifies the absolute width or height in pixels of the added space.
TYPE specifies whether the spacing is that between words, that between lines, or that of a rectangular space.
WIDTH="value" applies only when the spacer is of type BLOCK, and specifies the width of the spacing rectangle in pixels.
Navigator 3.0
The STRIKE tag displays text with a line (strike) through it.
The following example displays "strikes" with a line through the word.
Three <STRIKE>strikes</STRIKE> and you're out.
_IMG SRC="tags3a9.gif" HEIGHT=100 WIDTH=431>
The STRONG tag defines text that displays with "strong emphasis." Typically the text is displayed in boldface.
<STRONG>CAUTION!</STRONG> If you aren't careful, you may hurt yourself.
_IMG SRC="tags3a10.gif" HEIGHT=83 WIDTH=380>
Navigator 2.0
The SUB tag displays text as a subscript. A subscript appears slightly below the baseline (bottom edge) of preceding text and in a smaller font.
The following displays a subscript.
The chemical notation for water is <CODE>H<SUB>2</SUB>0</CODE>.
_IMG SRC="tags3a11.gif" HEIGHT=91 WIDTH=378>
Navigator 2.0
The SUP tag displays text as a superscript. A superscript appears slightly above preceeding text and in a smaller font.
The following example displays the 2 in e=mc2 as a superscript.
If Einstein was right, then <CODE>e=mc<SUP>2</SUP></CODE>.
_IMG SRC="tags3a12.gif" HEIGHT=93 WIDTH=378>
Navigator 1.1
The TABLE tag defines a table. Rows are defined by the <TR> tag and cells within the rows by the <TD> tag.
<TABLE
ALIGN="LEFT"|"RIGHT"
BGCOLOR="color"
BORDER="value"
CELLPADDING="value"
CELLSPACING="value"
HEIGHT="height"
HSPACE="pixHoriz"
WIDTH="pixels"|"value%"
VSPACE="pixVert"
>
...
</TABLE>
ALIGN specifies the horizontal placement of the table:
If you want to center a table, you can use the DIV tag with ALIGN="CENTER" around the table.
BGCOLOR="color" changes the color of the background for the table. This color can be overridden by a BGCOLOR tag in the TH, TR, or TD tags. The value of color is a hexadecimal red-green-blue triplet, or a color name. See Appendix B, "Color values."Navigator 3.0
BORDER="value" draws a border around the table. The value is the number of borders (lines) you want around the table. Use a value of 0 to use the space reserved for borders to expand the area of your table.
CELLPADDING="value" determines the amount of space between the border of a cell and the contents of the cell. The default is 1.
CELLSPACING="value" determines the amount of space between individual cells in a table. The default is 2.
HEIGHT="height" specifies the height in pixels that the table must fit. The table is scaled to fit the specified height and width.
HSPACE="pixHoriz" specifies the horizontal space in pixels within which the table must fit. The table is scaled to fit the specified height and width
VSPACE="pixVert" specifies the vertical space in pixels within which the table must fit. The table is scaled to fit the specified height and width.
WIDTH="pixels"|"value%" defines the width of the table. The default is the optimal width determined by the contents of each cell. The measurement value can be a number of pixels or the width as a percentage of the page size.
The following example creates a three-column, four-row table, with the caption "Tables are as easy as one, two, three" aligned at the bottom of the table.
<TABLE BORDER CELLPADDING="8" CELLSPACING="4"> <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> <CAPTION ALIGN="BOTTOM"> <B>Table 1</B>: Tables are as easy as one, two, three </CAPTION> </TABLE>
_IMG SRC="tags3a13.gif" HEIGHT=237 WIDTH=377>
Navigator 1.1
The TD tag specifies text that is table data. Place the TD tag within the TABLE tag.
<TD "
ALIGN="CENTER"|"LEFT"|"RIGHT"
BGCOLOR="value"
COLSPAN="value"
NOWRAP="value"
ROWSPAN="value"
VALIGN="BASELINE"|"BOTTOM"|"MIDDLE"|"TOP"
>
...
</TD>
ALIGN specifies the horizontal placement of the table. The value can be
BGCOLOR="value" changes the color of the background of the table cell created by the TD tag. The color value is a hexadecimal red-green-blue triplet, or a color name. See Appendix B, "Color values."Navigator 3.0
COLSPAN="value" indicates the number of columns the cell spans.
NOWRAP specifies that the lines within a cell cannot be broken (i.e. are not word wrapped).
ROWSPAN="value" indicates the number of rows the cell spans.
VALIGN specifies the vertical placement of the text within a cell:
The TEXTAREA tag defines a multiline input field on an HTML form. A textarea field lets the user enter words, phrases, or numbers.
The following figure shows a textarea element: _IMG SRC="tags3a14.gif" HEIGHT=260 WIDTH=466>
Scrollbars appear if the text in the textarea element exceeds the number of columns or rows in the box.
To begin a new line in a textarea element, use a new paragraph. For example, the following textarea element contains two lines, a blank line, then one line:
<FORM> <B>Description:</B> <BR><TEXTAREA NAME="item_description" ROWS="6" COLS="55"> This is the first line. This is the second line. This is the last line. </TEXTAREA> </FORM>
_IMG SRC="tags3a15.gif" HEIGHT=199 WIDTH=379>
<TEXTAREA
COLS="value" required
NAME="textareaName" required
ONBLUR="blurJScode"
ONCHANGE="changeJScode"
ONFOCUS="focusJScode"
ONSELECT="selectJScode"
ROWS="integer"
WRAP="OFF"|"HARD"|"SOFT"
>
textToDisplay
</TEXTAREA>
COLS="value" defines the width (number of characters per line) the textarea can accommodate without scrolling.
NAME="textareaName" specifies the name of the textarea element. This value is the name portion of the name=value pair sent to the server when the form is submitted. The name is not displayed on the form.
ONBLUR="blurJScode" specifies JavaScript code to execute when the textarea element loses focus. See the JavaScript Guide for information on event handlers.
ONCHANGE="changeJScode" specifies JavaScript code to execute when the textarea element loses focus and its value has been modified. See the JavaScript for information on event handlers.
ONFOCUS="focusJScode specifies JavaScript code to execute when a user clicks the textarea element or tabs to it. See the JavaScript Guide for information on event handlers.
ONSELECT="selectJScode" specifies JavaScript code to execute when a user selects some of the text in the textarea element. See the JavaScript Guide for information on event handlers.
ROWS="integer" defines the height (number of rows) the textarea can accommodate without scrolling.
textToDisplay specifies the label to display in the textarea.
WRAP specifies whether lines longer than the textarea's column width wrap to the next line. Navigator 2.0. The value can be:
The following example creates a textarea element that is 6 rows long and 55 columns wide. The textarea field appears immediately below the word "Description:". When the form loads, the textarea element contains several lines of data, including one blank line.
<FORM> <B>Description:</B> <BR><TEXTAREA NAME="item_description" ROWS="6" COLS="55"> Our storage ottoman provides an attractive way to store lots of CDs and videos--and it's versatile enough to store other things as well. It can hold up to 72 CDs under the lid and 20 videos in the drawer below. </TEXTAREA> </FORM>
_IMG SRC="tags3a16.gif" HEIGHT=192 WIDTH=377>
Navigator 1.1
The TH tag specifies a table heading.
<TH
ALIGN="CENTER"|"LEFT"|"RIGHT"
BGCOLOR="color"
COLSPAN="value"
NOWRAP
ROWSPAN="value"
VALIGN="BASELINE"|"BOTTOM"|"MIDDLE"|"TOP"
>
...
</TH>
ALIGN specifies the horizontal placement of the table:
BGCOLOR="color" changes the color of the background of the table heading. This color can be overridden by a BGCOLOR tag in the TD tags within the scope of the TH tag. The color value is a hexadecimal red-green-blue triplet, or a color name. See Appendix B, "Color values."Navigator 3.0
COLSPAN="value" indicates the number of columns the cell spans.
NOWRAP specifies that the lines within a cell cannot be broken (in other words, are not word wrapped).
ROWSPAN indicates the number of rows the cell spans.
VALIGN specifies the vertical placement of the text within a cell:
The TITLE tag specifies the title of the document. Generally this title appears in the title bar of the browser window. In addition, the title can be used by automated web search tools to locate an applicable document. If a title is not provided, by default the filename or URL of the document is displayed in the title bar.
<HTML> <HEAD> <TITLE> Mozilla teaches HTML in three easy steps. </TITLE> <BODY> </BODY> </HTML>
_IMG SRC="tags3a17.gif" HEIGHT=75 WIDTH=377>
Navigator 1.1
The TR tag specifies a table row.
<TR
ALIGN="CENTER"|"LEFT"|"RIGHT"
BGCOLOR="color"
VALIGN="BASELINE"|"BOTTOM"|"MIDDLE"|"TOP"
>
...
</TR>
ALIGN specifies the horizontal placement of the table:
BGCOLOR="color" changes the color of the background of the table row created by the TR tag. This color can be overridden by a BGCOLOR tag in the TD tags within the scope of the TR tag. The value of color is a hexadecimal red-green-blue triplet, or a color name. See Appendix B, "Color values."Navigator 3.0
VALIGN specifies the vertical placement of the text within a cell:
The TT tag displays text in the fixed-width (typewriter) font, as determined in Options|General Preferences.
To run the program, type <TT>xyz</TT> at the command prompt, and then press <KYBD>ENTER</KYBD>.
_IMG SRC="tags3a18.gif" HEIGHT=89 WIDTH=377>
Navigator 3.0
The U tag underlines the text it delimits, causing all text within its scope to have a solid underline drawn along the common baseline of the text.
The UL tag defines an unordered list. These items, each begun by the <LI> tag, can contain multiple paragraphs. Just separate the paragraphs with the P paragraph tag.
<UL TYPE="CIRCLE"|"DISC"|"SQUARE">
TYPE defines the type of bullet used for each list item, depending on the type of list the item is in: Navigator 1.1
Navigator 1.1
The WBR tag marks a spot where a line break can take place. It is advisory, as contrasted with the BR and NOBR tags.
The WBR tag does not require a closing tag.
<NOBR> Line breaks are not ordinarily inserted into the text contained within a <NOBR> block, which can produce some awkwardly long lines. <WBR> If the text contains a <WBR> tag, however, it marks a location where the insertion of a line break is permitted. </NOBR>
_IMG SRC="tags3a19.gif" HEIGHT=100 WIDTH=589>
The XMP tag defines a sequence of literal characters, such as example text. The text is displayed in the fixed-width font, as determined in Options|General Preferences. Netscape Navigator ignores all HTML tags within the scope of the XMP tag.
<XMP> The <XMP> tag is similar to the <PRE> tag except that HTML tags inside an <XMP> block are displayed rather than interpreted. </XMP>
_IMG SRC="tags3a20.gif" HEIGHT=78 WIDTH=590>
ðÏÐÕÌÑÒÎÏÓÔØ: 17, Last-modified: Thu, 09 Apr 1998 09:31:07 GmT