Solice UI
Back to the curriculum

Chapter 2 · HTML & Semantics

Documents and elements

HTML describes a document as nested elements. Each element gives a piece of content a role, allowing browsers, search tools, and assistive technology to understand the page before styling is applied.

Beginner · Lesson 1 of 6 in this chapter

Elements form a tree

Opening and closing tags usually surround content, and elements can contain other elements. This nesting creates parent, child, and sibling relationships that both CSS and JavaScript can use.

The document has a basic frame

A page declares its document type, then separates metadata in the head from visible content in the body. The title, language, and character encoding belong to this foundation.

Structuring a short article

  1. A main element contains the page's central content.
  2. An article contains a heading and paragraphs.
  3. Related links sit after the article instead of being mixed into its sentences.
  • HTML elements describe parts of a document.
  • Valid nesting makes structure predictable.
  • Start with meaningful structure before adding classes for appearance.