Chapter 2 — Text: The Heart of the Web
Every webpage begins with text. In this chapter, we explore every text‑level element HTML provides – from headings and paragraphs to links, lists, and advanced semantic components. By the end, you’ll have a complete vocabulary for marking up content with precision and meaning.
What’s Inside This Chapter
- Section 2.1 — Headings & Paragraphs
The fundamental building blocks of any document: heading tiers, paragraph containers, line breaks, and thematic breaks. - Section 2.2 — Links: The Anchor Element
The definitive guide to<a>: relative and absolute paths, directory traversal, fragment identifiers, email links, security attributes, and more. - Section 2.3 — Semantic vs. Visual‑Only Text Elements
Understanding the critical difference between elements that convey meaning (<strong>,<em>) and those that merely alter appearance (<b>,<i>). - Section 2.4 — Lists
Unordered, ordered, and description lists – plus nesting rules and thestart,reversed, andtypeattributes. - Section 2.5 — Advanced Semantic Text & Media Components
Quotations, citations, abbreviations, machine‑readable data, bidirectional text controls, and self‑contained figures with captions. - Section 2.6 — Code, Preformatted & Computer Output Elements
Technical documentation elements:<code>,<pre>,<kbd>,<samp>,<var>,<mark>,<sub>/<sup>,<wbr>, and<ruby>. - Section 2.7 — Character Escaping & Entities
How to safely display reserved characters using named entities, decimal, and hexadecimal references, including contextual escaping rules.
START READING
Turn the page to Section 2.1 and we’ll begin with the simplest – yet most important – elements in HTML: headings and paragraphs.