THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML DOM normalize() Method

Element Object

Example

Normalize an element:

document.getElementById("demo").normalize();
Try it Yourself »

Definition and Usage

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


Browser Support

Method
normalize() Yes Yes Yes Yes Yes

Syntax

node.normalize()

Parameters

None

Technical Details

Return Value: No return value
DOM Version Core Level 2 Node Object

Related Pages

HTML DOM Reference: document.normalize()


Element Object