HTML Element Reference

HTML Element Reference



!-- --

Description

Comments are ignored by the HTML parser. Text between the beginning of the comment <!-- and the end tag --> is not displayed in the browser window.

Syntax

<!-- -->

Remarks

Comments can contain other HTML elements. Comments do not nest.

Both the start and end tags are required.

See Also

COMMENT


!DOCTYPE

Description

Specifies the HTML DTD that the document corresponds to.

Syntax

<!DOCTYPE>

Remarks

Different versions can be used depending on the level of compatibility the author wishes to indicate. In the examples below, the first indicates compatibility with the HTML 3.2 DTD; the second indicates a strict adherence to the HTML 4.0 DTD.

Examples

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">


A

Description

Anchor elements designate the start or destination of a hypertext link. The Anchor element requires the HREF= or the NAME= attribute to be specified.

Syntax

<A
ACCESSKEY=key
CLASS=classname
DATAFLD=colname
DATASRC=#ID
HREF=url
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
METHODS=http-method
NAME=name
REL="stylesheet"
REV="stylesheet"
STYLE=css1-properties
TABINDEX=n
TARGET=window_name | _blank | _parent | _self | _top
TITLE=text
URN=urn
event = script
>

ParameterDescription
ACCESSKEY=key Specifies an accelerator for the element. Pressing alt-key selects this element in the user's browser.
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
DATAFLD=colname The column name from the data source object that supplies the bound data.
DATASRC=#ID Indicates the ID of the data source object that supplies the data that is bound to this element.
HREF=url Specifies the destination URL or anchor point. If HREF is set to an empty string ("") then hyperlinking will cause the base URL to be opened. For example if the current files is "http://microsoft.com/home/hello.html", then "http://microsoft.com/home/" will be opened.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
METHODS=http-method The METHODS attributes of anchors and links provide information about the functions that the user may perform on an object. These are more accurately given by the HTTP protocol when it is used, but it may, for similar reasons as for the TITLE attribute, be useful to include the information in advance in the link. For example, the HTML user agent may chose a different rendering as a function of the methods allowed; for example, something that is searchable may get a different icon.
NAME=name Specifies the name of the anchor.
REL="stylesheet" The REL attribute gives the relationship(s) described by the hypertext link from the anchor to the target. The value is a comma-separated list of relationship values. The values and their semantics will be registered by the HTML registration authority. The default relationship if none other is given is void. The REL attribute is only used when the HREF= attribute is present.
REV="stylesheet" The REV attribute is the same as the REL attribute, but the semantics of the link type are in the reverse direction. A link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". An anchor may have both REL and REV attributes.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TABINDEX=n Sets the tab order position for the object.
TARGET=window_name | _blank | _parent | _self | _top Specifies the window or frame to target the contents at. If no frame or window exists that matches the specified target, a new window is opened for the specified link. If no target is specified, the default is "_self" for a link within the same site or "_top" if the site is external. Special target values are listed below:
_blank Specifies to load the link into a new unnamed window.
_parent Specifies to load the link into the immediate parent of the document the link is in.
_self Specifies to load the link into the same window the link was clicked in.
_top Specifies to load the link into the full body of the current window.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
event Can be one or more of these events:
onblur onclick
ondblclick ondragstart
onfocus onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onselectstart

Remarks

Text and/or images may be within an anchor. To represent images that are anchors, a border in the visited or not visited color is displayed.

Both the start and end tags are required.

Example

<A HREF="http://www.microsoft.com">This is a link to Microsoft.</A>

<A HREF="home.htm">This is a link to a file called home.htm in the same
directory as this page.</A>

<A TARGET="viewer" HREF="sample.htm">Click here to load the link into
"viewer" window.</A>

Scripting Object

A


ACRONYM

Description

Indicates an acronym abbreviation.

Syntax

<ACRONYM
CLASS=classname
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
STYLE=css1-properties
TITLE=text
event = script
>

ParameterDescription
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
event Can be one or more of these events:
onclick ondblclick
ondragstart onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onselectstart

Remarks

Both the start and end tags are required.

Example

<ACRONYM>MSN</CITE>

Scripting Object

ACRONYM

See Also

ADDRESS, CITE, DFN, EM, STRONG


ADDRESS

Description

The Address element is used to specify information such as address, signature and authorship.

Syntax

<ADDRESS
CLASS=classname
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
STYLE=css1-properties
TITLE=text
event = script
>

ParameterDescription
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
event Can be one or more of these events:
onclick ondblclick
ondragstart onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onselectstart

Remarks

This element is a block element.

Both the start and end tags are required.

Example

<ADDRESS>This text will be in italic.</ADDRESS>

Scripting Object

ADDRESS

