Share via


XHTML Elements

Send Feedback

There are many elements in the XHTML language and many derivatives. This topic is designed to help understand which elements are supported in which derivative and within Internet Explorer Mobile.

In This Section

The table shows the possible elements available in some of the main variations on the HyperText Markup Language (HTML) theme. These include HTML, XHTML, CHTML, iHTML and WAP.

The XHTML column shows in which module the element is found.

The HTML column indicates at which version of HTML this element was initially supported.

cHTML is compact HTML and is a subset of HTML for small information devices such as Smartphones and Pocket PC. To accommodate the restrictions placed on such devices, it does not support tables, frames, style sheets and more than 2-color displays. It also assumes that the device will have limited interactive hardware, such as no keyboard or mouse.

iHTML is inline HTML and is a server side scripting language that works with HTML. This allows for dynamic customization of web sites.

XHTML is eXtensible HTML and is the integration of HTML 4.0 into an XML application. XHTML contains the initial building blocks for future HTML extensions. There are Basic and numbered variations of the language. The Basic set contains the minimal set of elements required for an XHTML document type. It has been modularized and where appropriate these nodules have been indicated. These modules include Text, Hypertext, Applet and Client-Side Image Maps.

WAP is the Wireless Application Protocol and is an open standard for applications that with to communicate with wireless devices, such as mobile phones. It is specifically designed to allow web sites to address the challenges of small portable devices.

The table also indicates which features are available to Pocket PC (PPC) and Smartphone (SP).

