Blog

Learn how to structure text in HTML with headings, paragraphs, and formatting tags

Written by Mukesh Saini | 12 Dec, 2025 11:30:00 AM

Master text structure and formatting in HTML for readable web pages.

Headings in HTML

Headings define the hierarchy of content on a page:

  • <h1> Main page title
  • <h2> Section headings
  • <h3> Subsections
  • <h4>, <h5>, <h6> Smaller subsections

Welcome to My Website

About Me

Skills

Frontend Development

Best Practices:

  • Only one <h1> per page
  • Use headings in order (h1 → h2 → h3…)
  • Helps with SEO and accessibility

Paragraphs

The HTML <p> element defines a paragraph. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.

This is a paragraph introducing myself on the website.

HTML paragraphs automatically create space between lines.

Text Formatting Tags

HTML offers several tags for emphasis and meaning

Bold / Strong

Important text

Italics / Emphasis

Emphasized text Italic text

Inline Code / Monospace

console.log('Hello');

Line Breaks & Horizontal Rules


Combining Headings and Paragraphs

Example of a simple content section:

My Blog

Welcome to my blog where I share web development tips.

Latest Posts

Check out my latest articles about HTML, CSS, and JavaScript.

This creates a clear and readable structure for users and search engines.