HTML DOM Element normalize() method

Definition and usage

normalize() Method to remove empty text nodes and connect adjacent text nodes.

See also:

Document normalize()

Example

Normalize the element:

document.getElementById("demo").normalize();

Try it yourself

Syntax

node.normalize()

Parameter

None.

Return value

None.

Browser support

element.normalize It is a DOM Level 2 (2001) feature.

All browsers fully support it:

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Support 9-11 Support Support Support Support