JavaScript getElementsByTagName() Demo

First heading

This is the first paragraph.

Second heading

This is the second paragraph.

Third heading

This is the third paragraph.