HTML DOM createTextNode() Method (original) (raw)
Last Updated : 11 Jul, 2025
The **createTextNode() method is used to create a TextNode which contains an element node and a text node. It is used to provide text to an element. This method contains the text values as parameters which are of string type.
**Syntax:
document.createTextNode( text )
**Parameters: This method accepts single parameter _text which is mandatory. It is used to specify the text of the text node.
**Example: In this example, we will use **createTextNode() method
HTML `
DOM createTextNode() MethodGeeksForGeels
DOM createTextNode() Method
Submit`
**Output:

**Supported Browsers: The browser supported by **DOM createTextNode() Method are listed below: