Text Attribute Type


 

The Text 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 Text

  1. abbr:
    This is declared on the elements: th, td
  2. alt - #REQUIRED:
    This is declared on the elements: img, area
  3. alt:
    This is declared on the element: input type="image"
  4. label - #REQUIRED:
    This is declared on the element: optgroup
  5. label:
    This is declared on the element: option
  6. standby:
    This is declared on the element: object
  7. summary:
    This is declared on the element: table

Common Attributes with Type Text

From the Core Attribute Collection:
  1. title

Attribute Value for Type Text

Arbitrary user-visible text

The Text attribute type is very similar to the CDATA attribute type, with the only difference being that the Text type is assigned to attributes which hold information intended to be visible to the viewer of the document, whereas the CDATA type is concerned with the internals of the page.

Handling Invalid Characters

Within XHTML 1.1 attribute values:
  • Every less-than character (<) within an attribute value must be escaped as &lt; (or &#60;).
  • Every ampersand character (&) which does not denote the start of an entity or character reference (e.g. &lt;) must be escaped as &amp; (or &#38;).
  • Every double quote character (") must be escaped as &quot; (or &#34;) if using double quotes to delimit the attribute value
  • Every single quote character (') 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) > Text Attribute Type