XHTML 1.1 Attributes
Common Attributes (Core + I18N + Event + Style)
- Core Attributes
-
- class NMTOKENS [white space delimited list of tokens that begin with a letter, and contain any number of letters, digits, hyphens, underscores, colons, and periods] OPTIONAL
- id NMTOKEN [must begin with a letter and may be followed by any number of letters, digits, hyphens, underscores, colons, and periods - ids must also be unique within a document] OPTIONAL
- title PCDATA [human readable text] OPTIONAL
- I18N Attributes
-
- dir "(ltr | rtl)"
- xml:lang NMTOKEN [Language Codes - if both a three letter code and a two letter code exist, the two letter code must be used (RFC 3066)] OPTIONAL (REQUIRED for html element)
I18n is the abbreviation for Internationalization and comes from the first letter, I, the last letter, n, and the fact that there are 18 letters in between.
- Event Attributes
-
- onclick Script [content that is to be processes by a scripting engine] OPTIONAL
- ondblclick Script [content that is to be processes by a scripting engine] OPTIONAL
- onmousedown Script [content that is to be processes by a scripting engine] OPTIONAL
- onmouseup Script [content that is to be processes by a scripting engine] OPTIONAL
- onmouseover Script [content that is to be processes by a scripting engine] OPTIONAL
- onmousemove Script [content that is to be processes by a scripting engine] OPTIONAL
- onmouseout Script [content that is to be processes by a scripting engine] OPTIONAL
- onkeypress Script [content that is to be processes by a scripting engine] OPTIONAL
- onkeydown Script [content that is to be processes by a scripting engine] OPTIONAL
- onkeyup Script [content that is to be processes by a scripting engine] OPTIONAL
- Style Attributes
-
- style The style attribute is deprecated. Inline style sheets should be avoided.
Tag(s) Specific Attributes
The following attributes are used by only an indivdual element or a specific group of elements:- HTML Element Attributes
-
- xmlns URI "(http://www.w3.org/1999/xhtml)" FIXED
- Head Element Attributes
-
- profile URI [The URI of the document's metadata profile, Dublin Core for example] OPTIONAL
- Hypertext Attributes
-
- accesskey Character [a single character] OPTIONAL
- charset Charset [name of the character set that is the target of the hyperlink] OPTIONAL
- href URI [the URI of the linked to resource] OPTIONAL
- hreflang LanguageCode [the Language Code of the target resource] OPTIONAL
- rel(relationship) LinkTypes - The type of resource that this link is pointing to "(Alternate | Stylesheet | Start | Next | Prev | Contents | Index | Glossary | Copyright | Chapter | Section | Subsection | Appendix | Help | Bookmark)" OPTIONAL
- rev(reverse link) LinkTypes - The type of resource that contained the link to this document. "(Alternate | Stylesheet | Start | Next | Prev | Contents | Index | Glossary | Copyright | Chapter | Section | Subsection | Appendix | Help | Bookmark)" OPTIONAL
- tabindex Number [one or more digits] OPTIONAL
- type ContentType [comma delimited list of media types(RFC2045)] or "(application | audio | image | message | model | multipart | text | video)" OPTIONAL
- Image Map Attributes
-
- accesskey Character [a single character] OPTIONAL
- alt Charset [name of the character set that is the target of the hyperlink] OPTIONAL
- href URI [the URI of the linked to resource] OPTIONAL
- nohref LanguageCode [the Language Code of the target resource] OPTIONAL
- coords(relationship) Coordinates - [comma delimited list of points]
- shape(reverse link) Shapes - "(rect | poly | circle | default)" OPTIONAL - defaults to 'rect'
- tabindex Number [one or more digits] OPTIONAL
- Edit Attributes
-
- cite URI [the URI of a resource that explains the change, if needed] OPTIONAL
- datetime DateTime [The date and/or time the change was made, must be properly formatted] OPTIONAL
- Form Attributes
-
- accept
- accept-charsets
- action
- enctype
- checked "(checked)" OPTIONAL
- maxlength Positive Integer OPTIONAL
- method
- onreset
- onsubmit
- name NMTOKEN [must begin with a letter and may be followed by any number of letters, digits, hyphens, underscores, colons, and periods - ids must also be unique within a document]
- size Positive Integer OPTIONAL
- src URI [the URI of a resource] only available when type has a value of image
- type Types - "( text | password | checkbox | radio | submit | reset | file | hidden | image )" OPTIONAL (Default is text)
- value Character Data
- Base Attributes
-
- href URI [the URI of the base(root) folder of a page collection] REQUIRED
- Table Attributes
-
- border Pixels
- cellpadding Length [pixels or percent]
- cellspacing Length [pixels or percent]
- frame void|above|below|hsides|lhs|rhs|vsides|box|border
- rules none|groups|rows|cols|all
- summary Text
- width Length [pixels or percent]