In the following table, we list in alphabetical order all the known and some undocumented HTML tags and attributes currently supported by one or more of today's browsers.
As with the other sections of this book, we use the Netscape and Microsoft icons to the far right of each item to show which browser supports that tag or attribute. If no icon is shown, the tag or attribute is part of the HTML 3.2 standard and is supported by both browsers.
We include each tag's possible attributes (some required) indented below their respective tags. In the description, we give possible attribute values as either a range of integer numbers or a definitive list of options, where possible.
|
<a> ... </a> |
Create a hyperlink anchor (href attribute) or fragment identifier (name attribute) |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
href=url |
Specify the URL of a hyperlink target (required if not a name anchor) |
|
|
name=name |
Specify the name of a fragment identifier (required if not a hypertext reference anchor) |
|
|
onclick=applet |
Specify an applet to run when user clicks on the image |
(Netscape) (Internet Explorer) |
|
onmouseout=applet |
Specify an applet to run when the mouse leaves the image |
(Netscape) |
|
onmouseover=applet |
Specify an applet to run when the mouse enters the image |
(Netscape) (Internet Explorer) |
|
rel=relationship |
Indicate the relationship from this document to the target |
|
|
rev=relationship |
Indicate the reverse relationship of the target to this document |
|
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
target=name |
Define the name of the frame or window to receive the referenced document |
(Netscape) (Internet Explorer) |
|
title=string |
Provide a title for the target document |
|
|
<address> ... </address> |
The enclosed text is an address |
|
|
<applet> ... </applet> |
Define an executable applet within a text flow |
|
|
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 |
|
|
archive=url |
Specify a class archive to be downloaded to the browser and then searched for code class |
(Netscape) |
|
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 allow to the left and right of the <applet> region |
|
|
mayscript |
If present, allows the applet to access JavaScript within the page |
(Netscape) |
|
name=name |
Specify the name of this particular instance of the <applet> |
|
|
title=string |
Provide a title for the applet |
(Internet Explorer) |
|
vspace=n |
Specify additional space, in pixels, to allow 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 |
|
|
alt=string |
Provide alternative text to be displayed by nongraphical browsers |
|
|
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 |
|
|
notab |
Do not include this area in the tabbing order |
(Internet Explorer) |
|
onmouseout=applet |
Specify an applet to be run when the mouse leaves this area |
(Netscape) |
|
onmouseover=applet |
Specify an applet to be run when the mouse enters this area |
(Netscape) |
|
shape=shape |
Define the region's shape to be circ, circle, poly, polygon, rect, or rectangle |
|
|
taborder=n |
Specify this area's position in the tabbing order |
(Internet Explorer) |
|
target=name |
Specify the frame or window to receive the document linked by this area |
(Netscape) |
|
title=string |
Provide a title for this area |
(Internet Explorer) |
|
<b> ... </b> |
Format the enclosed text using a bold typeface |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<base> |
Specify the base URL for all relative URLs in this document |
|
|
href=url |
Specify the base URL (required) |
|
|
target=name |
Define the default target of all <a> links in the document |
(Netscape) (Internet Explorer) |
|
<basefont> |
Specify the font size for subsequent text |
|
|
color=color |
Specify the base font's color |
(Internet Explorer) |
|
name=name |
Specify local font to be used for the base font |
(Internet Explorer) |
|
size=value |
Set the basefont size of 1 to 7 (required; default is 3) |
|
|
<bgsound> |
Define background audio for the document |
(Internet Explorer) |
|
loop=value |
Set the number of times to play the audio; value may be an integer or the value infinite |
(Internet Explorer) |
|
src=url |
Provide the URL of the audio file to be played |
(Internet Explorer) |
|
<big> ... </big> |
Format the enclosed text using a bigger typeface |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<blink> ... </blink> |
Cause the enclosed content to blink |
(Netscape) |
|
<blockquote> ... </blockquote> |
The enclosed text is a block quotation |
|
|
<body> ... </body> |
Delimit the beginning and end of the document body |
|
|
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 |
With value set to fixed, prevent the background image from scrolling with the document content |
(Internet Explorer) |
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
leftmargin=value |
Set the size, in pixels, of the document's left margin |
(Internet Explorer) |
|
link=color |
Set the color of unvisited hypertext links in the document |
|
|
onblur=applet |
Specify an applet to be run when the mouse leaves the document window |
(Netscape) (Internet Explorer) |
|
onfocus=applet |
Specify an applet to be run when the mouse enters the document window |
(Netscape) (Internet Explorer) |
|
onload=applet |
Specify an applet to be run when the document is loaded |
(Netscape) (Internet Explorer) |
|
onunload=applet |
Specify an applet to be run when the document is unloaded |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
text=color |
Set the color of regular text in the document |
|
|
topmargin=value |
Set the size, in pixels, of the document's top margin |
(Internet Explorer) |
|
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 |
|
|
clear=margin |
Break the flow and move downward until the desired margin, either left, right, none, or all, is clear |
|
|
<caption> ... </caption> |
Define a caption for a table |
|
|
align=position |
For Netscape, set the vertical position of the caption to either top or bottom. For Internet Explorer, set the horizontal alignment of the caption to either left, center, or right. |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
valign=position |
Set the vertical position of the caption to either top or bottom |
(Internet Explorer) |
|
<center> ... </center> |
Center the enclosed text |
|
|
<cite> ... </cite> |
The enclosed text is a citation |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<code> ... </code> |
The enclosed text is a code sample |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<col> |
Define a column within a <colgroup> |
(Internet Explorer) |
|
align=position |
Set the column alignment to left, center, or right |
(Internet Explorer) |
|
span=n |
Define the number of columns affected by this <col> tag |
(Internet Explorer) |
|
<colgroup> |
Define a column group within a table |
(Internet Explorer) |
|
align=position |
Set the horizontal alignment of text within the columns to either left, center, or right |
(Internet Explorer) |
|
class=name |
Specify a style class controlling the appearance of this tag |
(Internet Explorer) |
|
span=n |
Define the number of columns in the group |
(Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Internet Explorer) |
|
valign=position |
Set the vertical alignment of text within the columns to either top, middle, or bottom |
(Internet Explorer) |
|
width=n |
Set the width, in pixels or as a percentage, of each column in the group |
(Internet Explorer) |
|
<comment> ... </comment> |
Place a comment in the document. Comments will be visible in all other browsers. |
(Internet Explorer) |
|
<dd> ... </dd> |
Define the definition portion of an element in a definition list |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<dfn> ... </dfn> |
Format the enclosed text as a definition |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<dir> ... </dir> |
Create a directory list containing <li> tags |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
compact |
Make the list more compact if possible |
|
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
type=bullet |
Set the bullet style for this list to either circle, disc (default), or square |
(Netscape) (Internet Explorer) |
|
<div> ... </div> |
Create a division within a document |
|
|
align=type |
Align the text within the division to left, center, or right |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
lang=name |
Specify the language used for this division |
(Internet Explorer) |
|
nowrap |
Suppress word wrapping within this division |
(Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<dl> ... </dl> |
Create a definition list containing <dt> and <dd> tags |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
compact |
Make the list more compact if possible |
|
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<dt> ... </dt> |
Define the definition term portion of an element in a definition list |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<em> ... </em> |
Format the enclosed text with additional emphasis |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<embed> |
Embed an application in a document |
(Netscape) (Internet Explorer) |
|
align=position |
Align the applet area to either the top or bottom of the adjacent text, or to the left or right margin of the page, with subsequent text flowing around the applet |
(Netscape) |
|
border=n |
Specify the size, in pixels, of the border around the applet |
(Netscape) |
|
height=n |
Specify the height, in pixels, of the applet |
(Netscape) (Internet Explorer) |
|
hidden |
If present, hide the applet on the page |
(Netscape) (Internet Explorer) |
|
hspace=n |
Define, in pixels, additional space to be placed to the left and right of the applet |
(Netscape) |
|
name=name |
Provide a name for the applet |
(Netscape) (Internet Explorer) |
|
palette=value |
In Netscape, a value of foreground causes the applet to use the foreground palette in Windows only; background uses the background palette. In Internet Explorer, provides the foreground and background colors for the applet, specified as two color values separated by a vertical bar (|) |
(Netscape) (Internet Explorer) |
|
pluginspage=url |
Provides the URL of the page containing instructions for installing the plug-in associated with the applet |
(Netscape) |
|
src=url |
Supplies the URL of the data to be fed to the applet |
(Netscape) (Internet Explorer) |
|
type=type |
Specifies the MIME type of the plug-in to be used |
(Netscape) |
|
units=type |
Set the units for the height and width attributes to either pixels (the default) or en (half the text point size) |
(Netscape) (Internet Explorer) |
|
vspace=n |
Define, in pixels, additional space to be placed above and below the applet |
(Netscape) |
|
width=n |
Specify the width, in pixels, of the applet |
(Netscape) (Internet Explorer) |
|
<font> ... </font> |
Set the size or color of the enclosed text |
|
|
color=color |
Set the color of the enclosed text to the desired color |
|
|
face=list |
Set the typeface of the enclosed text to the first available font in the comma-separated list of font names |
(Netscape) (Internet Explorer) |
|
size=value |
Set the size to absolute size 1 to 7, or relative to the <basefont> size using +n or -n (required) |
|
|
<form> ... </form> |
Delimit a form |
|
|
action=url |
Specify the URL of the application that will process the form (required) |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
enctype=encoding |
Specify how the form element values will be encoded |
|
|
method=style |
Specify the parameter-passing style, either get or post (required) |
|
|
name=name |
Supply a name for this form for use by JavaScript |
(Netscape) |
|
onreset=applet |
Specify an applet to be run when the form is reset |
(Netscape) |
|
onsubmit=applet |
Specify an applet to be run when the form is submitted |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
target=name |
Specify the name of the frame or window to receive the results of the form after submission |
(Netscape) (Internet Explorer) |
|
<frame> ... </frame> |
Define a frame within a frameset |
(Netscape) (Internet Explorer) |
|
bordercolor=color |
Set the color of the frame's border to color |
(Netscape) |
|
frameborder=n |
If value is yes (Netscape only) or 1 (Netscape and Internet Explorer), enable frame borders. If value is no (Netscape only) or 0 (Netscape and Internet Explorer), disable frame borders. |
(Netscape) (Internet Explorer) |
|
marginheight=n |
Place n pixels of space above and below the frame contents |
(Netscape) (Internet Explorer) |
|
marginwidth=n |
Place n pixels of space to the left and right of the frame contents |
(Netscape) (Internet Explorer) |
|
name=name |
Define the name of the frame |
(Netscape) (Internet Explorer) |
|
noresize |
Disable user resizing of the frame |
(Netscape) (Internet Explorer) |
|
scrolling=type |
Always add scrollbars (yes), never add scrollbars (no), or for Netscape only, add scrollbars when needed (auto) |
(Netscape) (Internet Explorer) |
|
src=url |
Define the URL of the source document for this frame |
(Netscape) (Internet Explorer) |
|
<frameset> ... </frameset> |
Define a collection of frames or other framesets |
(Netscape) (Internet Explorer) |
|
border=n |
Set the thickness of the frame borders in this frameset |
(Netscape) |
|
bordercolor=color |
Define the color of the borders in this frameset |
(Netscape) |
|
cols=list |
Specify the number and width of frames within a frameset |
(Netscape) (Internet Explorer) |
|
frameborder=value |
If value is yes (Netscape only) or 1 (Netscape and Internet Explorer), enable frame borders. If value is no (Netscape only) or 0 (Netscape and Internet Explorer), disable frame borders. |
(Netscape) (Internet Explorer) |
|
framespacing=n |
Define the thickness of the frame borders in this frameset |
(Internet Explorer) |
|
onblur=applet |
Define an applet to be run when the mouse leaves this frameset |
(Netscape) |
|
onfocus=applet |
Define an applet to be run when the mouse enters this frameset |
(Netscape) |
|
onload=applet |
Define an applet to be run when this frameset is loaded |
(Netscape) |
|
onunload=applet |
Define an applet to be run when this frameset is removed from the display |
(Netscape) |
|
rows=list |
Specify the number and height of frames within a frameset |
(Netscape) (Internet Explorer) |
|
<hn> ... </hn> |
The enclosed text is a level n header; for level n from 1 to 6 |
|
|
align=type |
Specify the heading alignment as either left (default), center, or right |
|
|
class=name |
Specify a style class controlling the appearance of the heading |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<head> ... </head> |
Delimit the beginning and end of the document head |
|
|
<hr> |
Break the current text flow and insert a horizontal rule |
|
|
align=type |
Specify the rule alignment as either left, center (default), or right |
|
|
class=name |
Specify a style class controlling the appearance of the rule |
(Netscape) (Internet Explorer) |
|
color=color |
Define the color of the rule |
(Internet Explorer) |
|
noshade |
Do not use 3D shading to render the rule |
|
|
size=pixels |
Set the thickness of the rule to an integer number of pixels |
|
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
width=value or % |
Set the width of the rule to either an integer number of pixels or a percentage of the page width |
|
|
<html> ... </html> |
Delimit the beginning and end of the entire HyperText Markup Language document |
|
|
version=string |
Indicate the HTML version used to create this document |
|
|
<i> ... </i> |
Format the enclosed text in an italic typeface |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
<iframe> ... </iframe> |
Define an inline frame |
(Internet Explorer) |
|
align=position |
Set the position of the frame aligned to the top, center, or bottom of the surrounding text, or flush against the left or right margins with subsequent text flowing around the frame |
(Internet Explorer) |
|
frameborder=value |
If value is 1, enable frame borders. If value is 0, disable frame borders. |
(Internet Explorer) |
|
height=n |
Set the height, in pixels, of the frame |
(Internet Explorer) |
|
marginheight=n |
Place n pixels of space above and below the frame contents |
(Internet Explorer) |
|
marginwidth=n |
Place n pixels of space to the left and right of the frame contents |
(Internet Explorer) |
|
name=name |
Define the name of the frame |
(Internet Explorer) |
|
scrolling=type |
Always add scrollbars (yes) or never add scrollbars (no) |
(Internet Explorer) |
|
src=url |
Define the URL of the source document for this frame |
(Internet Explorer) |
|
width=n |
Set the width, in pixels, of the frame |
(Internet Explorer) |
|
<ilayer> ... </ilayer> |
Define an inline layer |
(Netscape) |
|
above=name |
Place this layer above the named layer |
(Netscape) |
|
background=url |
Specify a background image for the layer |
(Netscape) |
|
below=name |
Place this layer below the named layer |
(Netscape) |
|
bgcolor=color |
Specify the background color for the layer |
(Netscape) |
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) |
|
clip=edge |
Define the layer's clipping region, in pixels. If left and top are 0, they may be omitted |
(Netscape) |
|
left=n |
Define, in pixels, the position of the layer's left edge from the containing line of text |
(Netscape) |
|
name=name |
Provide a name for the layer |
(Netscape) |
|
src=url |
Supply the content of the layer from another document |
(Netscape) |
|
style=style |
Specify an inline style for this tag |
(Netscape) |
|
top=n |
Define, in pixels, the position of the layer's top edge from the containing line of text |
(Netscape) |
|
visibility=value |
Determine whether to show the layer, hide the layer, or inherit the visibility attribute from a containing layer |
(Netscape) |
|
width=n |
Define the width, in pixels, of the layer |
(Netscape) |
|
z-index=n |
Specify the layer's position in the stacking order |
(Netscape) |
|
<img> |
Insert an image into the current text flow |
|
|
align=type |
Align the image to either the top, middle, bottom (default), left, or right of the text in the line. For Netscape Navigator, additionally to the absmiddle, baseline, or absbottom of the text. |
|
|
alt=text |
Provide alternative text for non-image-capable browsers |
|
|
border=n |
Set the pixel thickness of the border around images contained within hyperlinks |
|
|
class=name |
Specify a style class controlling the appearance of this tag |
(Netscape) (Internet Explorer) |
|
controls |
Add playback controls for embedded video clips |
(Internet Explorer) |
|
dynsrc=url |
Specify the URL of a video clip to be displayed |
(Internet Explorer) |
|
height=n |
Specify the height of the image in scan lines |
|
|
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 |
Set the number of times to play the video; value may be an integer or the value infinite |
(Internet Explorer) |
|
lowsrc=url |
Specify a low-resolution image to be loaded by the browser first, followed by the image specified by the src attribute |
(Netscape) |
|
name=name |
Provide a name for the image for use by JavaScript |
(Netscape) |
|
onabort=applet |
Provide an applet to be run if the loading of the image is aborted |
(Netscape) |
|
onerror=applet |
Provide an applet to be run if the loading of the image is unsuccessful |
(Netscape) |
|
onload=applet |
Provide an applet to be run if the loading of the image is successful |
(Netscape) |
|
src=url |
Specify the source URL of the image to be displayed (required) |
|
|
start=start |
Specify when to play the video clip, either fileopen or mouseover |
(Internet Explorer) |
|
style=style |
Specify an inline style for this tag |
(Netscape) (Internet Explorer) |
|
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=button> |
Create a checkbox input element within a <form> |
(Netscape) (Internet Explorer) |
|
name=name |
Specify the name of the parameter to be passed to the form-processing application if the input element is selected (required) |
(Netscape) (Internet Explorer) |
|
notab |
Specifies that this element is not part of the tabbing order |
(Internet Explorer) |
|
onclick=applet |
Specify an applet to be run if |