By the end of this lesson you will be able to:
<h1>, <h2>, <h3>, <p>, <i>).<div> and <span> correctly.Semantic tags describe the *meaning* of the content rather than just its appearance. This benefits:
| Layer | Purpose (exam‑relevant) | Typical Files |
|---|---|---|
Content (HTML) | Defines the meaning and structure of the page. | index.html, about.html |
Presentation (CSS) | Controls visual appearance – colours, fonts, layout. | css/style.css |
Behaviour (JavaScript) | Adds interactivity (not required for the IGCSE exam, but good to recognise). | js/script.js |
<head> Section – Content LayerThe <head> contains information that is *not* displayed on the page but is essential for browsers, search engines and examiners.
| Tag | Purpose (exam‑relevant) | Example |
|---|---|---|
<meta charset="UTF-8"> | Specifies character encoding – prevents garbled text. | <meta charset="UTF-8"> |
<meta name="description" content="…"> | Short summary for search engines (SEO). | <meta name="description" content="Simple IGCSE ICT example page"> |
<meta name="keywords" content="HTML, IGCSE, web authoring"> | Key words for search engines – optional but often examined. | <meta name="keywords" content="HTML, IGCSE, web authoring"> |
<meta name="author" content="Your Name"> | Identifies the page creator – useful for e‑safety records. | <meta name="author" content="Alex Taylor"> |
<meta name="viewport" content="width=device-width, initial-scale=1"> | Ensures the page scales correctly on mobile devices (responsive design). | <meta name="viewport" content="width=device-width, initial-scale=1"> |
<title>…</title> | Page title shown in the browser tab and search results. | <title>My First Web Page</title> |
<link rel="stylesheet" href="css/style.css"> | Links an external CSS file – separates presentation from content. | <link rel="stylesheet" href="css/style.css"> |
Even though the exam focuses on HTML, a short CSS snippet shows the link between the two layers.
/* css/style.css */body {
font-family: Arial, sans-serif;
line-height: 1.5;
margin: 20px;
}
h1 { color: #2A6EBB; }
h2, h3 { color: #2A6EBB; margin-top: 1.2em; }
p { margin-bottom: 1em; }
In the HTML file the stylesheet is attached with the <link> tag shown above.
JavaScript can add interactivity (e.g., form validation). For the IGCSE you only need to recognise that behaviour is *optional* and that a <script src="…"> element would belong in the <head> or just before </body>.
Headings create a hierarchy of importance. Only one <h1> should appear per page, and heading levels must not be skipped.
<h1>My First Web Page</h1><h2>Introduction</h2>
<h3>My Favourite Book</h3>
The <p> tag defines a block of text. Browsers automatically add vertical margins.
<p>Welcome to my website. Here you will find information about my hobbies and projects.</p>The <i> tag renders text in italics – commonly used for titles, foreign words or emphasis.
<p>The novel <i>Pride and Prejudice</i> was written by Jane Austen.</p><div>, <p>, headings).<span>, <i>, <a>).Example using <div> and <span>:
<div class="intro"><p>My name is <span class="highlight">Alex</span> and I love coding.</p>
</div>
Semantic tags give meaning to sections of a page and improve accessibility.
<header> – introductory content or navigation.<nav> – a set of navigation links.<section> – a thematic grouping of content.<article> – self‑contained composition (e.g., blog post).<footer> – closing information, copyright, contact details.Simple example:
<header><h1>My Portfolio</h1>
</header>
<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
</ul>
</nav>
<section id="about">
<h2>About Me</h2>
<p>…</p>
</section>
<footer>
<p>© 2026 Alex Taylor</p>
</footer>
<html lang="en">.alt text for every <img>.<h1>–<h6>) in proper order.<header>, <nav>, <section>, <footer>).rel="noopener" for security.<a> Tag| Link type | HTML | Key attribute(s) |
|---|---|---|
| External website | <a href="https://www.bbc.co.uk">BBC</a> | href |
| Internal page (anchor) | <a href="index.html#contact">Contact section</a> | href with #id |
| Email link | <a href="mailto:alex@example.com">Email me</a> | mailto: |
| Open in new tab (secure) | <a href="https://www.wikipedia.org" target="_blank" rel="noopener">Wikipedia</a> | target="_blank" + rel="noopener" |
<img> TagImages are empty elements (no closing tag). Always provide alt text for accessibility and e‑safety.
<img src="images/photo.jpg" alt="Student working on a laptop" width="300">src – path to the image file (use a folder such as images/).alt – concise description; essential for screen readers.width/height – optional, helps the browser reserve space.img { max-width: 100%; height: auto; }.Use tables only for data, never for layout.
<table><thead>
<tr>
<th>Day</th>
<th>Subject</th>
</tr>
</thead>
<tbody>
<tr>
<td>Monday</td>
<td>Mathematics</td>
</tr>
<tr>
<td>Tuesday</td>
<td>Science</td>
</tr>
</tbody>
</table>
<thead> and <tbody> improve accessibility and make validation easier.colspan or rowspan only when the data truly requires merged cells.| List type | Tag | When to use |
|---|---|---|
| Ordered list | <ol> | Steps, rankings, any sequence where order matters. |
| Unordered list | <ul> | Bulleted items, features, non‑sequential information. |
| Definition list | <dl> with <dt> (term) and <dd> (definition) | Glossaries or term‑definition pairs. |
Example of an ordered list:
<ol><li>Turn on the computer</li>
<li>Open the web browser</li>
<li>Navigate to the assignment page</li>
</ol>
Keeping files in logical folders reduces broken links and makes validation easier.
project-folder/│
├─ index.html
├─ about.html
│
├─ css/
│ └─ style.css
│
└─ images/
├─ photo.jpg
└─ logo.png
When linking, use relative paths (e.g., href="css/style.css" or src="images/photo.jpg").
<p> without </p>).<h1> elements.alt attributes on <img>.The example below demonstrates every tag covered in this lesson. It is fully valid HTML5 and would pass the W3C validator.
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Simple IGCSE ICT example page">
<meta name="keywords" content="HTML, IGCSE, web authoring">
<meta name="author" content="Alex Taylor">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My First Web Page</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<h1>My First Web Page</h1>
</header>
<nav>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#book">Favourite Book</a></li>
<li><a href="#links">Useful Links</a></li>
</ul>
</nav>
<section id="intro">
<h2>Introduction</h2>
<p>Welcome to my website. Here you will find information about my hobbies and projects.</p>
</section>
<section id="book">
<h3>My Favourite Book</h3>
<p>I enjoy reading <i>The Hobbit</i> by J.R.R. Tolkien.</p>
</section>
<section id="links">
<h3>Useful Links</h3>
<ul>
<li><a href="https://www.bbc.co.uk" target="_blank" rel="noopener">BBC</a></li>
<li><a href="mailto:alex@example.com">Email Alex</a></li>
</ul>
</section>
<section>
<h3>My Photo</h3>
<img src="images/photo.jpg" alt="Alex smiling while coding" width="300">
</section>
<section>
<h3>Weekly Timetable</h3>
<table>
<thead>
<tr><th>Day</th><th>Subject</th></tr>
</thead>
<tbody>
<tr><td>Monday</td><td>Mathematics</td></tr>
<tr><td>Tuesday</td><td>Science</td></tr>
</tbody>
</table>
</section>
<section>
<h3>Steps to Create This Page</h3>
<ol>
<li>Set up the <head> with meta‑tags and a title.</li>
<li>Add headings, paragraphs and italic text.</li>
<li>Insert a link, an image and a table.</li>
<li>Validate the page using the W3C validator.</li>
</ol>
</section>
<footer>
<p>© 2026 Alex Taylor</p>
</footer>
</body>
</html>
myprofile.html.<head> add the required meta‑tags (charset, description, keywords, author, viewport), a <title>, and link to css/style.css.<h1> containing your full name.<h2> titled “Biography”.<p>.<h3> called “Favourite Quote”.<i>.alt text.<h1> on a page.<h1> to <h3>).<img>).<p>, <div>) inside inline elements (<i>, <span>).alt text for images – a frequent mark loss in the exam.rel="noopener" when using target="_blank" (security requirement).href and src point to the right folder.| Skill | Demonstrated? | Comments |
|---|---|---|
Use of <h1> for main title | ||
Correct hierarchy of <h2> and <h3> | ||
Paragraphs created with <p> | ||
Italic text using <i> | ||
Block‑level <div> and inline <span> used appropriately | ||
| Meta‑tags (charset, description, keywords, author, viewport) present | ||
| External CSS linked correctly | ||
Images include meaningful alt text | ||
All links open correctly; external links use rel="noopener" | ||
| Page validates with no errors on W3C validator |
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.