Heading and Paragraphs

Paragraphs

<p> denotes a paragraph in HTML.

If you view the source code of this page, you would see that this sentence is a paragraph.

Example:
<p>This paragraph is denoted as such by tags at the start and end.</p>

Headings

HTML allows us up to six levels of heading on a page. The are as follows:

In order to ensure that our page makes sense, we need to ensure that headings are nested appropriately.

The first heading on a page should always be a heading 1 <h1>, and any subsequent heading should never be more than one level lower than its predecessor. See below for an example of correct usage:

<h1>My great page</h1>
<h2>Why my page is so great</h2>
<p>Lorem ipsum…</p>
<h3>Page greatness explained</h3>
<h4>Explanation part 1</h4>
<p>Lorem ipsum…</p>
<h4>Explanation part 2</h4>
<p>Lorem ipsum…</p>
<h2>Another second level heading</h2>
<p>Lorem ipsum…</p>

It is incorrect to jump heading levels, see below for incorrect example:

<h1>My great page</h1>
<h2>Why my page is so great</h2>
<!-- This next line is wrong, it should only be a h3, h2 or h1 -->
<h4>Greatness explained</h4>