HTML DOM Document normalize() method

Definition and usage

normalize() The method deletes 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 feature of DOM Level 2 (2001).

All browsers support it:

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