📄

Headings & Paragraphs

Beginner
50 XP
15 min
Lesson Content

Headings & Paragraphs

Headings show important titles or section names; paragraphs hold regular text. Think of a document: headings are chapter titles, paragraphs are the sentences inside.

Headings

Use <h1> to <h6> for headings. <h1> is the most important.

Paragraphs

Use <p> for blocks of text.

<h1>My Blog</h1>
<p>Welcome to my blog. Here I write about coding and projects.</p>
<h2>Today's Topic</h2>
<p>We will learn about headings and paragraphs.</p>
Example Code

Create a page with one main heading and two paragraphs.

<!DOCTYPE html>
<html>
  <head>
    <title>Headings Practice</title>
  </head>
  <body>
    <!-- Add an h1 heading here -->

    <!-- Add two paragraphs here -->

  </body>
</html>

Expected Output:

My Favorite Food
Study Tips
  • Read the theory content thoroughly before practicing
  • Review the example code to understand key concepts
  • Proceed to the Practice tab when you're ready to code