Attribute Data Types
Attributes contain different types of data such as URLs, text, numbers, etc. Below is a list of data type used in XHTML.
Character
- A single character from the document character set.
Charset
- A character encoding. For example,
UTF-8
or ISO-8859-1
. Charsets
- A space-separated list of character encodings.
ContentType
- A media type. For example,
text/css
or text/javascript
. ContentTypes
- A comma-separated list of media types.
Coords
- Comma separated list of coordinates to use in defining areas. For example:
0,0,118,28
. Datetime
- Date and time information in the ISO-8601 format. For example:
YYYY-MM-DDThh:mm:ss
. ID
- A document-unique identifier. For maximum compatability, this value should start with a letter from the English aphabet (A-Z or a-z) and then followed by either letters, numbers, dashes, underscores or periods.
IDReference
- A reference to a document-unique identifier.
LanguageCode
- A language code. For example,
fr
or en-gb
. Length
- The value may be either in pixels or a percentage of the available horizontal or vertical space. Thus, the value "50%" means half of the available space.
LinkTypes
- A predefined classification of hyperlinks. The following is a list of predefined values:
Alternate
, Stylesheet
, Start
, Next
, Prev
, Contents
, Index
, Glossary
, Copyright
, Chapter
, Section
, Subsection
, Appendix
, Help
and Bookmark
. These values are case-insensitive. MediaDescriptions
- A comma-separated list of media descriptors. The following is a list of recognized media descriptors:
screen
, tty
, tv
, projection
, handheld
, print
, braille
, aural
and all
. NameToken
- A name composed of letters, numbers, hypens, underscores or periods. The name should start with a letter or an underscore. For example:
heading-2
or _paragraph.text
. NameTokens
- One or more white space separated NameToken values.
Number
- One or more digits.
Pixels
- The value is an integer that represents the number of pixels of the canvas (screen, paper). Thus, the value "50" means fifty pixels.
Script
- Textual data representing script.
Text
- Arbitrary textual data, likely meant to be human-readable.
URI
- A Uniform Resource Identifier reference. URI can be an Internet address. For example:
http://xstandard.com/
or images/file.gif
. URI can also be an identification of a resouce without an Internet location. For example: urn:ISBN 88-7633-000-3
. URIs
- A space-separated list of URI values.