Element PPC SP XHTML Module HTML cHTML iHTML Req'd for XHTML Basic? Req'd for XHTML 2.0 Req'd for WAP 2.1 Req'd for HTML 4.01 Comments
! -- Yes Yes   2 Yes Yes No No No No  
! DOCTYPE Yes Yes   2 Yes No No No No No There is no difference in the way Internet Explorer Mobile handles HTML 3.2 vs. HTML 4.0 in this case. This is also the same as no DOCTYPE specified.
? xml-stylesheet Yes Yes   Yes No No No No Yes No For full details see the W3C Web site.
A Yes Yes Hypertext 2 Yes Yes Yes No No Yes Designates the start or destination of a hypertext link. The A element is an inline element and requires a closing tag.
A Yes Yes   4 Yes Yes Yes No No Yes Method of giving access/focus to an active HTML element using a keypad number. This feature is only supported on devices with an appropriate input method.
ABBR Yes Yes Text 4 No No Yes Yes No Yes  
ACRONYM Yes Yes   4 No No Yes Yes No Yes Renders its contents in italics. Used to specify information such as the address, signature and authorship for the document. ADDRESS is a block element and requires a closing tag.
ADDRESS Yes Yes Text 4 No No Yes Yes No Yes Renders its contents in italics. Used to specify information such as the address, signature and authorship for the document. ADDRESS is a block element and requires a closing tag.
APPLET Yes Yes Applet 3.2 No No No No No No This will be ignored by the browser unless a JVM is installed. This element is deprecated in HTML 4.0 in favor of <OBJECT>
AREA Yes Yes Client-Side Image Map 3.2 No No No No No Yes Defines the shape, coordinates, and associated URL of one hyperlink region within a client-side image MAP. The AREA element is not rendered and requires a closing tag.
B Yes Yes   2 No No No No No Yes Specifies that the text should be rendered in bold. The B element is an inline element and requires a closing tag.
BASE Yes Yes Base 2 Yes Yes Yes Yes No Yes Specifies an explicit URL used to resolve links and references to external source such as links and images. The BASE element does not require a closing tag
BASEFONT Yes Yes Legacy 3.2 No No No No No No Sets attributes of default font to be used when rendering text. This does not require a closing tag.
BGSOUND Yes Yes Legacy IE2 No No No No No No Enables a background sound to be played when the page is visited. BGSOUND does not require a closing tag.
BIG Yes Yes   3 No No No No Yes Yes Specifies that the enclosed text should be in a larger font than the current font. BIG is an inline element and requires a closing tag
BLOCKQUOTE Yes Yes Text 2 Yes Yes Yes Yes No Yes Sets apart a quotation in text. Text within the tag is indented. BLOCKQUOTE is a block element and requires a closing tag
BODY Yes Yes Structure 2 Yes Yes Yes Yes No Yes Denotes the beginning and end of the document body. BODY is a block element and requires a closing tag.
BR Yes Yes Text 2 Yes Yes Yes Yes No Yes Inserts a line break. This element does not require a closing tag.
CAPTION Yes Yes Tables 3 No No Yes Yes No Yes Specifies a brief description/caption for a table. The CAPTION element is a block element and requires a closing tag.
CENTER Yes Yes   3.2 Yes Yes No No No No Centers subsequent text and images. This element is a block element and requires a closing tag.
CITE Yes Yes Text 2 No No Yes Yes No Yes Specifies a citation. The enclosed text is rendered in italics. The CITE element is a block element and requires a closing tag.
CODE Yes Yes Text 2 No No Yes Yes No Yes Specifies a code sample. The enclosed text is rendered in a mono-spaced font. The CODE element is an inline element and requires a closing tag.
DD Yes Yes List 2 Yes Yes Yes Yes No Yes Indicates a definition in a definition list (DL). The definition is indented from the definition list. This element is a block element and does not require a closing tag.
DEL Yes Yes   4 No No No No No Yes  
DFN Yes Yes Text 3 No No Yes Yes No Yes Indicates the defining instance of a term. The enclosed text is rendered in italics. This element is an inline element and requires a closing tag.
DIR Yes Yes List 2 Yes Yes No No No No Denotes a directory list. The DIR element is a block element and requires a closing tag.
DIV Yes Yes Text 3 Yes Yes Yes Yes No Yes Specifies a container/division in the document. This is a block element and requires a closing tag.
DL Yes Yes List 2 Yes Yes Yes Yes No Yes Denotes a definition list. The DL element is a block element and requires a closing tag.
DT Yes Yes List 2 Yes Yes Yes Yes No Yes Denotes a definition term within a definition list (DL). The DT element is a block element and does not require a closing tag.
EM Yes Yes Text 2 No No Yes Yes No Yes Emphasizes text by rendering it in italics. The EM element is an inline element and requires a closing tag.
FONT Yes Yes Legacy 3 Yes Yes No No No No Specifies a new font, size, and color to be used for rendering the enclosed text. The FONT element requires a closing tag.
FORM Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Specifies that the contained controls are part of a form. The FORM element is a block element and requires a closing tag
FRAME Yes No Frames 4 No No No No No Yes Specifies an individual frame within a FRAMESET. FRAME is a block element and does not require a closing tag.
FRAMESET Yes No Frames 4 No No No No No Yes Specifies a frameset consisting of 1 or more frames. The FRAMESET element is a block element and requires a closing tag.
H1...H6 Yes Yes Text 2 Yes Yes Yes Yes No Yes Renders text in heading style. Use H1 through H6 to specify different sizes and styles of headings. The Hn element is a block element and requires a closing tag.
HEAD Yes Yes Structure 2 Yes Yes Yes Yes No Yes Provides an unordered collection of information about the document. The HEAD element requires a closing tag.
HR Yes Yes Text 2 Yes Yes No No No Yes Draws a horizontal rule. The HR element is a block element and does not require a closing tag.
HTML Yes Yes Structure 2 Yes Yes Yes Yes No Yes Identifies the document as containing HTML elements. The HTML element requires a closing tag.
I Yes Yes   2 No No No No No Yes Specifies that the enclosed text should be rendered in italics. The I element is an inline element and requires a closing tag.
IMG Yes Yes Image 2 Yes Yes Yes Yes No Yes Embeds an image in the document.
INPUT TYPE=button Yes Yes Basic Forms 4 No No No No No Yes Creates a button control. The input type=button element is an inline element and does not require a closing tag.
INPUT TYPE=checkbox Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Creates a checkbox control. The checkbox element is an inline element and does not require a closing tag.
INPUT TYPE=file Yes Yes   4 No No No No No No  
INPUT TYPE=hidden Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Used to transmit information about the client/server interaction. This control is not rendered but sends the name/value pair as defined by the attributes below. The hidden element does not require a closing tag.
INPUT TYPE=image Yes Yes Basic Forms 2 No No No No No Yes Creates an image control, when clicked, causes the form to be immediately submitted. The coordinates where the click are measured from the upper-left of the image and are submitted w/the form as two name/value pairs. The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended.
INPUT TYPE=password Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Creates a single-line text entry control similar to the text control, except that text is not displayed as the user enters it. The input type=password element is an inline element and does not require a closing tag.
INPUT TYPE=radio Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Creates a radio button control. The input type=radio element is an inline element and does not require a closing tag. Use a radio button control to limit a user's selection to a single value within a set of values. To do this, you must group each button in a set of radio buttons by assigning each button the same name. When a user submits a form, a selected radio button only generates a name/value pair in the form data if the button has a value.
Note: if a radio button is in a group and the button has no value, the button name is submitted without a value.
INPUT TYPE=reset Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Creates a button that, when clicked, resets the form's controls to their initial values. The reset element is an inline element and does not require a closing tag.
INPUT TYPE=submit Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Creates a button that, when clicked, submits the form. The input type=submit element is an inline element and does not require a closing tag.
INPUT TYPE=text Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Creates a single-line text entry control. The input type=text element is an inline element and does not require a closing tag.
Note: if the author places an INPUT without a TYPE attribute or with an invalid TYPE, Internet Explorer Mobile will treat it as an INPUT TYPE=text.
INS Yes Yes   4 No No No No No Yes  
KBD Yes Yes Text 2 No No Yes Yes No Yes Renders enclosed text in a fixed-width font. The KBD element is an inline element and requires a closing tag.
LABEL Yes Yes Basic Forms 4 No No Yes Yes No Yes  
LEGEND Yes Yes   4 No No No No No Yes LEGEND is not technically supported (you won't see any border, etc.) but the text in the legend will be displayed in boldface.
LI Yes Yes List 2 Yes Yes Yes Yes No Yes Denotes one item in a list. The LI element is an inline element and does not require a closing tag.
LINK Yes Yes Linking 4 No No Yes Yes No Yes  
LISTING Yes Yes   2 No No No No No No Visually and functionally works like PRE
MAP Yes Yes Client-Side Image Map 3.2 No No No No No Yes Defines a client side image map which contains one or more AREAs that specify hot zones on the associated image and bind these zones to URLs. The MAP element requires a closing tag.
MENU Yes Yes   2 Yes Yes No No No No Creates an unordered list of items (consisting of LI elements).
META Yes Yes Meta-information 2 Yes Yes Yes Yes No Yes Conveys hidden information to the server and the client. The META element does not require a closing tag.
NOFRAMES Yes Yes Frames 4 No No No No No Yes Contains HTML for browsers that do not support FRAMES. The NOFRAMES element is a block element and requires a closing tag.
NOSCRIPT Yes Yes Scripting 3.2 No No No No No Yes  
OBJECT Yes Yes Object Module 4 No No Yes Yes No Yes Inserts an ActiveX control onto the page. The OBJECT element is a block element and requires a closing tag.
OL Yes Yes List 2 Yes Yes Yes Yes No Yes Creates a numbered list consisting of LI elements.
OPTGROUP Yes Yes   4 No No No No Yes Yes Recurse into all siblings and show all options regardless of OPTGROUPing.
OPTION Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Denotes one choice in a SELECT element. The OPTION element does not require a closing tag.
P Yes Yes Text 2 Yes Yes Yes Yes No Yes Denotes a paragraph. The P element is a block element and does not require a closing tag.
PARAM Yes Yes Object 3.2 No No Yes Yes No Yes Sets the property value for a given OBJECT. This tag must be inside the associated OBJECT tag. The PARAM element does not require a closing tag.
PRE Yes Yes Text 2 Yes Yes Yes Yes No Yes Denotes preformatted text and renders it in a fixed pitch font. Spaces and carriage returns within the PRE tag are preserved. The PRE element is a block element and requires a closing tag.
Q Yes Yes   3.2 No No Yes Yes No Yes Sets apart quotation in text.
S Yes Yes   3 No No No No No Yes Renders text in strike-through type. The S element is an inline element and requires a closing tag.
SAMP Yes Yes Text 2 No No Yes Yes No Yes Denotes a code sample. Contents inside the tag are rendered in a fixed pitch font. The SAMP element is an inline element and requires a closing tag.
SCRIPT Yes Yes Scripting 4 No No No No No Yes Specifies a block containing script to be interpreted by the script engine.
SELECT Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Denotes a list box or drop-down list. The SELECT element is an inline element and requires a closing tag.
SMALL Yes Yes   3 No No No No Yes Yes Specifies that the enclosed text should be rendered in a smaller font.
SPAN Yes Yes Text 4 No No Yes Yes No Yes  
STRIKE Yes Yes   3.2 No No No No No Yes Renders enclosed text in strike-through type. The STRIKE element is an inline element and requires a closing tag.
STRONG Yes Yes Text 2 No No Yes Yes No Yes Renders enclosed text in boldface. The STRONG element is an inline element and requires a closing tag
STYLE Yes Yes Stylesheet 4 No No Yes Yes No Yes  
SUB Yes Yes Text 3 No No No No No Yes Specifies that the enclosed text should be displayed in subscript, using a smaller font than the current font. The SUB element is an inline element and requires a closing tag.
SUP Yes Yes Text 3 No No No No No Yes Specifies that the enclosed text should be displayed in superscript, using a smaller font than the current font. The SUP element is an inline element and requires a closing tag.
TABLE Yes Yes Tables 3 No No Yes Yes No Yes Specifies that the contained content is organized into a table with rows and columns. The TABLE element is a block element and requires a closing tag.
TBODY Yes Yes Tables 4 No No No No No Yes  
TD Yes Yes Tables 3 No No Yes Yes No Yes Specifies a cell in a table. The TD element is a block element and requires a closing tag.
TEXTAREA Yes Yes Basic Forms 2 Yes Yes Yes Yes No Yes Specifies a multi-line text input control. The TEXTAREA element is an inline element and requires a closing tag
TFOOT Yes Yes Tables 4 No No No No No Yes  
TH Yes Yes Tables 3 No No Yes Yes No Yes Specifies a header column of a table. Contents of the TH are centered within the cell and bold, unless overridden. The TH element is a block element and requires a closing tag. Note: this is almost the same as a TD except for the default formatting.
THEAD Yes Yes Tables 4 No No No No No Yes  
TITLE Yes Yes Structure 2 Yes Yes Yes Yes No Yes Contains the title of the document. The TITLE element is a block element and requires a closing tag.
TR Yes Yes Tables 3 No No Yes Yes No Yes Specifies a row in a table. The TR element is a block element and requires a closing tag.
TT Yes Yes   2 No No No No No Yes Renders text in a fixed pitch font. The TT element is an inline element and requires a closing tag.
U Yes Yes   3 No No No No No Yes Renders text that is underlined. The U element is an inline element and requires a closing tag.
UL Yes Yes List 2 Yes Yes Yes Yes No Yes Creates a bulleted list consisting of list items (LI). The UL element is a block element and requires a closing tag.
VAR Yes Yes Text 2 No No Yes Yes No Yes Renders enclosed text in italics. The VAR element is an inline element and requires a closing tag.
XML Yes Yes   IE5 No No No No No No Defines a XML data island.
XMP Yes Yes   2 No No No No No No Visually and functionally works like PRE

See Also

DOM Reference Guide

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.