New: Complete Beginner's Guide to Coding is now available in Premium
Updated: Indian Govt Exam roadmaps now include salary breakdowns & timelines
Tip: Use the Career Hub to explore all career paths in one place
Tutorials HTML HTML Headings & Paragraphs

HTML Headings & Paragraphs

HTML

HTML has 6 heading levels: <h1> (largest) to <h6> (smallest).

Paragraphs are defined with <p>. Line breaks use <br>.

Rules

  • Use only ONE <h1> per page (for SEO)
  • Headings should be in order: h1 → h2 → h3
  • Paragraphs automatically add space above and below
Example — HTML
<h1>Main Title</h1>
<h2>Section Title</h2>
<h3>Sub Section</h3>
<p>This is a paragraph of text.
It can span multiple lines.</p>
<p>This is another paragraph.</p>
Result

Main Title

Section Title

Sub Section

This is a paragraph of text. It can span multiple lines.

This is another paragraph.