See Also

ACRONYM, CITE, DFN, EM, STRONG


APPLET

Description

Places executable content on the page.

Syntax

<APPLET
ALIGN=ABSBOTTOM | ABSMIDDLE | BASELINE | BOTTOM | LEFT | MIDDLE | RIGHT | TEXTTOP | TOP
ALT=text
CLASS=classname
CODE=filename
CODEBASE=url
DATAFLD=colname
DATASRC=#ID
HEIGHT=n
HSPACE=n
ID=value
NAME=name
SRC=url
STYLE=css1-properties
TITLE=text
VSPACE=n
WIDTH=n
event = script
>

ParameterDescription
ALIGN=ABSBOTTOM | ABSMIDDLE | BASELINE | BOTTOM | LEFT | MIDDLE | RIGHT | TEXTTOP | TOP Specifies the alignment for the control-like element.
ALT=text Optional text as an alternative to the application if it cannot be executed.
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
CODE=filename The name of the file containing the compiled Java class.
CODEBASE=url This is an optional parameter that specifies the base URL for the application.
DATAFLD=colname The column name from the data source object that supplies the bound data. This can only be used on the contained PARAM elements.
DATASRC=#ID Indicates the ID of the data source object that supplies the data that is bound to this element.
HEIGHT=n Along with WIDTH=, specifies the size at which the element is drawn. This attribute may be initially set in pixels or percentages.
HSPACE=n Along with VSPACE=, specifies margins for the element.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID names must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created and can only be referenced by ordinal position.
NAME=name Specifies the name of the application.
SRC=url Specifies a URL for the associated file.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
VSPACE=n Along with HSPACE=, specifies margins for the element.
WIDTH=n Along with HEIGHT=, specifies the size at which the element is drawn. This attribute may be initially set in pixels or percentages.
event Can be one or more of these events:
onafterupdate onbeforeupdate
onblur onclick
ondataavailable ondatasetchanged
ondatasetcomplete ondblclick
onerrorupdate ondragstart
onfocus onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onreadystatechange onresize
onrowenter onrowexit

Remarks

This element is a block element.

Both the start and end tags are required.

Scripting Object

APPLET

See Also

EMBED, OBJECT, PARAM


AREA

Description

Specifies the shape of a hyperlink "hot spot" in a client-side image map.

Syntax

<AREA
ALT=text
CLASS=classname
COORDS=coordinates
HREF=url
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
NOHREF
SHAPE=CIRC | CIRCLE | POLY | POLYGON | RECT | RECTANGLE
STYLE=css1-properties
TABINDEX=n
TARGET=window_name | _blank | _parent | _self | _top
TITLE=text
event = script
>

ParameterDescription
ALT=text Optional text as an alternative to the graphic for rendering in non-graphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
COORDS=coordinates Coordinates that define the hot spot's shape.
HREF=url Specifies the destination URL or anchor point.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
NOHREF Indicates that clicks in this region should cause no action.
SHAPE=CIRC | CIRCLE | POLY | POLYGON | RECT | RECTANGLE Specifies the type of shape used in the image map.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TABINDEX=n Sets the tab order position for the object.
TARGET=window_name | _blank | _parent | _self | _top Specifies the window or frame to target the contents at. If no frame or window exists that matches the specified target, a new window is opened for the specified link. If no target is specified, the default is "_self" for a link within the same site or "_top" if the site is external. Special target values are listed below:
_blank Specifies to load the link into a new unnamed window.
_parent Specifies to load the link into the immediate parent of the document the link is in.
_self Specifies to load the link into the same window the link was clicked in.
_top Specifies to load the link into the full body of the current window.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
event Can be one or more of these events:
onblur onclick
ondblclick ondragstart
onfocus onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onselectstart

Remarks

This is an empty element and does not require a closing tag.

Examples

<AREA SHAPE="RECT" COORDS="0, 0, 58, 31" HREF="http://www.microsoft.com/ie/">

<AREA TARGET="viewer" HREF="sample.htm" SHAPE="CIRCLE" COORDS="73, 15, 10">

<AREA SHAPE="RECT" COORDS="58, 0, 88, 31" NOHREF>

Scripting Object

AREA

See Also

MAP, IMG


B

Description

The Bold element specifies that the text should be rendered in boldface, where available. The end tag turns off the bold formatting.

Syntax

<B
CLASS=classname
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
STYLE=css1-properties
TITLE=text
event = script
>

ParameterDescription
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
event Can be one or more of these events:
onclick ondblclick
ondragstart onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onselectstart

Remarks

Both the start and end tags are required.

Example

<B>Displayed in a bold typeface.</B>

Scripting Object

B

See Also

STRONG

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.