XHTML Reference
Legend: Deprecated, Loose DTD, Frameset DTD
| Name | Related Elements | Type | Default | Depr. | DTD | Comment |
|---|---|---|---|---|---|---|
| abbr | td, th | %Text; | #IMPLIED | abbreviation for header cell | ||
| accept-charset | form | %Charsets; | #IMPLIED | list of supported charsets | ||
| accept | form, input | %ContentTypes; | #IMPLIED | list of MIME types for file upload | ||
| accesskey | a, area, button, input, label, legend, textarea | %Character; | #IMPLIED | accessibility key character | ||
| action | form | %URI; | #REQUIRED | server-side form handler | ||
| align | caption | %CAlign; | #IMPLIED | D | L | relative to table |
| align | applet, iframe, img, input, object | %IAlign; | #IMPLIED | D | L | vertical or horizontal alignment |
| align | legend | %LAlign; | #IMPLIED | D | L | relative to fieldset |
| align | table | %TAlign; | #IMPLIED | D | L | table position relative to window |
| align | hr | (left | center | right) | #IMPLIED | D | L | |
| align | div, h1, h2, h3, h4, h5, h6, p | (left | center | right | justify) | #IMPLIED | D | L | align, text alignment |
| align | col, colgroup, tbody, td, tfoot, th, thead, tr | (left | center | right | justify | char) | #IMPLIED | |||
| alink | body | %Color; | #IMPLIED | D | L | color of selected links |
| alt | applet | %Text; | #IMPLIED | D | L | short description |
| alt | area, img | %Text; | #REQUIRED | short description | ||
| alt | input | CDATA | #IMPLIED | short description | ||
| archive | applet | CDATA | #IMPLIED | D | L | comma-separated archive list |
| archive | object | CDATA | #IMPLIED | space-separated list of URIs | ||
| axis | td, th | CDATA | #IMPLIED | comma-separated list of related headers | ||
| background | body | %URI; | #IMPLIED | D | L | texture tile for document background |
| bgcolor | table | %Color; | #IMPLIED | D | L | background color for cells |
| bgcolor | tr | %Color; | #IMPLIED | D | L | background color for row |
| bgcolor | td, th | %Color; | #IMPLIED | D | L | cell background color |
| bgcolor | body | %Color; | #IMPLIED | D | L | document background color |
| border | table | %Pixels; | #IMPLIED | controls frame width around table | ||
| border | img, object | %Pixels; | #IMPLIED | D | L | link border width |
| cellpadding | table | %Length; | #IMPLIED | spacing within cells | ||
| cellspacing | table | %Length; | #IMPLIED | spacing between cells | ||
| char | col, colgroup, tbody, td, tfoot, th, thead, tr | %Character; | #IMPLIED | alignment char, e.g. char=':' | ||
| charoff | col, colgroup, tbody, td, tfoot, th, thead, tr | %Length; | #IMPLIED | offset for alignment char | ||
| charset | a, link, script | %Charset; | #IMPLIED | char encoding of linked resource | ||
| checked | input | (checked) | #IMPLIED | for radio buttons and check boxes | ||
| cite | blockquote, q | %URI; | #IMPLIED | URI for source document or msg | ||
| cite | del, ins | %URI; | #IMPLIED | info on reason for change | ||
| class | All elements but base, basefont, head, html, meta, param, script, style, title | CDATA | #IMPLIED | space-separated list of classes | ||
| classid | object | %URI; | #IMPLIED | identifies an implementation | ||
| clear | br | (left | all | right | none) | none | D | L | control of text flow |
| code | applet | CDATA | #IMPLIED | D | L | applet class file |
| codebase | object | %URI; | #IMPLIED | base URI for classid, data, archive | ||
| codebase | applet | %URI; | #IMPLIED | D | L | optional base URI for applet |
| codetype | object | %ContentType; | #IMPLIED | content type for code | ||
| color | basefont, font | %Color; | #IMPLIED | D | L | text color |
| cols | frameset | %MultiLengths; | #IMPLIED | F | list of lengths, default: 100% (1 col) | |
| cols | textarea | NUMBER | #REQUIRED | |||
| colspan | td, th | NUMBER | 1 | number of cols spanned by cell | ||
| compact | dir, dl, menu, ol, ul | (compact) | #IMPLIED | D | L | reduced interitem spacing |
| content | meta | CDATA | #REQUIRED | associated information | ||
| coords | area | %Coords; | #IMPLIED | comma-separated list of lengths | ||
| coords | a | %Coords; | #IMPLIED | for use with client-side image maps | ||
| data | object | %URI; | #IMPLIED | reference to object's data | ||
| datetime | del, ins | %Datetime; | #IMPLIED | date and time of change | ||
| declare | object | (declare) | #IMPLIED | declare but don't instantiate flag | ||
| defer | script | (defer) | #IMPLIED | UA may defer execution of script | ||
| dir | All elements but applet, base, basefont, bdo, br, frame, frameset, iframe, param, script | (ltr | rtl) | #IMPLIED | direction for weak/neutral text | ||
| dir | bdo | (ltr | rtl) | #REQUIRED | directionality | ||
| disabled | button, input, optgroup, option, select, textarea | (disabled) | #IMPLIED | unavailable in this context | ||
| enctype | form | %ContentType; | "application/x-www- form-urlencoded" | |||
| face | basefont, font | CDATA | #IMPLIED | D | L | comma-separated list of font names |
| for | label | IDREF | #IMPLIED | matches field ID value | ||
| frame | table | %TFrame; | #IMPLIED | which parts of frame to render | ||
| frameborder | frame, iframe | (1 | 0) | 1 | F | request frame borders? | |
| headers | td, th | IDREFS | #IMPLIED | list of id's for header cells | ||
| height | iframe | %Length; | #IMPLIED | L | frame height | |
| height | td, th | %Length; | #IMPLIED | D | L | height for cell |
| height | img, object | %Length; | #IMPLIED | override height | ||
| height | applet | %Length; | #REQUIRED | D | L | initial height |
| href | a, area, link | %URI; | #IMPLIED | URI for linked resource | ||
| href | base | %URI; | #IMPLIED | URI that acts as base URI | ||
| hreflang | a, link | %LanguageCode; | #IMPLIED | language code | ||
| hspace | applet, img, object | %Pixels; | #IMPLIED | D | L | horizontal gutter |
| http-equiv | meta | NAME | #IMPLIED | HTTP response header name | ||
| id | All elements but base, head, html, meta, script, style, title | ID | #IMPLIED | document-wide unique id | ||
| ismap | img, input | (ismap) | #IMPLIED | use server-side image map | ||
| label | option | %Text; | #IMPLIED | for use in hierarchical menus | ||
| label | optgroup | %Text; | #REQUIRED | for use in hierarchical menus | ||
| lang | All elements but applet, base, basefont, br, frame, frameset, iframe, param, script | %LanguageCode; | #IMPLIED | language code | ||
| language | script | CDATA | #IMPLIED | D | L | predefined script language name |
| link | body | %Color; | #IMPLIED | D | L | color of links |
| longdesc | img | %URI; | #IMPLIED | link to long description (complements alt) | ||
| longdesc | frame, iframe | %URI; | #IMPLIED | F | link to long description (complements title) | |
| marginheight | frame, iframe | %Pixels; | #IMPLIED | F | margin height in pixels | |
| marginwidth | frame, iframe | %Pixels; | #IMPLIED | F | margin widths in pixels | |
| maxlength | input | NUMBER | #IMPLIED | max chars for text fields | ||
| media | style | %MediaDesc; | #IMPLIED | designed for use with these media | ||
| media | link | %MediaDesc; | #IMPLIED | for rendering on these media | ||
| method | form | (GET | POST) | GET | HTTP method used to submit the form | ||
| multiple | select | (multiple) | #IMPLIED | default is single selection | ||
| name | button, textarea | CDATA | #IMPLIED | |||
| name | applet | CDATA | #IMPLIED | D | L | allows applets to find each other |
| name | select | CDATA | #IMPLIED | field name | ||
| name | form | CDATA | #IMPLIED | name of form for scripting | ||
| name | frame, iframe | CDATA | #IMPLIED | F | name of frame for targetting | |
| name | img | CDATA | #IMPLIED | name of image for scripting | ||
| name | a | CDATA | #IMPLIED | named link end | ||
| name | input, object | CDATA | #IMPLIED | submit as part of form | ||
| name | map | CDATA | #REQUIRED | for reference by usemap | ||
| name | param | CDATA | #REQUIRED | property name | ||
| name | meta | NAME | #IMPLIED | metainformation name | ||
| nohref | area | (nohref) | #IMPLIED | this region has no action | ||
| noresize | frame | (noresize) | #IMPLIED | F | allow users to resize frames? | |
| noshade | hr | (noshade) | #IMPLIED | D | L | |
| nowrap | td, th | (nowrap) | #IMPLIED | D | L | suppress word wrap |
| object | applet | CDATA | #IMPLIED | D | L | serialized applet file |
| onblur | a, area, button, input, label, select, textarea | %Script; | #IMPLIED | the element lost the focus | ||
| onchange | input, select, textarea | %Script; | #IMPLIED | the element value was changed | ||
| onclick | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer button was clicked | ||
| ondblclick | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer button was double clicked | ||
| onfocus | a, area, button, input, label, select, textarea | %Script; | #IMPLIED | the element got the focus | ||
| onkeydown | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a key was pressed down | ||
| onkeypress | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a key was pressed and released | ||
| onkeyup | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a key was released | ||
| onload | frameset | %Script; | #IMPLIED | F | all the frames have been loaded | |
| onload | body | %Script; | #IMPLIED | the document has been loaded | ||
| onmousedown | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer button was pressed down | ||
| onmousemove | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer was moved within | ||
| onmouseout | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer was moved away | ||
| onmouseover | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer was moved onto | ||
| onmouseup | All elements but applet, base, basefont, bdo, br, font, frame, frameset, head, html, iframe, isindex, meta, param, script, style, title | %Script; | #IMPLIED | a pointer button was released | ||
| onreset | form | %Script; | #IMPLIED | the form was reset | ||
| onselect | input, textarea | %Script; | #IMPLIED | some text was selected | ||
| onsubmit | form | %Script; | #IMPLIED | the form was submitted | ||
| onunload | frameset | %Script; | #IMPLIED | F | all the frames have been removed | |
| onunload | body | %Script; | #IMPLIED | the document has been removed | ||
| profile | head | %URI; | #IMPLIED | named dictionary of meta info | ||
| prompt | isindex | %Text; | #IMPLIED | D | L | prompt message |
| readonly | textarea | (readonly) | #IMPLIED | |||
| readonly | input | (readonly) | #IMPLIED | for text and passwd | ||
| rel | a, link | %LinkTypes; | #IMPLIED | forward link types | ||
| rev | a, link | %LinkTypes; | #IMPLIED | reverse link types | ||
| rows | frameset | %MultiLengths; | #IMPLIED | F | list of lengths, default: 100% (1 row) | |
| rows | textarea | NUMBER | #REQUIRED | |||
| rowspan | td, th | NUMBER | 1 | number of rows spanned by cell | ||
| rules | table | %TRules; | #IMPLIED | rulings between rows and cols | ||
| scheme | meta | CDATA | #IMPLIED | select form of content | ||
| scope | td, th | %Scope; | #IMPLIED | scope covered by header cells | ||
| scrolling | frame, iframe | (yes | no | auto) | auto | F | scrollbar or none | |
| selected | option | (selected) | #IMPLIED | |||
| shape | area | %Shape; | rect | controls interpretation of coords | ||
| shape | a | %Shape; | rect | for use with client-side image maps | ||
| size | hr | %Pixels; | #IMPLIED | D | L | |
| size | font | CDATA | #IMPLIED | D | L | [+|-]nn e.g. size="+1", size="4" |
| size | input | CDATA | #IMPLIED | specific to each type of field | ||
| size | basefont | CDATA | #REQUIRED | D | L | base font size for font elements |
| size | select | NUMBER | #IMPLIED | rows visible | ||
| span | col | NUMBER | 1 | col attributes affect N columns | ||
| span | colgroup | NUMBER | 1 | default number of columns in group | ||
| src | script | %URI; | #IMPLIED | URI for an external script | ||
| src | input | %URI; | #IMPLIED | for fields with images | ||
| src | frame, iframe | %URI; | #IMPLIED | F | source of frame content | |
| src | img | %URI; | #REQUIRED | URI of image to embed | ||
| standby | object | %Text; | #IMPLIED | message to show while loading | ||
| start | ol | NUMBER | #IMPLIED | D | L | starting sequence number |
| style | All elements but base, basefont, head, html, meta, param, script, style, title | %StyleSheet; | #IMPLIED | associated style info | ||
| summary | table | %Text; | #IMPLIED | purpose/structure for speech output | ||
| tabindex | a, area, button, input, object, select, textarea | NUMBER | #IMPLIED | position in tabbing order | ||
| target | a, area, base, form, link | %FrameTarget; | #IMPLIED | L | render in this frame | |
| text | body | %Color; | #IMPLIED | D | L | document text color |
| title | All elements but base, basefont, head, html, meta, param, script, title | %Text; | #IMPLIED | advisory title | ||
| type | a, link | %ContentType; | #IMPLIED | advisory content type | ||
| type | object | %ContentType; | #IMPLIED | content type for data | ||
| type | param | %ContentType; | #IMPLIED | content type for value when valuetype=ref | ||
| type | script | %ContentType; | #REQUIRED | content type of script language | ||
| type | style | %ContentType; | #REQUIRED | content type of style language | ||
| type | input | %InputType; | TEXT | what kind of widget is needed | ||
| type | li | %LIStyle; | #IMPLIED | D | L | list item style |
| type | ol | %OLStyle; | #IMPLIED | D | L | numbering style |
| type | ul | %ULStyle; | #IMPLIED | D | L | bullet style |
| type | button | (button | submit | reset) | submit | for use as form button | ||
| usemap | img, input, object | %URI; | #IMPLIED | use client-side image map | ||
| valign | col, colgroup, body, td, tfoot, th, Thead, tr | (top | middle | bottom | baseline) | #IMPLIED | vertical alignment in cells | ||
| value | input | CDATA | #IMPLIED | Specify for radio buttons and checkboxes | ||
| value | option | CDATA | #IMPLIED | defaults to element content | ||
| value | param | CDATA | #IMPLIED | property value | ||
| value | button | CDATA | #IMPLIED | sent to server when submitted | ||
| value | li | NUMBER | #IMPLIED | D | L | reset sequence number |
| valuetype | param | (DATA | REF | object) | DATA | How to interpret value | ||
| version | html | CDATA | %html.Version; | D | L | Constant |
| vlink | body | %Color; | #IMPLIED | D | L | color of visited links |
| vspace | applet, img, object | %Pixels; | #IMPLIED | D | L | vertical gutter |
| width | hr | %Length; | #IMPLIED | D | L | |
| width | iframe | %Length; | #IMPLIED | L | frame width | |
| width | img, object | %Length; | #IMPLIED | override width | ||
| width | table | %Length; | #IMPLIED | table width | ||
| width | td, th | %Length; | #IMPLIED | D | L | width for cell |
| width | applet | %Length; | #REQUIRED | D | L | initial width |
| width | col | %MultiLength; | #IMPLIED | column width specification | ||
| width | colgroup | %MultiLength; | #IMPLIED | default width for enclosed cols | ||
| width | pre | NUMBER | #IMPLIED | D | L | |
The above reference was taken from the HTML 4.01 Specification, W3C Recommendation.
Copyright © World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.


