DOM (Document Object Model)

The DOM is the browser's live, tree-shaped representation of an HTML page. Each element, attribute, and piece of text becomes a node that JavaScript can read…