CharacterData (W3C DOM Core object)

Version Depr. Parent
DOM1 No Node
Browser support (more…)
IE5.5+ FF1.5+ SA1.3+ OP9+
Partial Full Full Full


<p>It is our light, not our darkness, that frightens us</p>

The example above shows a paragraph containing a single Text node. The text has a length of 52 characters, and contains the data It is our light, not our darkness, that frightens us.


The CharacterData interface provides a set of properties and methods for working with text content (referred to as character data) in the DOM. This interface doesn't represent any actual object, but is inherited by other interfaces which do — Text, Comment and CDATASection.

CharacterData nodes may be empty.


Internet Explorer Firefox Safari Opera
5.5 6.0 7.0 1.5 2.0 3.0 1.3 2.0 3.0 9.0 9.5
Partial Partial Partial Full Full Full Full Full Full Full Full

Internet Explorer 5.5 in HTML doesn't implement any of this interface's methods (but does implement them in XML).

Internet Explorer 6 and 7 don't inherit the normalize method from Node.

In this Section

User-contributed notes

Related Products