[prev] [next] [top]
[bottom] (1 out of 1)
MULTICOL (multiple column formatting)NOEMBED (alternate text for plug-ins)
NOFRAMES (alternate text for frames)
NOSCRIPT (alternate text for JavaScript)
OPTION (option in a SELECT list)
PARAM (parameter for an applet)
PLAINTEXT (display rest of document as-is)
PRE (preformatted text, fixed-width font, no join)
SCRIPT (client-side JavaScript code)
SELECT (selection list on a form)
SERVER (run a LiveWire script)
SPACER (horizontal and vertical spacing)
TEXTAREA (text field on a form)
XMP (sequence of literal characters)
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>
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>
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>
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>
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.
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 "application/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>
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>
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>
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>
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.
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.
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>.
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>.
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>
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:
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>
<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>
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>
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>.
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>
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>