The DOM
To discuss HTML and its constituents, we'll have to understand what the Document Object Model - or DOM - is.
In order to render an HTML page, browsers have to do their own implementation of the DOM.
Document Object Model
The DOM is a language-independent model made up of objects that represent the structure of a document. HTML is used to write such documents. It is tree-shape based, which means, its elements are organised in nodes - with these nodes being HTML elements or text.
Subsequently, these elements have types, attributes and children.
The image below illustrates what the DOM tree would look like. If you've experimented with HTML in the past, some of its elements will be familiar to you.