Headings and Paragraphs

Give your page a voice with titles and text

7 min read

Now that your page has a skeleton, it is time to put something inside it. The two most common elements on any web page are headings and paragraphs, and you are going to use them constantly while building your own site.

Headings

Headings are titles. HTML gives you six levels of heading, from <h1> down to <h6>. <h1> is the biggest and most important - usually the main title of the page. Each level after that is smaller and less important, like a title, then a subtitle, then a smaller section title.

<h1>My Website</h1>
<h2>About Me</h2>
<h3>My Hobbies</h3>

A good rule for beginners: use one <h1> per page for the main title, and then <h2> for the major sections underneath it. You can add <h3> for smaller sections inside those if you need to.

Paragraphs

Paragraphs hold your regular text - sentences and stories, not titles. You already saw the paragraph tag in lesson one:

<p>Hi, I am learning HTML and building my very first website right here.</p>

You can have as many paragraphs as you like, one after another. The browser automatically adds a little space between them, so you never need to add blank lines yourself to separate them visually.

<p>This is my first paragraph.</p>
<p>This is my second paragraph.</p>
A common beginner mistake is forgetting the closing tag, like typing <p> but never </p>. Browsers are forgiving and will often still show the text, but it is a good habit to always close what you open.

Putting it together

Here is what a tiny page might look like once you add headings and paragraphs inside the body from the last lesson:

<body>
<h1>Alex's Website</h1>
<p>Welcome! This is the very first page I have ever built.</p>
<h2>About Me</h2>
<p>I like drawing, hiking, and learning new things online.</p>
</body>

Notice how the heading levels create an outline of the page, almost like a table of contents, while the paragraphs carry the actual message. This is exactly the pattern you will use when you build your own personal page later in this course.

Try writing your own heading and a short paragraph about yourself in the starter code for this lesson. There is no wrong answer - this is your website, in your own words.

Quick check

Q1 Which heading tag is the biggest and most important?

Q2 What kind of content belongs inside a <p> tag?

Want to save your progress? It's free.

Create a free account