<button> - <dfn>
<button> (Form Button)
This element defines a nameable region known as a button, which can be used together with scripts.
Standard Syntax
<button
accesskey="key"
class="class name(s)"
dir="ltr | rtl"
disabled="disabled"
="unique alphanumeric entifier"
lang="language code"
name="button name"
style="style information"
tabindex="number"
title="advisory text"
type="button | reset | submit"
value="button value">
</button>
Attributes Defined by Internet Explorer
contenteditable="false | true | inherit" (5.5)
datafld="name of column supplying bound data" (4)
dataformatas="html | text" (4)
datasrc=" of data source object supplying data" (4)
hefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onafterupdate, onbeforeactivate, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onbeforeupdate, onblur, oncontextmenu,
oncontrolselect, oncut, ondeactivate, ondragenter, ondragleave, ondragover, ondrop,
onerrorupdate, onfilterchange, onfocus, onfocusin, onfocusout, onhelp,
onlosecapture, onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize, onresizeend,
onresizestart, onselectstart
Element-Specific Attributes
accesskey This attribute specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified key selects the anchor element correlated with that key.
datafld This Internet Explorer-specific attribute specifies the column name from the data source object that supplies the bound data that defines the information for the <button> tag's content.dataformatas This Internet Explorer-specific attribute indicates whether the bound data is plain text or HTML.datasrc This Internet Explorer-specific attribute indicates the of the data source object that supplies the data that is bound to the <button> tag.disabled This attribute is used to disable the button.name This attribute is used to define a name for the button so that it can be scripted by older browsers or used to prove a name for submit buttons when there is more than one in a page.tabindex This attribute uses a number to entify the object's position in the tabbing order.type This attribute defines the action of the button. Possible values include button, reset, and submit, which are used to indicate that the button is a plain button, form reset button, or form submission button, respectively. The XHTML specification suggests submit is the default, but browsers may not enforce this in practice.value Defines the value that is sent to the server when the button is clicked. This might be useful when using multiple submit buttons that perform different actions to indicate which button was pressed to the handling server-se program.
Examples
<button name="Submit"
value="Submit"
type="Submit">Submit Request</button>
<button type="button"
onclick="doSomething()">Click This Button</button>
<button type="button">
<img src="/image/library/english/10234_polkadot.gif" ></button>
Compatibility
HTML 4, 4.01XHTML 1.0, 1.1 | Internet Explorer 4, 5, 4.5, 5.5, 6Netscape 6, 7Opera 5-7 |
Notes
It is illegal to associate an image map with an <img> tag that appears as the content of a button element.
The HTML 4.01 specification reserves the data-binding attributes datafld, dataformatas, and datasrc for future use. They were dropped from XHTML but Internet Explorer does support them.
Developers may want to conser using the markup <input type="submit"> instead of a <button> tag for complete browser backward compatibility.
<caption> (Table Caption)
This element is used within the table element to define a caption.
Standard Syntax
<caption
align="bottom | left | right | top" (transitional only)
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</caption>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
hefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
valign="bottom | top" (4)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,
oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,
onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresizeend, onresizestart, onselectstart,
ontimeerror
Element-Specific Attributes
align This attribute specifies the alignment of the caption. HTML 4 defines bottom, left, right, and top as legal values. Internet Explorer also supports center. Because this does not prove the possibility to combine vertical and horizontal alignments, Microsoft has introduced the valign attribute for the caption element.valign This Internet Explorer-specific attribute specifies whether the table caption appears at the top or bottom. The default is top.
Example
<table>
<caption align="top">Our High-Priced Menu</caption>
<tr>
<td>Escargot</td>
<td>Filet Mignon</td>
<td>Big Mac</td>
</tr>
</table>
Compatibility
HTML 3.2, 4, 4.01XHTML 1.0, 1.1, Basic | Internet Explorer 4, 5, 5.5, 6Netscape 3, 4, 4.5-4.8, 6, 7Opera 4-7 |
Notes
There should be only one caption per table.
HTML 3.2 defines only the align attribute with values of bottom and top. No other attributes are defined prior to HTML 4.
<center> (Center Alignment)
This element causes the enclosed content to be centered within the margins currently in effect. Margins are either the default page margins or those imposed by overring elements, such as tables.
Standard Syntax (Transitional Only)
<center
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</center>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,
oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,
onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresizeend, onresizestart, onselectstart,
ontimeerror
Example
<center>This is in the center of the page.</center>
Compatibility
HTML 3.2, 4, 4.01 (transitional)XHTML 1.0 (transitional) | Internet Explorer 2, 3, 4, 5, 5.5, 6Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7Opera 4-7 |
Notes
The center element defined by the W3C is a shorthand notation for <div align="center">.
The strict versions of HTML and XHTML do not include the center element, but it is easily imitated with the text-align CSS property.
HTML 3.2 does not support any attributes for this element.
<cite> (Citation)
This element indicates a citation from a book or other published source and usually is rendered in italics by a browser.
Standard Syntax
<cite
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</cite>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,
oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,
onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresizeend, onresizestart, onselectstart,
ontimeerror
Example
This example is taken from <cite>HTML: The Complete Reference</cite>.
Compatibility
HTML 2, 3.2, 4, 4.01XHTML 1.0, 1.1, Basic | Internet Explorer 2, 3, 4, 5, 5.5, 6Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7Opera 4-7 |
Notes
HTML 2 and 3.2 do not indicate any attributes for this element.
<code> (Code Listing)
This element indicates that the enclosed text is source code in a programming language. Usually, it is rendered in a monospaced font.
Standard Syntax
<code
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</code>
Attributes Defined by Internet Explorer
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,
oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,
onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresizeend, onresizestart, onselectstart,
ontimeerror
Example
To increment a variable called count, use <code> count++ </code>
Compatibility
HTML 2, 3.2, 4, 4.01XHTML 1.0, 1.1, Basic | Internet Explorer 2, 3, 4, 5, 5.5, 6Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7Opera 4-7 |
Notes
This element is best used for short code fragments because it does not preserve white space.
HTML 2.0 and 3.2 do not support any attributes for this element.
Internet Explorer documentation does not list accesskey nor tabindex for this element, but it is likely an oversight regardless of the value of the attribute for generally nonfocusable elements.
<col> (Table Column)
This element defines a column within a table and is used for grouping and alignment purposes. It generally is found within a colgroup element.
Standard Syntax
<col
align="center | char | justify | left | right"
char="character"
charoff="number"
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
span="number"
style="style information"
title="advisory text"
valign="baseline | bottom | mdle | top"
wth="column wth specification" />
Attributes Defined by Internet Explorer
bgcolor="color name | #RRGGBB" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onlayoutcomplete, onreadystatechange
Element-Specific Attributes
align This attribute specifies horizontal alignment of a cell's contents.bgcolor This Internet Explorer-specific attribute sets the background color for the column. Its value can be either a browser-dependent named color or a color specified using the hexadecimal #RRGGBB format.char This attribute is used to set the character on which the cells in a column should be aligned. A typical value for this is a period (.) for aligning numbers or monetary values.charoff This attribute is used to indicate the number of characters by which the column data should be offset from the alignment characters specified by the char value.span When present, this attribute applies the attributes of the col element to additional consecutive columns.
valign This attribute specifies the vertical alignment of the text within the cell. Possible values for this attribute are baseline, bottom, mdle, and top.wth This attribute specifies a default wth for each column in the current column group. In addition to the standard pixel and percentage values, this attribute might take the special form 0*, which means that the wth of each column in the group should be the minimum wth necessary to hold the column's contents.
Example
<table border="1" wth="400">
<colgroup>
<col align="center" wth="150" />
<col align="right" />
<tr>
</colgroup>
<td>This column is aligned to the center.</td>
<td>This one is aligned to the right.</td>
</tr>
<tr><td>!</td><td>?</td></tr>
<tr><td>!</td><td>?</td></tr>
</table>
Compatibility
HTML 4, 4.01XHTML 1.0, 1.1 | Internet Explorer 4, 5, 5.5, 6Netscape 6, 7Opera 7 |
Notes
Under XHTML 1.0, <col> requires a trailing slash: <col />.
This element should appear within a colgroup element, and like that element, it is somewhat of a convenience feature used to set attributes with one or more table columns. In practice, few developers seem to use it.
<colgroup> (Table Column Group)
This element creates an explicit group of table columns to allow group level scripting or formatting.
Standard Syntax
<colgroup
align="center | char | justify | left | right"
char="character"
charoff="number"
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
span="number"
style="style information"
title="advisory text"
valign="baseline | bottom | mdle | top"
wth="column wth specification">
col elements only
</colgroup>
Attributes Defined by Internet Explorer
bgcolor="color name | #RRGGBB" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onreadystatechange
Element-Specific Attributes
align This attribute specifies horizontal alignment of the contents of the cells in the column group. The values of center, left, and right have obvious meanings. A value of justify for the attribute should attempt to justify all the column's contents. A value of char attempts to align the contents based on the value of the char attribute in conjunction with charoff.bgcolor This Internet Explorer-specific attribute sets the background color for the columns in the column group. Its value can be either a browser-dependent named color or a color specified using the hexadecimal #RRGGBB format. char This attribute is used to set the character on which the cells in a column should be aligned. A typical value for this attribute is a period (.) for aligning numbers or monetary values.charoff This attribute is used to indicate the number of characters by which the column data should be offset from the alignment characters specified by the char value.span When present, this attribute specifies the default number of columns in this group. Browsers should ignore this attribute if the current column group contains one or more <col> tags. The default value of this attribute is 1.valign This attribute specifies the vertical alignment of the contents of the cells within the column group.wth This attribute specifies a default wth for each column and its cells in the current column group. In addition to the standard pixel and percentage values, this attribute can take the special form 0*, which means that the wth of each column in the group should be the minimum wth necessary to hold the column's contents.
Examples
<colgroup span="2" align="char" char=":" valign="center">
<col /><col /><col />
</colgroup>
<colgroup style="background-color: green;">
<col align="left" />
<col align="center" />
</colgroup>
Compatibility
HTML 4, 4.01XHTML 1.0, 1.1 | Internet Explorer 4, 5, 5.5, 6Netscape 6, 7Opera 7 |
Notes
Each column group defined by a <colgroup> tag can contain zero or more <col> tags.
Under XHTML 1.0, the closing </colgroup> tag is mandatory.
<comment> (Comment Information)
This nonstandard element treats enclosed text as comments. This element should not be used.
Syntax Defined by Internet Explorer
<comment
data="URL" (6)
="unique alphanumeric entifier" (4)
lang="language code" (4)
title="advisory text"> (4)
</comment>
Events Defined by Internet Explorer
onpropertychange, onreadystatechange
Element-Specific Attributes
data References a URL that contains the comment information.
Example
<comment>This is not the proper way to form comments!!!</comment>
Compatibility
No standards | Internet Explorer 4, 5, 5.5, 6 |
Notes
It is better to use the <!--. . .--> syntax for specifying comments.
Because the comment element is not supported by all browsers, commented text done in this fashion will appear in other browsers.
<dd> (Definition in a Definition List)
This element indicates the definition of a term within a list of defined terms (<dt>) enclosed by a definition list (<dl>).
Standard Syntax
<dd
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</dd>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
nowrap="no | yes" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,
oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,
onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresizeend, onresizestart, onselectstart,
ontimeerror
Element-Specific Attributes
nowrap This Internet Explorer-specific attribute is used to control the wrapping of text within a <dd> tag. If set to yes, text should not wrap. The default is no. CSS rules should be used instead of this attribute.
Example
<dl>
<dt>DOG</dt>
<dd>A domesticated animal that craves attention all the time</dd>
<dt>CAT</dt>
<dd>An animal that would just as soon ignore you until it
gets hungry</dd>
</dl>
Compatibility
HTML 2, 3.2, 4, 4.01XHTML 1.0, 1.1, Basic | Internet Explorer 2, 3, 4, 5, 5.5, 6Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7Opera 4-7 |
Notes
Under HTML specifications, the closing tag for this element is optional, though it is encouraged when it will help make the list more understandable.
Under XHTML 1.0, the closing </dd> tag is mandatory.
This element occurs within a list of defined terms enclosed by a <dl> tag. Typically associated with it is the term it defines, indicated by the <dt> tag that precedes it.
HTML 2 and 3.2 define no attributes for this element.
<del> (Deleted Text)
This element is used to indicate that text has been deleted from a document. A browser might render deleted text as strikethrough text.
Standard Syntax
<del
cite="url"
class="class name(s)"
datetime="date"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</del>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onbeforeeditfocus, onblur, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onreadystatechange, onselectstart, ontimeerror
Element-Specific Attributes
cite The value of this attribute is a URL that designates a source document or message that might give a reason that the information was deleted.datetime This attribute is used to indicate the date and time the deletion was made. The value of the attribute is a date in a special format as defined by ISO 8601. The basic date format is
YYYY-MM-DDThh:mm:ssTZD
where the following is true:
YYYY=four-digit year such as 1999
MM=two-digit month (01=January, 02=February, and so on.)
DD=two-digit day of the month (01 through 31)
hh=two digit hour (00 to 23) (24-hour clock, not AM or PM)
mm=two digit minute (00 through 59)
ss=two digit second (00 through 59)
TZD=time zone designator
The time zone designator is either Z, which indicates Universal Time Coordinate or coordinated universal time format (UTC), or +hh:mm, which indicates that the time is a local time that is hh hours and mm minutes ahead of UTC. Alternatively, the format for the time zone designator could be -hh:mm, which indicates that the local time is behind UTC. Note that the letter "T" actually appears in the string, all digits must be used, and 00 values for minutes and seconds might be required. An example value for the datetime attribute might be 1999-10-6T09:15:00-05:00, which corresponds to October 6, 1999, 9:15 A.M., U.S. Eastern Standard Time.
Example
<del cite="http://www.bigcompany.com/changes/oct97"
datetime="1998-10-06T09:15:00-05:00">
The penalty clause applies to client lateness as well.
</del>
Compatibility
HTML 4, 4.01XHTML 1.0, 1.1 | Internet Explorer 4, 5, 5.5, 6Netscape 6, 7Opera 7 |
Notes
Browsers can render deleted (<del>) text in a different style to show the changes that have been made to the document. Internet Explorer renders the text as strikethrough text. Eventually, a browser could have a way to show a revision history on a document.
User agents that do not understand <del> or <ins> will show the information anyway, so there is no harm in adding information-only in deleting it. Because of the fact that <del>-enclosed text might show up, it might be wise to comment it out within the element, as shown here:
<del>
<!-- This is old information. -->
</del>
<dfn> (Definition)
This element encloses the defining instance of a term. It usually is rendered as bold or bold italic text.
Standard Syntax
<dfn
class="class name(s)"
dir="ltr | rtl"
="unique alphanumeric entifier"
lang="language code"
style="style information"
title="advisory text">
</dfn>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
Standard Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,
onkeypress, onkeydown, onkeyup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,
oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,
ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,
onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart,
onselectstart
Example
<p>An <dfn>elephant</dfn> is too large to make a viable pet for anyone
poorer than Bill Gates.</p>
Compatibility
HTML 2, 3.2, 4, 4.01XHTML 1.1, Basic | Internet Explorer 2, 3, 4, 5, 5.5, 6Netscape 6, 7Opera 4-7 |
Notes
HTML 2 and 3.2 defined no attributes for this element.