HTML Text Elements: Headings, Paragraphs, Lists, Quotes, Code and Text Semantics Like strong, em, mark and time
Headings
h1 to h6 show the outline of the page. Use **one h1** for the main title and do not skip levels just to get a size.
html
<h1>Healthy Recipes</h1>
<h2>Breakfast</h2>
<h3>Oatmeal</h3>
<h2>Dinner</h2>
Size is CSS Choose a heading by its meaning, then change the size with CSS.
Paragraphs, Line Breaks and Rules
html
<p>This is a paragraph. Browsers add space before and after it.</p>
<p>Roses are red,<br>violets are blue.</p>
<hr>
br is a line break inside text. hr is a thematic break between topics.
Text Semantics
| Tag | Meaning | Looks like |
|---|---|---|
strong | Very important text | Bold |
em | Stress or emphasis | Italic |
mark | Highlighted for reference | Yellow highlight |
small | Side comments, fine print | Smaller text |
del and ins | Removed and added text | Strikethrough and underline |
sub and sup | Subscript and superscript | H2O and x2 |
abbr | Abbreviation with a title | Dotted underline |
time | A date or time a machine can read | Normal text |
code | A piece of computer code | Monospace |
html
<p>Please read the <strong>safety rules</strong> and <em>never</em> skip them.</p>
<p>Sale ends <time datetime="2026-12-31">31 December 2026</time>.</p>
<p><abbr title="HyperText Markup Language">HTML</abbr> uses the <code>p</code> tag for paragraphs.</p>
b and i
b and i are still valid for style only, such as a product name. Use strong and em when the meaning matters.
Quotes and Preformatted Text
html
<blockquote cite="https://example.com/speech">
<p>Simplicity is the ultimate sophistication.</p>
</blockquote>
<p>He said <q>learn by doing</q>.</p>
<pre>
Line one
Line two keeps its spaces
</pre>
Lists
html
<!-- Unordered: bullets -->
<ul>
<li>HTML</li>
<li>CSS</li>
</ul>
<!-- Ordered: numbers -->
<ol start="1" type="1">
<li>Open the editor</li>
<li>Write the code</li>
</ol>
<!-- Description list: terms and meanings -->
<dl>
<dt>HTML</dt>
<dd>Structure of a page</dd>
<dt>CSS</dt>
<dd>Style of a page</dd>
</dl>
Lists can be nested. Put the inner ul inside an li.
html
<ul>
<li>Fruits
<ul>
<li>Apple</li>
<li>Mango</li>
</ul>
</li>
</ul>
Practice
- Write a recipe page with a title, ingredient list and numbered steps
- Highlight one word with
markand add atimeelement - Add a blockquote with a source
Conclusion
Choose tags by meaning: headings for the outline, strong and em for importance, lists for groups, blockquote for quotes and pre for fixed spacing.
Quick Summary: Headings; paragraphs; text semantics; quotes and pre; lists.

