HTML DOM Element normalize()

Example

Normalize an element:

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

Description

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


Syntax

node.normalize()

Parameters

NONE

Return Value

NONE

Browser Support

element.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.