Be able to create generic external style sheets and inline style attributes covering:
border‑collapse, colour, thickness, visible/invisible)target and title attributes, email links, and download links.| Layer | Typical markup | Purpose |
|---|---|---|
| Content | <h1>…</h1>, <p>…</p>, <ul>, <table>, <form> | Structure and semantics – what the page is about. |
| Presentation | <link rel="stylesheet" href="css/style.css">, style="…" | How the page looks – colours, fonts, spacing, borders, shadows. |
| Behaviour | <a href="#top">Back to top</a>, target="_blank", title="…" | How the user interacts – navigation, opening new windows, email/download links. |
<head> SectionEvery IGCSE web page must contain the following meta‑tags (in this order) and a link to an external stylesheet.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Brief description of the page">
<!-- keywords tag is optional for the exam – you may omit it to save time -->
<meta name="author" content="Your Name">
<title>Page title – ICT 0417</title>
<link rel="stylesheet" href="css/style.css"> <!-- relative path – never an absolute URL for local files -->
</head>
C:\files\style.css or http://example.com/style.css) are not allowed for local resources in the IGCSE exam.<meta http-equiv="X-UA-Compatible"> is not required for IGCSE and should be omitted.Use the element that best describes the meaning of the content, not just its visual appearance.
| Element | Typical use |
|---|---|
<h1>–<h6> | Document headings, hierarchical structure |
<p> | Paragraph of text |
<ul> / <ol> / <li> | Unordered or ordered lists |
<blockquote> | Long quotations |
<figure> + <figcaption> | Images or diagrams with a caption |
<section> / <article> / <nav> | Logical page sections |
<header> | Introductory content (logo, site title, navigation) |
<footer> | Closing content (copyright, contact details) |
<main> | Primary content of the page (only one per page) |
<aside> | Related but separate content (sidebar, pull‑quote) |
<form> + form controls | Collecting user data – optional for 0417 but may appear in a task |
<a>) syntax<a href="https://www.example.com" target="_blank" title="Open example.com">Visit Example</a>
<a href="page2.html">Internal page</a>
<a href="mailto:student@example.com?subject=Question">Email teacher</a>
<a href="files/report.pdf" download>Download report</a>
<a href="#section3">Jump to Section 3</a>
<img src="images/logo.png" alt="School logo" width="120" height="80">
<video controls width="480">
<source src="media/intro.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
style="…") – overrides everything else.<style>…</style> in the <head>).<link rel="stylesheet">).| Selector | Specificity score | Example |
|---|---|---|
| Element selector | 0‑0‑1 | p { … } |
| Class selector | 0‑1‑0 | .intro { … } |
| ID selector | 1‑0‑0 | #header { … } |
| Inline style | 1‑0‑0‑0 (highest) | style="…" |
If two rules have the same specificity, the one that appears later in the cascade wins.
.button, .highlight).#mainNav).parent > child – direct child selector.prev + next – adjacent sibling selector.prev ~ siblings – general sibling selector.ancestor descendant – descendant selector (space).css/style.css)/* 1️⃣ Global page settings */
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.5;
margin: 0;
background-color: #fafafa;
}
/* 2️⃣ Reusable class for coloured boxes */
.box {
padding: 12px;
border: 1px solid #999;
background-color: #fff;
border-radius: 4px; /* optional rounded corners */
box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}
/* 3️⃣ ID for the page header */
#pageHeader {
background-color: #003366;
color: #ffffff;
text-align: center;
padding: 20px 0;
}
/* 4️⃣ Table styling – used by many tables */
.table-styled {
width: 100%;
border-collapse: collapse; /* clean grid */
border-spacing: 0; /* no extra space when collapse is off */
margin-bottom: 1rem;
}
.table-styled th,
.table-styled td {
border: 1px solid #666;
padding: 8px;
text-align: left;
}
.table-styled th {
background-color: #e0e0e0;
}
<link rel="stylesheet" href="css/style.css">
background-color – solid colour (hex, rgb, hsl, or colour name).background-image – url('images/bg.png').background-repeat – repeat, no-repeat, repeat-x, repeat-y.background-position – keywords (center, top left) or percentages.background-size – cover, contain, or explicit dimensions.background-attachment – scroll (default) or fixed.<div style="background-color:#e0e0e0;
background-image:url('pattern.png');
background-repeat:repeat;
background-position:center;
background-size:contain;
padding:10px;">
Content goes here
</div>
font-family – list of fallback fonts.font-size – absolute (px, pt) or relative (em, rem, %).font-weight – normal, bold, 100‑900.font-style – normal, italic, oblique.color – text colour.text-align – left, right, center, justify.line-height – spacing between lines.letter-spacing & word-spacing – optional fine‑tuning.<p style="font-family:'Times New Roman', serif;
font-size:14pt;
font-weight:bold;
color:#333333;
text-align:center;
line-height:1.6;">
This paragraph uses an inline font style.
</p>
Tables can be styled at four levels: <table>, <tr>, <th>, and <td>.
| Element | Common properties | Typical values / Example |
|---|---|---|
<table> | border, border-collapse, border-spacing, width, margin | border:2px solid #333; border-collapse:collapse; border-spacing:0; width:80%; |
<tr> | background‑color, height | background-color:#f9f9f9; |
<th> / <td> | padding, border, text‑align, vertical‑align, background‑color, width, height, border-radius | padding:8px; border:1px solid #999; text-align:center; vertical-align:middle; border-radius:3px; |
<table style="border:2px solid #333; border-collapse:collapse; border-spacing:0; width:80%;">
<thead>
<tr style="background-color:#f2f2f2;">
<th style="padding:8px; border:1px solid #999; text-align:center;">Header 1</th>
<th style="padding:8px; border:1px solid #999; text-align:center;">Header 2</th>
</tr>
</thead>
<tbody>
<tr style="background-color:#ffffff;">
<td style="padding:6px; border:1px solid #999; text-align:left; vertical-align:top;">Row 1, Cell 1</td>
<td style="padding:6px; border:1px solid #999; text-align:right; vertical-align:bottom;">Row 1, Cell 2</td>
</tr>
<tr style="background-color:#e9e9e9;">
<td style="padding:6px; border:1px solid #999; text-align:center;" colspan="2">Spanning Cell</td>
</tr>
</tbody>
</table>
<style> only if the question asks for a single‑page solution.<img> has a meaningful alt attribute.<header>, <footer>, <main>, <aside>) where appropriate.border‑collapse:collapse; and border‑spacing:0; together for a clean grid.border‑radius, box‑shadow) if the question asks for a “styled” look.index.html (or the name given in the question).style.css (or the name given) and stored in the folder referenced by the href.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.