HTML: Structure & Semantics

Build the skeleton of every web page — headings, paragraphs, lists, links and images — and learn why semantic tags matter for accessibility and SEO.

1. Why HTML is the foundation

Every web page — no matter how complex — is, at its core, an HTML document. HTML (HyperText Markup Language) describes the structure and meaning of content: “this is a heading”, “this is a paragraph”, “this is a list of three items”, “this is a link to another page”. The browser reads that structure and renders it.

HTML is not a programming language — there’s no logic or calculation. It’s a markup language: you wrap content in tags to give it meaning.

<h1>This is a top-level heading</h1>
<p>This is a paragraph of text.</p>

A tag usually comes in a pair: an opening tag <p> and a closing tag </p>. Whatever sits between them is the element’s content.

2. The document skeleton

Every page starts with the same boilerplate:

<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Shown in the browser tab</title>
  </head>
  <body>
    <!-- everything the user sees goes here -->
  </body>
</html>
  • <head> holds information about the page (title, character set, links to stylesheets) — none of it is shown in the page body.
  • <body> holds everything the user actually sees.

3. The essential content tags

Tag Meaning
<h1>–<h6> Headings, <h1> most important
<p> A paragraph
<ul> / <ol> Unordered (bulleted) / ordered (numbered) list
<li> A list item (inside <ul> or <ol>)
<a href="..."> A link (anchor)
<img src="..." alt="..."> An image
<strong> / <em> Important / emphasised text

4. Semantic HTML — meaning, not just boxes

You could build an entire page from <div> tags. But a <div> is meaningless — it’s a generic box. Semantic tags tell browsers, screen readers, and search engines what each region is:

<header>…site title and nav…</header>
<nav>…navigation links…</nav>
<main>
  <article>…a self-contained piece of content…</article>
</main>
<footer>…copyright, links…</footer>

This matters for accessibility (a screen-reader user can jump straight to <main>) and SEO (search engines understand your page better). Reach for a semantic element first; use <div> only when nothing else fits.

5. Build it yourself

Write a small, correctly structured page. The preview updates as you type — work through the tasks on the right, then hit Check my work.

A semantic article page
PREVIEW

Your tasks

  • ○Add a <header> containing an <h1> that reads 'Learn.GT Blog'
  • ○Add a <nav> with a link (<a>) whose text is 'Home'
  • ○The link must have an href attribute
  • ○Add a <main> containing an <article>
  • ○The article has an <h2> heading
  • ○The article has a <p> paragraph
  • ○The article has a <ul> with exactly 3 <li> items

6. What you learned

You just wrote a structurally correct, semantic web page — the foundation every site is built on. You used headings, paragraphs, lists and links, and you wrapped them in semantic regions (header, nav, main, article) that make the page accessible and search-friendly.

Next, we give this skeleton some skin: CSS, where you control colour, spacing and typography.

🧪 Want to practise this on your own computer? See how to set up your lab →

🤖

Need clarification? Ask GT

Hi, I'm GT — your AI tutor for HTML: Structure & Semantics. What would you like to know?
📝

Knowledge Check

1 of 3

Which element should wrap the main navigation links of a site?

Report a problem

About: /lessons/html-structure-and-semantics