docs.rodeo

MDN Web Docs mirror

Text

{{ApiRef("DOM")}} 

The Text interface represents a text {{domxref("Node", "node")}}  in a DOM tree.

{{InheritanceDiagram}} 

To understand what a text node is, consider the following document:

<html lang="en" class="e">
  <head>
    <title>Aliens?</title>
  </head>
  <body>
    Why yes.
  </body>
</html>

In that document, there are five text nodes, with the following contents:

Each of those text nodes is an object that has the properties and methods documented in this article.

Constructor

Instance properties

Inherits properties from its parents, {{domxref("CharacterData")}} , {{domxref("Node")}} , and {{domxref("EventTarget")}} .

Instance methods

Inherits methods from its parent, {{domxref("CharacterData")}} , {{domxref("Node")}} , and {{domxref("EventTarget")}} .

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN