VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-normalize-method/

⇱ HTML DOM normalize() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM normalize() Method

Last Updated : 16 Jun, 2023

The normalize() method in HTML is used to merge the adjacent text nodes with the first text node and flush out the empty nodes. The normalize() method does not require any parameter.

Syntax:

node.normalize()

Example 1: In this example, we will use normalize() method.

Output:

👁 Image
 

Supported Browsers: The browser supported by DOM normalize() Method are listed below:

  • Google Chrome 1 and above
  • Edge 12 and above
  • Internet Explorer 9 and above
  • Firefox 1 and above
  • Opera 12.1 and above
  • Safari 1 and above
Comment