Webmaster in a Nutshell

Previous Chapter 3 Next
 

3. HTML Tags

Contents:
HTML Tag and Attribute Descriptions

This section lists the known HTML tags and attributes currently available for use in Web documents. There are many different browsers out there, and they do not all support the same set of tags.

If keeping track of all the browsers and all their differences makes your head spin, no fear. Netscape Navigator and Microsoft's Internet Explorer are the two most popular browsers, and are responsible for almost all of the non-standard extensions to HTML. Chapter 8, Browser Comparison, discusses the most important differences between the latest versions of these two browsers.

The most recent version of Netscape Navigator is 3.0. Tags and attributes specific to this browser have N3 at the beginning of their descriptions. Microsoft's Internet Explorer is also currently at version 3.0. It will be indicated by IE3. Browser-specific tags for the earlier versions of the browsers (e.g., IE2 or N2) are assumed to be supported in the later versions.

3.1 HTML Tag and Attribute Descriptions

<a>

Create a hyperlink (href attribute) or fragment identifier (name attribute) within a document.

Attributes

href=url

Specify the URL of a hyperlink target (required if not a name anchor).

methods=list

Specify a comma-separated list of browser-dependent presentation methods.

name=string

Specify the name of a fragment identifier (required if not a hypertext reference anchor).

rel=relationship

Indicate the relationship from this document to the target.

rev=relationship

Indicate the reverse relationship of the target to this document.

target=name

Define the name of the frame or window to receive the referenced document.

title=string

Provide a title for the target document.

urn=urn

Specify the location-independent Uniform Resource Name for this hyperlink.

Example

To create an anchor named info at some point in a document called doc.html, use the <a> tag with the name attribute:

<a name="info">Information</a>

