AvailabilityDOM Level 1 Core Inherits from/OverridesNode CharacterData Text SubinterfacesCDATASection Methods
DescriptionA Text node represents a run of plain text in an HTML or XML document. Plain text appears within HTML and XML elements and attributes, and Text nodes typically appear as children of Element and Attr nodes. Text nodes inherit from CharacterData, and the textual content of a Text node is available through the data property inherited from CharacterData or through the nodeValue property inherited from Node. Text nodes may be manipulated using any of the methods inherited from CharacterData or with the splitText( ) method defined by the Text interface itself. Text nodes never have children. See Node.normalize( ) for a way to remove empty Text nodes and merge adjacent Text nodes from a subtree of a document. See AlsoCharacterData, Node.normalize( ) Returned byDocument.createTextNode( ), Text.splitText( ) |