---
title: "headings"
url: https://weworkworldwide.com/tutorials/headings-2/
description: "'h' stands for Heading. There might be a time that you have an article inside your webpage and want to emphasize the title of that article. One way to do t"
date: 2026-09-23T17:00:04+00:00
source: https://weworkworldwide.com/llms.txt
---

# headings

``` line-numbers
```

‘h’ stands for Heading. There might be a time that you have an article inside your webpage and want to emphasize the title of that article. One way to do that is to use <h1-6> elements.

``` line-numbers
<h1> element puts the biggest attention to your headline and put a lot of attention towards the sentence within this element.
```

As we increase the number attached to heading elements like <h2> <h3> … <h6> the size and attention of the sentence go down.

Example:

Note: For the example below I have added another element called <p> which is used when we want to add a paragraph to a page and a little CSS for changing the width of each paragraph. For now don’t worry about the details of this element and the CSS style that I have added here and just focus on the <h1-6> elements. As we progress we will teach you how CSS and other elements work.

``` line-numbers
<!DOCTYPE html>
<html>
<title> Learning HTML is fun 🙂 </title>
<head>
<style type="text/css">
p{
width: 300px;
}
</style>
</head>
<body >
<h1>This is heading h1</h1>
<p>A simple paragraph is comprised of three major components. The first sentence, which is often a declarative sentence, is called the “topic sentence.” It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
<h2>This is heading h2</h2>
<p>A simple paragraph is comprised of three major components. The first sentence, which is often a declarative sentence, is called the “topic sentence.” It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
<h3>This is heading h3</h3>
<p>A simple paragraph is comprised of three major components. The first sentence, which is often a declarative sentence, is called the “topic sentence.” It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
<h4>This is heading h4</h4>
<p>A simple paragraph is comprised of three major components. The first sentence, which is often a declarative sentence, is called the “topic sentence.” It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
<h5>This is heading h5</h5>
<p>A simple paragraph is comprised of three major components. The first sentence, which is often a declarative sentence, is called the “topic sentence.” It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
<h6>This is heading h6</h6>
<p>A simple paragraph is comprised of three major components. The first sentence, which is often a declarative sentence, is called the “topic sentence.” It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
</body>
</html>
```

Output (remember you have to create a button that when clicked, run the result for the users)

As you can see the use of <h1> element makes the sentence within this element, way bigger than the sentence that is within the <h6> element.

So depending on how important the title of your document is, you can choose one of these elements to be used inside your page.

Note: there are other ways to change the size of a letter/ word/ sentence which we will show you in later sections.
