XHTML Tag handout - UCL



This appendix contains an alphabetical listing of some common XHTML tags and attributes - for a full list visit

A (anchor or link)

The A tag lets you define anchors and links.

Syntax

...

Attributes:

HREF="Location" required for a link

NAME="AnchorName" optional (and uncommon) in a link

ONCLICK="clickJScode"

ONMOUSEOUT="outJScode"

ONMOUSEOVER="overJScode"

TARGET="WindowName"

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 (format as address)

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.

Syntax

...

AREA (client-side image maps)

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.

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.

Syntax

Attributes:

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

SHAPE specifies the shape of the map. Each shape has its own form of the COORDS attribute:

•circle URL x,y,x,y specifies a circle. Circles need two coordinates the first pair identifies the circle center and the second identifies any point on the circle's edge. •rect URL x,y,x,y specifies a rectangle by its upper left (first pair) and lower right corners. •poly URL x,y,x,y specifies a polygon of up to 100 sides. Each x,y pair is the point where two sides of the polygon meet. The last x,y pair is connected to the first to enclose the polygon. •default URL defines the URL to jump to when someone clicks in an area not specified by any regions. If you use a point in the map file, then the default is never used.

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.

B (boldface)

The B tag displays text in boldface.

Syntax

...

BLOCKQUOTE (indent block of text)

The BLOCKQUOTE tag indents a block of text. Use the BLOCKQUOTE tag for longer quotations, and the CITE tag for short quotations.

Syntax

...

BODY (main content of document)

The BODY tag specifies the main content of a document. Each HTML document begins with a ..., then concludes with a ....) 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.

Syntax

...

Attributes:

ALINK="color"

BACKGROUND="bgURL"

BGCOLOR="color"

LINK="color"

TEXT="color"

ONBLUR="blurJScode"

ONFOCUS="focusJScode"

ONLOAD="loadJScode"

ONUNLOAD="unloadJScode"

VLINK="color"

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.

BR (line break)

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

The BR tag does not require a closing tag.

Syntax

CENTER (center a block of text)

The CENTER tag centers the enclosed block of text.

Syntax

...

CITE (citation)

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

Syntax

...

DD (definition description)

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

Syntax



DIV (section of a document)

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

Syntax



Attributes:

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

•LEFT aligns the division flush left (the default). •CENTER centers the division. •RIGHT aligns the division flush right.

DL (definition list)

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

Syntax

......

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.

DT (definition term)

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

Syntax



FONT (change color, face, size)

deprecated

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

Syntax

...

Attributes:

COLOR="color"

FACE="fontlist"

SIZE="fontSize"

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.

FORM (create form)

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

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

•INPUT •SELECT •TEXTAREA

Syntax

...

Attributes:

ACTION="ServerURL" required, if any action is to occur

ENCTYPE="EncodingType"

METHOD="GET"|"POST"

NAME="FormName"

ONRESET="resetJScode"

ONSUBMIT="submitJScode"

TARGET="WindowName"

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:

•"application/x-www-form-urlencoded" (the default), is typically used if METHOD attribute has the value "POST" •"multipart/form-data" is used when the form contains a file upload element (INPUT TYPE="file").

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

•GET (the default) appends the input information to the URL which on most receiving systems becomes the value of the environment variable QUERY_STRING. •POST sends the input information in a data body that is available on stdin with the data length set in the environment variable CONTENT_LENGTH.

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.

FRAME (create an independent window region)

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

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

Syntax

Attributes:

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

FRAMEBORDER determines whether frame borders are displayed. Navigator 3.0

•YES causes an outline-3D border. •NO suppresses the 3D border, although the space the border would have occupied is is still present under control of the BORDER attribute of the FRAMESET tag.

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.

FRAMESET (define a group of frames)

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

•FRAME defines each individual frame. Each frame can be defined with unique features and characteristics using the FRAME tag's attributes. •NOFRAMES provides alternative content for the FRAMESET tag and is for browsers that cannot display frames.

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

Syntax

...

Attributes:

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

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

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:

•Size of a frame in pixels. •Percentage size of each frame. •Relative size of each frame, using asterisk (*) to mean "as much space as possible."

FRAMEBORDER determines how frame borders are displayed.Navigator 3.0

•YES causes an outline-3D border. •NO causes a plain border.

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:

•Size of a frame in pixels. •Percentage size of each frame. •Relative size of each frame, using asterisk (*) to mean "as much space as possible."

H1 through H6 (standard headings)

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.

Syntax

...

...

...

...

...

...

Attributes:

ALIGN

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

•LEFT aligns the heading flush left (the default). •CENTER displays the heading centered. •RIGHT aligns the heading flush right.

HEAD (define document header)

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.

Syntax

...

The tags that can occur in a header are , , , , and .

HR (horizontal rule)

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.

Syntax

Attributes:

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

•CENTER displays the line centered (the default). •LEFT aligns the line flush left. •RIGHT aligns the line flush right.

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

HTML (outermost tag)

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.

Syntax

...

I (italic)

The I tag displays text in italic.

Syntax

...

IMG (insert image)

The IMG tag specifies an image to include in an HTML document.

Use the following formats freely:

•GIF (Graphics Interchange Format) •JPEG (Joint Photographic Experts Group) •PNG (Portable Network Graphics)

Syntax

Attributes:

ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE”|"MIDDLE"|"BASELINE"

ALT="AlternateText"

BORDER="pixBorder"

HEIGHT="height"

HSPACE="pixHorzMarg"

ISMAP

NAME="imgName"

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

•LEFT aligns an image with the left margin. •RIGHT aligns an image with the right margin.

•TOP aligns the top of an image with the top of the tallest item in the current line.

•ABSMIDDLE aligns the middle of an image with the middle of the text in the current line.

•MIDDLE aligns the middle of the image with the baseline of the text in the current line.

•BASELINE aligns the bottom of an image with the baseline of the text in the current line.

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.

HEIGHT="pixels"|"value%" specifies the height of the image either in pixels or as a percentage of the window height.

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.

NAME="imgName" specifies a name by which JavaScript can refer to the image.

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

INPUT (create input elements in a form)

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:

•BUTTON places a button on an HTML form. Use JavaScript code to make the button perform an action you define. See "INPUT TYPE="BUTTON"". •CHECKBOX places a toggle switch on an HTML form, letting the user set a value on or off. See "INPUT TYPE="CHECKBOX””.

•HIDDEN places a text element that is suppressed from form display on an HTML form. A hidden element is used for passing information to the server when a form is submitted. See "INPUT TYPE="HIDDEN””.

•IMAGE places an image, serving as a custom button, on an HTML form. When a user clicks an image element, the form is submitted to the server. See "INPUT TYPE="IMAGE"".

•PASSWORD places a text input field on an HTML form that conceals its value. When the user enters text into the field, a character such as * or a black dot hides anything entered from view. See "INPUT TYPE="PASSWORD"".

•RADIO places a radio button on an HTML form. A set of radio buttons that all have the same NAME attribute lets the user choose one item from the set. If one radio button in a set has the CHECKED attriubute, that one is selected when the set is first laid out on the window. See "INPUT TYPE="RADIO"".

•RESET places a reset button on an HTML form. When a user presses a reset button, all elements in the form are reset to their default values. See "INPUT TYPE="RESET"".

•SUBMIT places a submit button on an HTML form. When a user presses a submit button, the form is submitted to the server. See "INPUT TYPE="SUBMIT""

•TEXT places a text input field on an HTML form. A text field lets the user enter a word, phrase, or series of numbers. See "INPUT TYPE="TEXT"".

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"

Syntax

Attributes:

CHECKED

NAME="checkboxName" required

ONCLICK="JScode"

VALUE="checkboxValue"

textToDisplay specifies the label to display next to the checkbox.

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.

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.

INPUT TYPE="HIDDEN"

Syntax

Attributes:

ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE"|"ABSBOTTOM"|

"TEXTTOP"|"MIDDLE"|"BASELINE"

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

•LEFT aligns an image with the left margin. •RIGHT aligns an image with the right margin. •TOP aligns the top of an image with the top of the tallest item in the current line.

•ABSMIDDLE aligns the middle of an image with the middle of the text in the current line.

