HTML basics: text, links, images and lists

Beginner  Nov 3, 2026

The handful of tags that make up most web pages.

HTML basics: text, links, images and lists
The steps of this tutorial at a glance.
The steps of this tutorial at a glance.

Headings and paragraphs

<h1>Main title (one per page)</h1>
<h2>Section title</h2>
<p>A paragraph of text with <strong>important</strong> and <em>emphasised</em> words.</p>
How the code in this section fits into the page.
How the code in this section fits into the page.

Links

<a href="about.html">About us</a>
<a href="https://example.com/" target="_blank" rel="noopener">External site</a>
<a href="#contact">Jump to the contact section</a>

Images

<img src="images/team.jpg" alt="Our team at the office" width="800" height="500">

The alt text is read by screen readers and shown if the image fails to load. Describe what the image shows. width and height stop the page from jumping while it loads.

Lists

<ul>
  <li>Bulleted item</li>
  <li>Another item</li>
</ul>

<ol>
  <li>First step</li>
  <li>Second step</li>
</ol>

Rules to remember

  • Use headings in order (h1, then h2, then h3). Do not choose a heading because of its size. Size is a CSS job.
  • Every tag that opens must close, and tags must nest correctly.
  • Use meaningful tags (nav, main, footer) instead of div everywhere.
The main points of this section.
The main points of this section.

More tutorials