HTML DOM Document normalize()

Example

Normalize a document:

document.normalize();
Try it Yourself »

Description

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


Syntax

document.normalize()

Parameters

NONE

Return Value

NONE

Browser Support

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

It is fully supported in all browsers:

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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.