Headings and Paragraphs
Headings
HTML provides 6 levels of headings, from <h1> (most important) to <h6> (least important).
<h1>Main Heading</h1>
<h2>Sub Heading</h2>
<h3>Section Heading</h3>
<h4>Minor Heading</h4>Paragraphs
Use the <p> tag to create paragraphs:
<p>This is a paragraph of text.</p>
<p>This is another paragraph.</p>💡 Tip
Use only ONE <h1> per page for SEO. Use <h2> for major sections and <h3> for subsections.
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Headings & Paragraphs</title>
</head>
<body>
<h1>The Solar System</h1>
<h2>Inner Planets</h2>
<p>Mercury is the closest planet to the Sun.</p>
<p>Venus is the hottest planet in our solar system.</p>
<h2>Outer Planets</h2>
<p>Jupiter is the largest planet.</p>
</body>
</html>
Lesson Nav
Course contents
HTML Course
0/7 lessons completed