HTML DOM outerText Property
HTML DOM outerText Property
The outerText property is used to either set or return the text content of the specified node. It is very much similar to the outerHTML property but the main difference is that it will not return attributes and tags of the specified element.
Syntax:-
Its syntax is:- element.outerText OR node.outerText = text
Return:-
Its return is:- Text content of node with all of its descendants
Further Explanation:-
Value | Description |
text | The new Text content. |