•ABSBOTTOM aligns the bottom of an image with the bottom of the lowest item in the current line.

•TEXTTOP aligns the top of an image with the top of the tallest text in the current line.

•MIDDLE aligns the middle of the image with the baseline of the text in the current line.

•BASELINE aligns the bottom of an image with the baseline of the text in the current line..

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.

INPUT TYPE="PASSWORD"

Syntax

Attributes:

CHECKED

NAME="radioName" required

ONCLICK="JScode"

VALUE="buttonValue" required

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.

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.

INPUT TYPE="RESET"

Syntax

Attributes:

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.

INPUT TYPE="TEXT"

Syntax

...

ALIGN="CENTER"|"LEFT"|"RIGHT"

BGCOLOR="value"

COLSPAN="value"

NOWRAP="value"

ROWSPAN="value"

VALIGN="BASELINE"|"BOTTOM"|"MIDDLE"|"TOP"

ALIGN specifies the horizontal placement of the table. The value can be

•CENTER centers the table within the text's left and right margins. •LEFT aligns the table with the text's left margin (the default). •RIGHT aligns the table with the text's right margin.

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:

•BASELINE aligns the text with the cell's baseline. •BOTTOM aligns the text with the cell's bottom. •MIDDLE centers the text within the cell (the default). •TOP aligns the text with the cell's top.

TEXTAREA (text field on a form)

The TEXTAREA tag defines a multiline input field on an HTML form. A textarea field lets the user enter words, phrases, or numbers.

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.

Syntax

textToDisplay

Attributes:

COLS="value" required

NAME="textareaName" required

ONBLUR="blurJScode"

ONCHANGE="changeJScode"

ONFOCUS="focusJScode"

ONSELECT="selectJScode"

ROWS="integer"

WRAP="OFF"|"HARD"|"SOFT"

textToDisplay specifies the label to display in the 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.

WRAP specifies whether lines longer than the textarea's column width wrap to the next line. Navigator 2.0. The value can be:

•OFF disables word wrap. Text the user types is displayed exactly as typed. If the user explicitly inserts a line break, however, the break is included as part of the textarea's value. •HARD causes word wrap, and the line breaks are included when the form is submitted. •SOFT causes word wrap, but the line breaks are not included when the form is submitted.

TH (table heading)

The TH tag specifies a table heading.

Syntax

...

Attributes:

ALIGN="CENTER"|"LEFT"|"RIGHT"

BGCOLOR="color"

COLSPAN="value"

NOWRAP

ROWSPAN="value"

VALIGN="BASELINE"|"BOTTOM"|"MIDDLE"|"TOP"

ALIGN specifies the horizontal placement of the table:

•CENTER centers the table within the text's left and right margins. •LEFT aligns the table with the text's left margin (the default). •RIGHT aligns the table with the text's right margin.

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.

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:

•BASELINE aligns the text with the cell's baseline. •BOTTOM aligns the text with the cell's bottom. •MIDDLE centers the text within the cell (the default). •TOP aligns the text with the cell's top.

TITLE (document title)

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.

Syntax

...

TR (table row)

The TR tag specifies a table row.

Syntax

...

Attributes:

ALIGN="CENTER"|"LEFT"|"RIGHT"

BGCOLOR="color"

VALIGN="BASELINE"|"BOTTOM"|"MIDDLE"|"TOP"

ALIGN specifies the horizontal placement of the table:

•CENTER centers the table within the text's left and right margins. •LEFT aligns the table with the text's left margin (the default). •RIGHT aligns the table with the text's right margin.

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:

•BASELINE aligns the text with the cell's baseline. •BOTTOM aligns the text with the cell's bottom. •MIDDLE centers the text within the cell (the default). •TOP aligns the text with the cell's top.

UL (unordered list)

The UL tag defines an unordered list. These items, each begun by the tag, can contain multiple paragraphs. Just separate the paragraphs with the P paragraph tag.

Syntax



TYPE defines the type of bullet used for each list item, depending on the type of list the item is in: Navigator 1.1

•CIRCLE a hollow bullet. •DISC a solid round bullet (Netscape Navigator default). •SQUARE a square bullet.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download