Character Attribute Type


 

The Character Attribute Type is a data type defined by XHTML Modularisation 1.1, declared in the DTD as XML 1.0 type CDATA.
Reference: *W3C - XHTML Modularisation 1.1 - Attribute Types

Specific Attributes with Type Character

  1. accesskey:
    This is declared on the elements: a, area, label, input, textarea, button, legend
  2. char:
    This is declared on the elements: col, colgroup, thead, tfoot, tbody, tr, th, td

Common Attributes with Type Character

There are no Common Attributes with type Character.


Attribute Value for Type Character

A single ISO 10646 Character, e.g. "x"

Ref: *ISO 10646

The Character Attribute Type is used in the accesskey attributes of links and form controls as well as in the char attributes of table cells or groupings (although I do not know of any browser which supports the char attribute).

Handling Invalid Characters

If the character is
  • a less-than character (<) it must be escaped as &lt; (or &#60;).
  • an ampersand character (&) which does not denote the start of an entity or character reference (e.g. &lt;) it must be escaped as &amp; (or &#38;).
  • a double quote character (") it must be escaped as &quot; (or &#34;) if using double quotes to delimit the attribute value
  • a single quote character (') it must be escaped as &#39; if using single quotes to delimit the attribute value (alternatively &apos; may be used if compatibility with HTML isn't necessary - see Character Entities Predefined by XML 1.0)

Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > Data Types in XHTML 1.1 > Attribute Types (XHTML 1.1) > Character Attribute Type