< Day Day Up > |
This element defines a nameable region known as a button, which can be used together with scripts.
<button accesskey="key" class="class name(s)" dir="ltr rtl" disabled="disabled" id="unique alphanumeric identifier" lang="language code" name="button name" style="style information" tabindex="number" title="advisory text" type="button reset submit" value="button value"> </button>
contenteditable="false true inherit" (5.5) datafld="name of column supplying bound data" (4) dataformatas="html text" (4) datasrc="id of data source object supplying data" (4) hidefocus="true false" (5.5) language="javascript jscript vbs vbscript" (4) unselectable="on off" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
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 id 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 provide a name for submit buttons when there is more than one in a page.
tabindex This attribute uses a number to identify 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-side program.
<button name="Submit" value="Submit" type="Submit"> Submit Request </button> <button type="button" onclick="doSomething()"> Click This Button </button> <button type="button"> <img src="polkadot.gif" alt="Polkadot"></button>
HTML 4, 4.01 | Internet Explorer 4, 5, 4.5, 5.5, 6 |
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 consider using the markup <input type="submit"> instead of a <button> tag for complete browser backward compatibility.
This element is used within the table element to define a caption.
<caption align="bottom left right top" (transitional only) class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </caption>
accesskey="key" (5.5) contenteditable="false true inherit" (5.5) hidefocus="true false" (5.5) language="javascript jscript vbs vbscript" (4) tabindex="number" (5.5) unselectable="on off" (5.5) valign="bottom top" (4)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
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 provide 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.
<table> <caption align="top"> Our High-Priced Menu </caption> <tr> <td> Escargot </td> <td> Filet Mignon </td> <td> Big Mac </td> </tr> </table>
HTML 3.2, 4, 4.01 | Internet Explorer 4, 5, 5.5, 6 |
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.
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 overriding elements, such as tables.
<center class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </center>
accesskey="key" (5.5) contenteditable="false true inherit" (5.5) disabled="false true" (5.5) hidefocus="true false" (5.5) language="javascript jscript vbs vbscript" (4) tabindex="number" (5.5) unselectable="on off" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
<center> This is in the center of the page. </center>
HTML 3.2, 4, 4.01 (transitional) | Internet Explorer 2, 3, 4, 5, 5.5, 6 |
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.
This element indicates a citation from a book or other published source and usually is rendered in italics by a browser.
<cite class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </cite>
accesskey="key" (5.5) contenteditable="false true inherit" (5.5) disabled="false true" (5.5) hidefocus="true false" (5.5) language="javascript jscript vbs vbscript" (4) tabindex="number" (5.5) unselectable="on off" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
This example is taken from <cite> HTML: The Complete Reference </cite>.
HTML 2, 3.2, 4, 4.01 | Internet Explorer 2, 3, 4, 5, 5.5, 6 |
HTML 2 and 3.2 do not indicate any attributes for this element.
This element indicates that the enclosed text is source code in a programming language. Usually, it is rendered in a monospaced font.
<code class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </code>
contenteditable="false true inherit" (5.5) disabled="false true" (5.5) language="javascript jscript vbs vbscript" (4) unselectable="on off" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
To increment a variable called count , use <code> count++ </code>
HTML 2, 3.2, 4, 4.01 | Internet Explorer 2, 3, 4, 5, 5.5, 6 |
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.
This element defines a column within a table and is used for grouping and alignment purposes. It generally is found within a colgroup element.
<col align="center char justify left right" char="character" charoff="number" class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" span="number" style="style information" title="advisory text" valign="baseline bottom middle top" width="column width specification" />
bgcolor="color name #RRGGBB" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
onlayoutcomplete, onreadystatechange
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 , middle , and top .
width This attribute specifies a default width 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 width of each column in the group should be the minimum width necessary to hold the column's contents.
<table border="1" width="400"> <colgroup> <col align="center" width="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>
HTML 4, 4.01 | Internet Explorer 4, 5, 5.5, 6 |
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.
This element creates an explicit group of table columns to allow group level scripting or formatting.
<colgroup align="center char justify left right" char="character" charoff="number" class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" span="number" style="style information" title="advisory text" valign="baseline bottom middle top" width="column width specification"> col elements only </colgroup>
bgcolor="color name #RRGGBB" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
onreadystatechange
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.
width This attribute specifies a default width 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 width of each column in the group should be the minimum width necessary to hold the column's contents.
<colgroup span="2" align="char" char=":" valign="center"> <col /><col /><col /> </colgroup> <colgroup style="background-color: green;"> <col align="left" /> <col align="center" /> </colgroup>
HTML 4, 4.01 | Internet Explorer 4, 5, 5.5, 6 |
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.
This nonstandard element treats enclosed text as comments. This element should not be used.
<comment data="URL" (6) id="unique alphanumeric identifier" (4) lang="language code" (4) title="advisory text"> (4) </comment>
onpropertychange, onreadystatechange
data References a URL that contains the comment information.
<comment> This is not the proper way to form comments!!! </comment>
No standards | Internet Explorer 4, 5, 5.5, 6 |
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.
This element indicates the definition of a term within a list of defined terms ( <dt> ) enclosed by a definition list ( <dl> ).
<dd class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </dd>
accesskey="key" (5.5) contenteditable="false true inherit" (5.5) disabled="false true" (5.5) hidefocus="true false" (5.5) language="javascript jscript vbs vbscript" (4) nowrap="no yes" (4) tabindex="number" (5.5) unselectable="on off" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
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.
<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>
HTML 2, 3.2, 4, 4.01 | Internet Explorer 2, 3, 4, 5, 5.5, 6 |
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.
This element is used to indicate that text has been deleted from a document. A browser might render deleted text as strikethrough text.
<del cite="url" class="class name(s)" datetime="date" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </del>
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)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
onbeforeeditfocus, onblur, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus, onreadystatechange, onselectstart, ontimeerror
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.
<del cite="http://www.bigcompany.com/changes/oct97.htm" datetime="1998-10-06T09:15:00-05:00"> The penalty clause applies to client lateness as well. </del>
HTML 4, 4.01 | Internet Explorer 4, 5, 5.5, 6 |
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>
This element encloses the defining instance of a term. It usually is rendered as bold or bold italic text.
<dfn class="class name(s)" dir="ltr rtl" id="unique alphanumeric identifier" lang="language code" style="style information" title="advisory text"> </dfn >
accesskey="key" (5.5) contenteditable="false true inherit" (5.5) disabled="false true" (5.5) hidefocus="true false" (5.5) language="javascript jscript vbs vbscript" (4) tabindex="number" (5.5) unselectable="on off" (5.5)
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
<p> An <dfn> elephant </dfn> is too large to make a viable pet for anyone poorer than Bill Gates. </p>
HTML 2, 3.2, 4, 4.01 | Internet Explorer 2, 3, 4, 5, 5.5, 6 |
HTML 2 and 3.2 defined no attributes for this element.
< Day Day Up > |