HTML DOM Document normalize() method

Definition and usage

normalize() The method removes empty text nodes and connects adjacent text nodes.

See also:

Element normalize() method

Example

Normalize the document:

document.normalize();

Try it yourself

Syntax

document.normalize()

Parameters

None.

Return value

None.

Browser support

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

All web browsers support it:

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Stöd 9-11 Stöd Stöd Stöd Stöd