--- url: "https://web.dev/learn/html/text-basics" titulek: "Text basics | web.dev" h1: "Text basics Stay organized with collections Save and categorize content based on your preferences." popis: "How to format text using HTML." jazyk: "en" kanonicka: "https://web.dev/learn/html/text-basics" drobecky: ["web.dev", "Resources", "HTML"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 00:54:44" znaku: 11114 slov: 1791 kodovani: "iso-8859-2" sha256: "1fc2984b9ab18b51ac44528dbb1dd7091d98f205af40c1723707ab2e47e69518" --- Text basics Stay organized with collections Save and categorize content based on your preferences. Similar to how your text editor provides `

` to `

` headings, along with a plethora of ways to format sections of text in meaningful and visual ways, HTML provides a very similar set of semantic and non-semantic elements to make meaning of prose. This section covers the main ways of marking up text, or text basics. We will then discuss attributes, before exploring additional ways of marking up text, such as lists, tables, and forms. Headings, revisited There are six section heading elements, `

`, `

`, `

`, `

`, `

`, and `
`, with `

` being most important and `

` the least. For many years, developers were told that headings were used by browsers to outline documents. That was originally a goal, but browsers never implemented document outlining features, and the proposed outline algorithm was officially removed from the HTML specification. However, screen reader users do rely heavily on headings as an exploration strategy to learn about the content of a page, navigating through headings with the `h` key. Ensuring that heading levels are implemented logically—as you would outline a document—makes your content accessible and is strongly recommended. By default, browsers style `

` the largest, `

` slightly smaller, with each subsequent heading level being smaller by default. Historically, user agent stylesheets also decremented the font size of `

` elements nested inside sectioning elements such as `
`, `