Headings and Paragraphs

Almost all pages that you create will have headings and paragraphs.

Headings

Headings are the different sized section titles throughout a web page. Headings add structure to your web page by breaking it up so its easier for a user to read.

Making Headings

There are six different heading tags: <h1>, <h2>, <h3>, <h4>, <h5> and <h6>. The most common type of heading is <h1>. To use it, you put the text you want to display inside between the opening tag (<h1>) and closing tag (</h1>).

The code for a heading will look like <h1>My Heading Text</h1>.

Size of Headings

There are different sized headings which are marked by the number next to the h in the heading tag. They go from <h1> to <h6>.

Example Result

<h1>Shoulders</h1>
<h2>Knees</h2>
<h3>Toes</h3>

Paragraphs

Paragraphs group together sets of sentences and put some space between that group of text and the next group of text.

Making Paragraphs

Paragraphs are marked by opening(<p>) and closing(</p>) tags. To create more than one paragraph you will want multiple sets of opening and closing <p> tags. For example

<p>
    This is a paragraph.
</p>
<p>
    This is another paragraph.
</p>

W3 Schools Links

Found a bug in the documentation? Let us know at documentation@code.org