To provide a hyperlink to that point in doc.html, use the <a> tag with the href attribute appending the anchor name to the filename using a hash mark (#):

<a href="doc.html#info">Link to information</a>

<address>

The enclosed text is an address.

<applet>

Define an executable applet within a text flow.

Attributes

align=position

Align the <applet> region to either the top, middle, bottom (default), left, right, absmiddle, baseline, or absbottom of the text in the line.

alt=string

Specify alternative text to replace the <applet> region within browsers that support the <applet> tag, but cannot execute the application.

code=class

Specify the class name of the code to be executed (required).

codebase=url

URL from which the code is retrieved.

height=n

Specify the height, in pixels, of the <applet> region.

hspace=n

Specify additional space, in pixels, to the left and right of the <applet> region.

name=string

Specify the name of this particular instance of the <applet>.

vspace=n

Specify additional space, in pixels, above and below the <applet> region.

width=n

Specify the width, in pixels, of the <applet> region.

<area>

Define a mouse-sensitive area in a client-side image map.

Attributes

coords=list

Specify a comma-separated list of shape-dependent coordinates that define the edge of this area.

href=url

Specify the URL of a hyperlink target associated with this area.

nohref

Indicate that no document is associated with this area; clicking in the area has no effect.

shape=shape

Define the region's shape to be either circ, circle, poly, polygon, rect, or rectangle.

<b>

Format the enclosed text using a bold typeface.

<base>

Specify the base URL for all relative URLs in this document.

Attributes

href=url

Specify the base URL.

target=name

Define the default target window of all <a> links in the document. Mostly used for redirecting a link to other frames. There are four special values: _blank, _parent, _self, and _top. These values are described in Chapter 4, Frames.

<basefont>

Specify the font size for subsequent text.

Attributes

size=value

Set the basefont size of 1 to 7 (required; default is 3).

<bgsound>

IE2 and later. Define background audio for the document.

Attributes

loop=value

Set the number of times to play the audio; value may be an integer or the value infinite.

src=url

Provide the URL of the audio file to be played.

<big>

Format the enclosed text using a bigger typeface.

<blockquote>

The enclosed text is a block quotation.

<body>

Delimit the beginning and end of the document body.

Attributes

alink=color

Set the color of active hypertext links in the document.

background=url

Specify the URL of an image to be tiled in the document background.

bgcolor=color

Set the background color of the document.

bgproperties=value

IE2 and later. When set to fixed, prevent the background image from scrolling with the document content.

leftmargin=value

IE2 and later. Set the size, in pixels, of the document's left margin.

link=color

Set the color of unvisited hypertext links in the document.

text=color

Set the color of regular text in the document.

topmargin=value

IE2 and later. Set the size, in pixels, of the document's top margin.

vlink=color

Set the color of visited links in the document.

<br>

Break the current text flow, resuming at the beginning of the next line.

Attributes

clear=margin

Break the flow and move downward until the desired margin, either left, right, or all, is clear.

<caption>

Define a caption for a table.

Attributes

align=position

For Netscape, set the vertical position of the caption to either top or bottom. Default is top, centered. For Internet Explorer, set the horizontal alignment of the caption to either left, center, or right, or even the vertical position to top or bottom. The default is top, centered. You cannot set both the horizontal and vertical position with this attribute alone. See Chapter 8, Browser Comparison, for more information.

valign=position

IE2 and later. Set the vertical position of the caption to either top or bottom. Default is top. Use this with a horizontal specification to align to set both vertical and horizontal caption position in Internet Explorer.

See Chapter 5, Tables, for more information on using tables.

<center>

Center the enclosed text.

<cite>

The enclosed text is a citation.

<code>

The enclosed text is a code sample.

<col>

IE2 and later. Set properties for a column (or columns) within a <colgroup> of a table.

Attributes

align=value

Specify alignment of text in the cells of a column. Value can be center, left, or right.

span=n

Specify the number of columns to be affected by the <col> settings.

<colgroup>

IE2 and later. Set properties for designated column or columns within a table Also indicates where vertical rules will be drawn when rules=groups is set in the <table> tag.

Attributes

align=value

Specify alignment of text in the cells of columns in the <colgroup>. Values can be center, left, or right.

span=n

Specify the number of columns in the <colgroup>.

<comment>

IE2 and later. Place a comment in the document. Comments will be visible in all other browsers. Comments can be placed within <!- - comment text - -> for all browsers.

<dd>

Define the definition portion of an element in a definition list.

<dfn>

Format the enclosed text as a definition.

<dir>

Create a directory list containing <li> tags.

Attributes

compact

Make the list more compact if possible.

<div>

Create a division within a document.

Attributes

align=type

Align the text within the division to left, center, or right.

<dl>

Create a definition list containing <dt> and <dd> tags.

Attributes

compact

Make the list more compact if possible.

<dt>

Define the definition term portion of an element in a definition list.

<em>

Format the enclosed text with additional emphasis.

<embed>

Embed an object into a document. Additional parameters to those listed here may be included depending on the embedded object.

Attributes

src=url

Specify the URL of the object to be embedded (required).

height=n

Specify the height of the area the embedded object will occupy.

name=name

Specify the name of the embedded object.

width=n

Specify the width of the area the embedded object will occupy.

<font>

Set the size, color, or typeface of the enclosed text.

Attributes

color=color

Set the color of the enclosed text. text"

face=list

Set the typeface of the enclosed text to the first available font in the comma-separated list of font names.

size=value

Set the size to an absolute value (1 to 7), or relative to the <basefont> size using +n or -n.

<form>

Delimit a form.

Attributes

action=url

Specify the URL of the application that will process the form. The default is the current URL.

enctype=encoding

Specify how the form element values will be encoded.

method=style

Specify the parameter-passing style, either get or post The default is get.

target=name

IE3 only. Specify a target window for results of form submission to be loaded. The special attributes _bottom, _top, _parent, and _self may be used. They are described in Chapter 4, Frames.

See Chapter 10, HTML Form Tags, for more information on using forms.

<frame>

Define a frame within a frameset.

Attributes

bordercolor=color

N3 only. Set color for frame border if border is turned on with frameborder=yes.

frameborder=[1|0]

IE3 only. Enable or disable the displaying of a 3-D border for a frame. Default is 1, which inserts the border. The value 0 turns the border off.

frameborder=[yes|no]

N3 only. Enable or disable the displaying of a 3-D border for a frame or a plain border. The default is yes (for 3-D borders).

marginheight=n

Place n pixels of space above and below the frame contents.

marginwidth=n

Place n pixels of space to the left and right of the frame contents.

name=string

Define the name of the frame.

noresize

Disable user resizing of the frame.

scrolling=type

Always add scrollbars (yes), never add scrollbars (no), or add scrollbars when needed (auto).

src=url

Define the URL of the source document for this frame.

See Chapter 4, Frames for more information on using frames.

<frameset>

Define a collection of frames or other framesets.

Attributes

border=n

N3 only. Set size in pixels of frame borders within a frameset. Default border width is 5 pixels.

bordercolor=color

N3 only. Set color for frame borders in a frameset.

cols=list

Specify the number and width of frames within a frameset.

frameborder=[yes|no]

N3 only. Enable or disable the displaying of 3-D borders or regular borders for frames. The default is yes (3-D borders).

frameborder=[1|0]

IE3 only. Enable or disable the displaying of 3-D borders for frames within a frameset. The default is 1 (borders on).

framespacing=n

IE3 only. Add additional space between adjacent frames in pixels.

rows=list

Specify the number and height of frames within a frameset.

See Chapter 4, Frames for more information on using frames.

<hn>

The enclosed text is a level n header; for level n from 1 to 6.

Attributes

align=type

Specify the heading alignment as either left (default), center, or right.

<head>

Delimit the beginning and end of the document head.

<hr>

Break the current text flow and insert a horizontal rule.

Attributes

align=type

Specify the rule alignment as either left, center (default), or right.

noshade

Do not use 3-D shading to render the rule.

size=pixels

Set the thickness of the rule to an integer number of pixels.

width=value

Set the width of the rule to either an integer number of pixels or a percentage of the page width.

<html>

Delimit the beginning and end of the entire HTML document.

Attributes

version=string

Indicate the HTML version used to create this document.

<i>

Format the enclosed text in an italic typeface.

<iframe>

IE3 only. Define a floating frame within a document with similar placement to <img>. This element requires a closing tag.

Attributes

align=type

Align the floating frame to either the top, middle, bottom (default), left, or right of the text in the line.

frameborder=[1|0]

Enable or disable the displaying of a 3-D border for a frame. Default is 1, which inserts the border. The value 0 turns the border off.

height=n

Specify the height of the frame in pixels or as a percentage of the window size.

hspace=n

Specify the space, in pixels, to be added to the left and right of the image.

marginheight=n

Place n pixels of space above and below the frame contents.

marginwidth=n

Place n pixels of space to the left and right of the frame contents.

name=string

Define the name of the frame.

noresize

Disable user resizing of the frame.

scrolling=type

Always add scrollbars (yes), never add scrollbars (no), or add scrollbars when needed (auto).

src=url

Define the URL of the source document for this frame.

vspace=n

Specify the vertical space, in pixels, added at the top and bottom of the image.

width=n

Specify the width of the frame in pixels or as a percentage of the window size.

See Chapter 4, Frames for more information on using frames.

<img>

Insert an image into the current text flow.

Attributes

alt=text

Provide alternative text for non-image-capable browsers.

border=n

Set the pixel thickness of the border around images contained within hyperlinks.

controls

IE2 and later. Add playback controls for embedded video clips.

dynsrc=url

IE2 and later. Specify the URL of a video clip to be displayed.

height=n

Specify the height of the image in pixels.

hspace=n

Specify the space, in pixels, to be added to the left and right of the image.

ismap

Indicate that the image is mouse-selectable when used within an <a> tag.

loop=value

IE2 and later. Set the number of times to play the video; value may be an integer or the value infinite.

lowsrc=url

N2 and later. Specify a low-resolution image to be loaded by the browser first, followed by the image specified by the <src> attribute.

src=url

Specify the source URL of the image to be displayed (required).

start=start

IE2 and later. Specify when to play the video clip, either fileopen or mouseover.

usemap=url

Specify the map of coordinates and links that define the hypertext links within this image.

vspace=n

Specify the vertical space, in pixels, added at the top and bottom of the image.

width=n

Specify the width of the image in pixels.

<input type=checkbox>

Create a checkbox input element within a <form>.

Attributes

checked

Mark the element as initially selected.

name=string

Specify the name of the parameter to be passed to the form-processing application if the input element is selected (required).

value=string

Specify the value of the parameter sent to the form-processing application if this form element is selected (required).

See Chapter 10, HTML Form Tags, for more information on using forms.

<input type=file>

Create a file-selection element within a <form>.

Attributes

maxlength=n

Specify the maximum number of characters to accept for this element.

name=string

Specify the name of the parameter that is passed to the form-processing application for this input element (required).

size=n

Specify the number of characters to display for this element.

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=hidden>

Create a hidden element within a <form>.

Attributes

maxlength=n

Specify the maximum number of characters to accept for this element.

name=string

Specify the name of the parameter that is passed to the form-processing application for this input element (required).

size=n

Specify the number of characters to display for this element.

value=string

Specify the value of this element that is passed to the form-processing application.

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=image>

Create an image input element within a <form>.

Attributes

align=type

Align the image to either the top, middle, or bottom of the form element's text.

name=string

Specify the name of the parameter to be passed to the form-processing application for this input element (required).

src=url

Specify the source URL of the image (required).

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=password>

Create a content-protected text-input element within a <form>.

Attributes

maxlength=n

Specify the maximum number of characters to accept for this element.

name=string

Specify the name of the parameter to be passed to the form-processing application for this input element (required).

size=n

Specify the number of characters to display for this element.

value=string

Specify the initial value for this element.

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=radio>

Create a radio-button input element within a <form>.

Attributes

checked

Mark the element as initially selected.

name=string

Specify the name of the parameter that is passed to the form-processing application if this input element is selected (required).

value=string

Specify the value of the parameter that is passed to the form-processing application if this element is selected (required).

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=reset>

Create a reset button within a <form>.

Attributes

value=string

Specify an alternate label for the reset button.

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=submit>

Create a submit button within a <form>.

Attributes

name=string

Specify the name of the parameter that is passed to the form-processing application for this input element (required).

value=string

Specify an alternate label for the submit button, as well as the value passed to the form-processing application for this parameter if this button is clicked.

See Chapter 10, HTML Form Tags for more information on using forms.

<input type=text>

Create a text input element within a <form>. (This is the default input type.)

Attributes

maxlength=n

Specify the maximum number of characters to accept for this element.

name=string

Specify the name of the parameter that is passed to the form-processing application for this input element (required).

size=n

Specify the number of characters to display for this element.

value=string

Specify the initial value for this element.

See Chapter 10, HTML Form Tags for more information on using forms.

<isindex>

Create a "searchable" HTML document.

Attributes

action=url

IE2 and later. Provide the URL of the program that will perform the searching action.

prompt=string

Provide an alternate prompt for the input field.

<kbd>

The enclosed text is keyboard-like input.

<li>

Delimit a list item in an ordered (<ol>) or unordered (<ul>) list.

Attributes

type=format

Set the type of this list element to the desired format. For <li> within <ol>: A (capital letters), a (lowercase letters), I (capital Roman numerals), i (lowercase Roman numerals), or 1 (Arabic numerals; default). For <li> within <ul>: circle, disc (default), or square.

value=n

Set the number for this list item to n.

<link>

Define a link in the document <head> between this document and another document.

Attributes

href=url

Specify the hypertext reference URL of the target document.

methods=list

Specify a browser-dependent list of comma-separated display methods for this link.

rel=relation

Indicate the relationship from this document to the target. For Internet Explorer 3.0, rel=style indicates the existence of an external style sheet.

rev=relation

Indicate the reverse relationship from the target to this document.

src=url

IE3 only. Specify the URL for the external style sheet to be used in formatting the document.

title=string

Provide a title for the target document.

type=text/css

IE3 only. Show type of outside link to be an external cascading style sheet.

urn=urn

Provide the location-independent Uniform Resource Name for the target document.

<listing>

Same as <pre width=132> ... </pre>; deprecated: don't use.

<map>

Define a map containing hotspots in a client-side image map.

Attributes

name=string

Define the name of this map (required).

<marquee>

IE2 and later. Create a scrolling-text marquee.

Attributes

align=position

Align the marquee to the top, middle, or bottom of the surrounding text.

behavior=style

Define marquee style to be scroll, slide, or alternate.

bgcolor=color

Set the background color of the marquee.

direction=dir

Define the direction, left or right, the text is to scroll.

height=value

Define the height, in pixels, of the marquee area.

hspace=value

Define the space, in pixels, to be inserted left and right of the marquee.

loop=value

Set the number of times to animate the marquee; value is an integer or infinite.

scrollamount=value

Set the number of pixels to move the text for each scroll movement.

scrolldelay=value

Specify the delay, in milliseconds, between successive movements of the marquee text.

vspace=value

Define the space, in pixels, to be inserted above and below the marquee.

width=value

Define the width, in pixels, of the marquee area.

<menu>

Define a menu list containing <li> tags.

Attributes

compact

Make the list more compact.

<meta>

Provides additional information about a document.

Attributes

content=string

Specify the value for the meta-information (required). For client pulls, content="n;url=url" tells the browser to load the specified url after n seconds. If no URL is specified, the source document will be reloaded. Must be used with http-equiv="refresh" within <meta>.

http-equiv=string

Specify the HTTP equivalent name for the meta-information and cause the server to include the name and content in the HTTP header for this document when it is transmitted to the client. A value of refresh creates a "client-pull" within a document.

name=string

Specify the name of the meta-information.

<multicol>

N3 only. Format enclosed HTML and text in multicolumn format. Text and elements will flow across specified number of columns to give them approximately equal length.

Attributes

cols=n

Specify number of columns (required).

gutter=n

Specify amount of space in pixels between columns. Default is 10 pixels.

width=n

Specify width of columns in pixels.

<nextid>

Define the labeling start point for automatic document-generation tools.

Attributes

n=n

Indicate the starting label number (required).

<nobr>

No breaks allowed in the enclosed text.

<noframes>

Define content to be presented by browsers that do not support frames.

See Chapter 4, Frames for more information on using frames.

<noscript>

N3 only. Specify alternative content for browsers that do not support JavaScript. See Chapter 21, JavaScript Quick Reference, for more information on JavaScript.

<object>

IE3 only. Insert an object into the document. This tag is used to specify applets, OLE controls, and other media objects.

Attributes

align=value

Specify how the object is aligned with other elements in the document. Values include: baseline, center, left, middle, right, textbottom, textmiddle, and texttop.

border=n

Set the width of the object's border if it is a hyperlink.

classid=url

Identify the class identifier of the object. The URL syntax of the URL depends on the object type.

codebase=url

Identify the URL of the object's codebase. The syntax of the URL depends on the object.

codetype=codetype

Specify the media type of the code.

data=url

Specify the URL of the data used for the object. The syntax of the URL depends on the object.

declare

Declare an object without instantiating it.

height=n

Specify the height of the object in pixels.

hspace=n

Specify the amount of space in pixels between the sides of the object and the surrounding elements.

name=url

Specify the name of the object.

shapes

Indicate shaped hyperlinks in object.

standby=message

Specify message to display during object loading.

type=type

Specify the media type for data.

usemap=url

Specify image map to use with object.

vspace=n

Specify the amount of space in pixels above and below object.

width=n

Specify object width.

<ol>

Define an ordered list containing numbered (ascending) <li> elements.

Attributes

compact

Present the list in a more compact manner.

start=n

Start numbering the list at n, instead of 1.

type=format

Set the numbering format for this list to either A (capital letters), a (lowercase letters), I (capital Roman numerals), i (lowercase Roman numerals), or 1 (Arabic numerals; default).

<option>

Define an option within a <select> item in a <form>.

Attributes

selected

Make this item initially selected.

value=string

Return the specified value to the form-processing application instead of the <option> contents.

See Chapter 10, HTML Form Tags for more information on using forms.

<p>

Start and end a paragraph.

Attributes

align=type

Align the text within the paragraph to left, center, or right.

<param>

Supply a parameter to the <applet> or <object> surrounding this tag.

Attributes

name=string

Define the name of the parameter.

value=string

Define the value of the parameter.

valuetype=type

IE3 only. Indicate the type of value. Can be one of three types: data indicates that the parameter's value is data (default); ref indicates that the parameter's value is a URL; object indicates that the value is a URL of another object in the document.

type=type

IE3 only. Specify the media type.

<plaintext>

Render the remainder of the document as preformatted plain text.

<pre>

Render the enclosed text in its original, preformatted style, honoring line breaks and spacing verbatim.

Attributes

width=n

Size the text, if possible, so that n characters fit across the display window.

<s>

The enclosed text is struck through with a horizontal line.

<samp>

The enclosed text is a sample.

<script>

Specify enclosed script in a supported scripting language to be used in the document.

Attributes

language=lang

Identify language of the script, e.g., JavaScript or VBScript.

src=url

N3 only. Specify the URL of an outside file containing the script to be loaded and run with the document.

See Chapter 21, JavaScript Quick Reference, for more information on JavaScript.

<select>

Define a multiple-choice menu or scrolling list within a <form>, containing one or more <option> tags.

Attributes

multiple

Allow user to select more than one <option> within the <select>.

name=string

Define the name for the selected <option> values that, if selected, are passed to the form-processing application (required).

size=n

Display items using a pulldown menu for size=1 (without multiple specified) and a scrolling list of n items otherwise.

See Chapter 10, HTML Form Tags for more information on using forms.

<small>

Format the enclosed text using a smaller typeface.

<spacer>

N3 only. Insert a whitespace element in a document.

Attributes

type=type

Specify what type of spacer to use. vertical inserts space between two lines of text. horizontal inserts space between words or characters. block inserts a rectangular space like an <img> object.

size=n

Specify size in pixels for either width of horizontal spacer, or height of vertical spacer.

width=n

Specify width in pixels of block spacer.

height=n

Specify height in pixels of block spacer.

align=value

Specify alignment of block spacer with surrounding text. Values are the same as for the <img> tag.

<span>

IE3 only. Specify style-sheet formatting to text between tags.

Attributes

style=elements

Specify cascading style sheet elements for text in the span.

<strike>

The enclosed text is struck through with a horizontal line.

<strong>

Strongly emphasize the enclosed text.

<style>

IE3 only. Surrounds list of style elements to be used in formatting of document. The <style> block comes before the <body> tag and outside all other elements except <html> ... </html>.

<sub>

Format the enclosed text as a subscript.

<sup>

Format the enclosed text as a superscript.

<table>

Define a table.

Attributes

align=position

Align the table either left or right with the surrounding text flow.

background=url

Specify an image to be tiled in the background of the table.

bgcolor=color

N3, IE2 and later. Define the background color for the entire table.

border=n

Create a border n pixels wide.

bordercolor=color

IE2 and later. Define the border color for the entire table.

bordercolordark=color

IE2 and later. Define the dark border-highlighting color for the entire table.

bordercolorlight=color

IE2 and later. Define the light border-highlighting color for the entire table.

cellpadding=n

Place n pixels of padding around each cell's contents.

cellspacing=n

Place n pixels of spacing between cells.

frame=[void|above|below|hsides|lhs|rhs|vsides| box|border]

IE3 only. Specify which sides of a table's outer border will be drawn. void removes outer borders. box and border display all. hsides draws horizontal sides, vsides draws vertical sides. lhs draws left side, rhs right side.

hspace=n

Specify the horizontal space, in pixels, added at the left and right of the table.

rules=[all|cols|groups|none|rows]

IE3 only. Turn off (none) or turn on rules between table cells by cols, rows, groups, or all.

vspace=n

Specify the vertical space, in pixels, added at the top and bottom of the table.

width=n

Set the width of the table to n pixels or a percentage of the window width.

See Chapter 5, Tables for more information on tables.

<tbody>

IE2 and later. Specify the rows in a table to be grouped as the main table body. Requires no ending tag. This element is used to indicate where rules will be drawn when rules=groups is used in the <table> tag.

<td>

Define a table data cell.

Attributes

align=type

Align the cell contents to the left, center, or right.

background=url

Specify an image to be tiled in the background of the cell.

bgcolor=color

N3, IE2 and later. Define the background color for the cell.

bordercolor=color

IE2 and later. Define the border color for the cell.

bordercolordark=color

IE2 and later. Define the dark border highlighting color for the cell.

bordercolorlight=color

IE2 and later. Define the light border highlighting color for the cell.

colspan=n

Have this cell straddle n adjacent columns.

nowrap

Do not automatically wrap and fill text in this cell.

rowspan=n

Have this cell straddle n adjacent rows.

valign=type

Vertically align this cell's contents to the top, center, bottom, or baseline of the cell.

width=n

Set the width of this cell to n pixels or a percentage of the table width.

See Chapter 5, Tables for more information on tables.

<textarea>

Define a multiline text input area within a <form>; content of the <textarea> tag is the initial, default value.

Attributes

cols=n

Display n columns of text within the text area.

name=string

Define the name for the text-area value that is passed to the form-processing application (required).

rows=n

Display n rows of text within the text area.

wrap=style

N2 and later. Set word wrapping within the text area to off, virtual (display wrap, but do not transmit to server), or physical (display and transmit wrap).

See Chapter 10, HTML Form Tags for more information on forms.

<tfoot>

IE2 and later. Specify the rows that will be grouped as the table footer. Requires no ending tag. Used to indicate where rules will be drawn when rules=groups is set in the <table> tag. See Chapter 5, Tables for more on tables.

<th>

Define a table header cell.

Attributes

align=type

Align the cell contents to the left, center, or right.

background=url

Specify an image to be tiled in the background of the cell.

bgcolor=color

N3, IE2 and later. Define the background color for the cell.

bordercolor=color

IE2 and later. Define the border color for the cell.

bordercolordark=color

IE2 and later. Define the dark border-highlighting color for the cell.

bordercolorlight=color

IE2 only. Define the light border-highlighting color for the cell.

colspan=n

Have this cell straddle n adjacent columns.

nowrap

Do not automatically wrap and fill text in this cell.

rowspan=n

Have this cell straddle n adjacent rows.

valign=type

Vertically align this cell's contents to the top, center, bottom, or baseline of the cell.

width=n

Set the width of this cell to n pixels or a percentage of the table width.

See Chapter 5, Tables for more information on tables.

<thead>

IE2 and later. Specifies the rows that will be grouped as the table header. Requires no ending tag. This element is used to indicate where rules will be drawn when rules=groups is set in the <table> tag. See Chapter 5, Tables for more information on tables.

<title>

Define the HTML document's title.

<tr>

Define a row of cells within a table.

Attributes

align=type

Align the cell contents in this row to the left, center, or right.

background=url

Specify an image to be tiled in the background of the cell.

bgcolor=color

N3, IE2 and later. Define the background color for this row.

border=n

Create a border n pixels wide.

bordercolor=color

IE2 and later. Define the border color for this row.

bordercolordark=color

IE2 and later. Define the dark border-highlighting color for this row.

bordercolorlight=color

IE2 and later. Define the light border-highlighting color for this row.

valign=type

Vertically align the cell contents in this row to the top, center, bottom, or baseline of the cell.

See Chapter 5, Tables for more information on tables.

<tt>

Format the enclosed text in typewriter-style (monospaced) font.

<ul>

Define an unordered list of bulleted <li> elements.

Attributes

compact

Display the list in a more compact manner.

type=bullet

N2 and later. Set the bullet style for this list to either circle, disc (default), or square.

<var>

The enclosed text is a variable's name.

<wbr>

Indicate a potential word break point within a <nobr> section.

<xmp>

Same as <pre width=80> ... </pre>; deprecated, do not use.


Previous Home Next
HTML Tag Syntax Book Index Frames

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell