DevPath · Learn to code ESPTEN

HTML: the structure of the web

Headings, paragraphs and lists

Headings

There are six levels, from <h1> (the most important, the page title) to <h6>. They define the hierarchy of the content:

<h1>Main title</h1>
<h2>A section</h2>
<h3>A subsection</h3>

Golden rule: only one <h1> per page and don't skip levels (don't jump from <h2> to <h4>). Screen readers and Google lean on this hierarchy to figure out what your page is about.

Paragraphs

Regular text goes in <p>:

<p>A paragraph of text.</p>
<p>Another, different paragraph.</p>

Lists

Each item goes in an <li> (list item):

<ul>
  <li>Apple</li>
  <li>Pear</li>
  <li>Grape</li>
</ul>
Put this into practice

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →
← What is HTML?Links and images →