Best Division

Spread Your Knowledge

  • All topics
  • About us
  • Contact us
  • Privacy policy
  • Terms of service
  • Copyright
  • Facebook
  • Twitter
  • Instagram
  • Youtube
  • LinkedIn
  • Pinterest
  • Github
  • Tumblr

© 2026 Best Division

HTML Headings, Paragraphs and Text Formatting Tutorial

HTML

HTML headings, paragraphs and text formatting give a page its structure. Use <h1> to <h6> for the outline, <p> for blocks of text, and inline elements such as <strong> and <em> for meaning. This tutorial shows each element, when to use it, and which old formatting tags to avoid.

Search engines and screen readers read this structure, so correct markup helps both accessibility and SEO.

Table of Contents

  • Headings from h1 to h6
  • Paragraphs and line breaks
  • Emphasis and inline text elements
  • Quotes, preformatted text and lists
  • Obsolete tags to avoid
  • Frequently Asked Questions
    • How many h1 tags can a page have?
    • Why do my extra spaces disappear?
    • What is the difference between <strong> and <b>?
  • Summary

Headings from h1 to h6

HTML has six heading levels. <h1> is the top-level title and <h6> is the lowest. Treat them as an outline, not as a way to make text bigger.

html

Rules to follow:

  1. Use one <h1> per page, matching the main topic.
  2. Do not skip levels, for example <h2> followed directly by <h4>.
  3. Control size with CSS, not by picking a different heading level.

Paragraphs and line breaks

The <p> element holds a paragraph. The browser collapses extra spaces and line breaks in your source, so adding blank lines in the HTML does not add space on the page.

html

Use <br> only for line breaks that belong to the content, such as an address or a poem. For spacing between blocks, use CSS margins. Use <hr> for a thematic break between topics.

Emphasis and inline text elements

Choose elements by meaning.

ElementMeaningTypical rendering
<strong>Strong importanceBold
<em>Stress emphasisItalic
<mark>Highlighted for referenceYellow background
<code>Computer codeMonospace
<small>Side comments, fine printSmaller text
<sub> and <sup>Subscript and superscriptLowered or raised
<del> and <ins>Removed and added textStrikethrough, underline
html

<b> and <i> still exist for text that is styled without extra importance, such as a product name or a technical term, but <strong> and <em> are usually the better choice.

Quotes, preformatted text and lists

html

<pre> keeps whitespace and line breaks exactly as written, and nesting <code> inside it marks the content as code.

Obsolete tags to avoid

Several presentational tags were removed from modern HTML. Use CSS instead.

ObsoleteUse instead
<center>text-align: center or flexbox
<font>CSS font-family, color, font-size
<big>CSS font-size
<strike><del> or <s>
css

Frequently Asked Questions

How many h1 tags can a page have?

HTML allows more than one, but best practice is one <h1> that names the page, with <h2> to <h6> below it.

Why do my extra spaces disappear?

Browsers collapse whitespace. Use CSS for spacing, or <pre> when you need exact whitespace.

What is the difference between <strong> and <b>?

<strong> marks importance, and screen readers may stress it. <b> only draws attention without extra importance.

Summary

Use headings for a clear outline, paragraphs for text, and semantic inline elements for meaning. Style with CSS and avoid obsolete tags like <center> and <font>.

Share