<!DOCTYPE html> – declares HTML5.<html lang="en"> – language attribute (replace en with the appropriate code).<head> must contain:<meta charset="UTF-8"> – first meta tag.<title>…</title> – mandatory, appears in the browser tab and search results.<body> – contains the content layer elements.| Metatag | Attribute(s) | Purpose | Typical value |
|---|---|---|---|
| Charset | charset | Defines the character encoding used by the document. | UTF-8 |
| Keywords | name="keywords" content | Comma‑separated list of terms that describe the page (used by some search engines). | "ICT, web design, metatags" |
| Author | name="author" content | Identifies the creator of the page. | "Jane Smith" |
| Description | name="description" content | Short, human‑readable summary (shown in search‑engine snippets). Keep < 160 characters. | "An introduction to metatags for IGCSE ICT." |
| Viewport | name="viewport" content | Controls layout on mobile devices; essential for responsive design. | width=device-width, initial-scale=1.0 |
| X‑UA‑Compatible (optional) | http-equiv="X-UA-Compatible" content | Ensures Internet Explorer uses the latest rendering engine. | IE=edge |
| Robots (optional) | name="robots" content | Guides search‑engine crawling behaviour. | index,follow |
<head> section<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8"> <!-- 1️⃣ charset – first! -->
<title>My IGCSE ICT Project</title> <!-- mandatory title -->
<meta name="keywords" content="ICT, IGCSE, metatags, HTML">
<meta name="author" content="Alex Johnson">
<meta name="description" content="A student project demonstrating the use of metatags in HTML.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- optional -->
<meta name="robots" content="index,follow"> <!-- optional -->
<link rel="stylesheet" href="css/styles.css"> <!-- presentation layer -->
</head>
All of the following can appear inside the <body> of the page.
<body><header>
<h1 id="pageTitle">Metatag Demonstration</h1>
</header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
<main>
<section>
<h2>Simple Table</h2>
<table class="dataTable">
<thead>
<tr><th>Item</th><th>Quantity</th></tr>
</thead>
<tbody>
<tr><td>Pens</td><td>10</td></tr>
<tr><td>Notebooks</td><td>5</td></tr>
</tbody>
</table>
</section>
<section>
<h2>Image with proper
alttext</h2><img src="images/logo.png" alt="School logo – blue‑white emblem" width="150">
</section>
<section>
<h2>Styled box (presentation layer)</h2>
<div class="infoBox">
<p>This box is styled with the
.infoBoxclass instyles.css.</p></div>
</section>
</main>
<footer>
<p>© 2026 Alex Johnson. All rights reserved.</p>
</footer>
</body>
<h1>–<h6><p><ul>, <ol>, <li><a href="…"> (internal & external)<img src="…" alt="…"><table> with <thead>, <tbody>, <tr>, <th>, <td><header>, <nav>, <main>, <section>, <footer>Browser defaults → external stylesheet → internal <style> block → inline style; later rules override earlier ones when specificity is equal.
p { … }.highlight { … }#mainHeader { … }styles.css (including a table‑specific property).infoBox {border: 2px solid #0066cc;
padding: 10px;
background-color: #f0f8ff;
}
#pageTitle {
color: #003366;
text-align: center;
}
.dataTable {
width: 100%;
border-collapse: collapse; /* makes borders appear as a single line */
}
.dataTable th,
.dataTable td {
border: 1px solid #999;
padding: 6px;
text-align: left;
}
href="css/styles.css" or src="../images/logo.png".href="https://www.example.com/css/styles.css".alt text for every <img> – it is part of the accessibility criteria.description under 160 characters and avoid “keyword stuffing”.author tag if a different person makes a substantial edit.<!DOCTYPE html> and <html lang="…">.<title> element inside <head>.<meta charset="UTF-8"> as the first meta tag.<header>, <nav>, <main>, <section>, <footer>).<thead>).src and a meaningful alt attribute.<div> and style it via an external stylesheet.<meta charset="UTF-8"> first.<title> element.description under 160 characters.author tag when the page is substantially edited.<link rel="stylesheet">; prefer class selectors for reusable styles.alt text).Following these notes will ensure you meet all Cambridge IGCSE 0417 requirements for sections 20‑21, produce pages that are searchable, responsive, and accessible, and give you a solid foundation for the practical exam.
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.