The 4 Main Document Elements

Everything is HTML is described through elements. This includes the larger structure of the main document.

person thinking to themselves

In this sub-topic, we'll build the basic structure of a single page, going step-by-step through the standard page elements. It is worthwhile to note that, usually, there is only one set of each of these elements per page, beginning with a <!DOCTYPE> declaration. We can even compare these elements to your own very structure.

Important The 4 elements every HTML page you'll make will need to have:

  1. The <!DOCTYPE> declaration.
  2. The <root> element.
  3. The <head> element.
  4. The <body> element.

html document elements structure