Chapter 5 of 17 · HTML for Beginners — Complete Free Tutorial

Headings, Paragraphs & Text Formatting

Text is the heart of most web pages. This chapter covers the elements that structure headings and paragraphs, plus the inline tags that add emphasis — and, just as importantly, when not to use them.

Headings: <h1> to <h6>

HTML provides six heading levels. Think of them as an outline of a book, not as six different font sizes:

<h1>The complete guide to bread</h1>          <!-- Level 1: page topic -->
  <h2>Choosing flour</h2>                     <!-- Level 2: major section -->
    <h3>Whole wheat vs. refined</h3>          <!-- Level 3: subsection -->
    <h3>Storage tips</h3>
  <h2>Kneading techniques</h2>
    <h3>The stretch-and-fold method</h3>

Expected output: browsers render <h1> largest and <h6> smallest, with bold weight and vertical spacing around each.

Rules for a healthy heading hierarchy

  • Exactly one <h1> per page — it should match the page's main topic (and usually the title tag).
  • Never skip levels (do not jump from <h2> to <h4>) — screen reader users navigate by heading level, and crawlers use headings to understand content structure.
  • Never choose a heading for its size. Want small bold text? That is a job for CSS on a <p> or <span>.

Paragraphs: <p>

Each block of prose goes in its own <p>. Browsers add space before and after paragraphs automatically.

<p>Sourdough relies on a live starter culture instead of commercial yeast.</p>
<p>A well-kept starter can live for decades — some bakeries treasure theirs.</p>

Line breaks and thematic breaks

<p>Open daily<br>7 AM – 9 PM</p>      <!-- br = forced line break (rare) -->

<hr>                                    <!-- hr = thematic divider between sections -->

Use <br> only inside genuinely multi-line text such as an address or a poem — never to fake paragraph spacing.

Inline text semantics

These tags give words meaning, not just appearance:

TagMeaningTypical render
<strong>Strong importanceBold
<em>Emphasis that changes meaningItalic
<mark>Relevant/highlighted in contextYellow highlight
<small>Side comments, fine printSmaller text
<del>Removed contentStrikethrough
<ins>Inserted contentUnderlined
<sub> / <sup>Subscript / superscriptH2O, 102
<abbr title="Cascading Style Sheets">CSS</abbr>Abbreviation with full formSame text, tooltip on hover
<code>Inline computer codeMonospace
<blockquote> + <cite>Long quotation and its sourceIndented block
<p>Never store <strong>bananas</strong> in the fridge — the peel turns black.</p>
<p>The recipe <em>actually</em> gets faster with practice.</p>
<p>Today's deal: <del>₹400</del> <ins>₹299</ins></p>
<p>Results: <mark>3 of 4 tests passed</mark>.</p>

<blockquote cite="https://developer.mozilla.org">
  <p>HTML is the backbone of the web."</p>
  <footer>— <cite>MDN Web Docs</cite></footer>
</blockquote>

Real-life use case

A recipe page uses this exact pattern: one <h1> for the dish name, <h2> for Ingredients and Instructions, <h3> for each step group, <strong> for critical warnings ("do not skip resting the dough"), <del>/<ins> for price changes, and <mark> to highlight the step the reader is on.

Common mistakes

  • Multiple <h1>s — confuses both SEO and assistive technology.
  • Using <b> and <i> — they carry no meaning (purely visual). Reach for <strong>/<em> unless the text is truly merely bold/italic.
  • Empty paragraphs for spacing — use CSS margins instead.
  • Skipping heading levels for styling — never use <h4> just because it looks smaller.

Best practices

  • Write headings like a table of contents — someone scanning only the headings should understand your page.
  • Keep paragraphs short (2–4 sentences) for readability on phones.
  • Include your primary keyword naturally in the <h1> and one <h2>.

What's next?

Connect your pages with Links & Navigation, or add visuals with Images & Figures.

Quiz: Headings, Paragraphs & Text Formatting

5 questions · 70% to pass

Frequently Asked Questions

HTML (HyperText Markup Language) is the standard markup language that defines the structure and meaning of every web page. Learning HTML is the fastest way into web development: it is the foundation that CSS, JavaScript, and every framework build upon, and it directly affects SEO and accessibility.

Most beginners can build their first complete page in a day and become comfortable with the core tags within 1–2 weeks of daily practice. This 17-chapter series is designed to be completed in about 2–3 weeks at a relaxed pace, faster if you type out every example.

Only a plain text editor (VS Code is free and popular) and a web browser. No installation, no setup, no account — create a file called index.html, double-click it, and it opens in your browser.

HTML5 is the current generation of the HTML standard (published as the living standard by WHATWG). When people say "HTML5" they usually mean modern HTML: semantic elements like header, nav and article, native audio/video, canvas, and improved form input types — all covered in this tutorial.

No. HTML is a markup language — it describes content and structure but has no variables, loops, or conditionals. Those come with programming languages like JavaScript, which you would learn after HTML and CSS.

Right here: every chapter includes examples you can retype in your own index.html file, plus practice challenges. After this series, build small projects — a portfolio page, a recipe page, or a landing page for a local business — they exercise the same tags in real contexts.

Search engines crawl HTML first. Unique titles, a single clear h1, a logical heading hierarchy, descriptive alt text, valid markup, fast-loading responsive images, and a proper internal linking structure all come straight from HTML — see the HTML & SEO chapter for the full checklist.

Accessible HTML makes your site usable by everyone, including people who rely on screen readers or keyboards, and it is a legal requirement in many countries. The good news: proper labels, semantic elements, alt text, and keyboard-operable controls are mostly free HTML habits.

No — there are roughly 100 meaningful tags and you will naturally use about 30 of them regularly. Focus on understanding purpose and structure; editors and references (like MDN) handle the rest. This tutorial covers every tag beginners actually need.

CSS for visual design and layout, then JavaScript for interactivity, then a version control system (Git). With those three you can build complete websites; frameworks like React or Laravel Blade come after the fundamentals feel natural.