By the end of this lesson students will be able to:
| Syllabus requirement | How the note meets it | Gap / Weakness | Actionable fix |
|---|---|---|---|
| 21 – Web‑development layers (content, presentation, behaviour) | Shows content (HTML) and presentation (CSS) layers; includes a “Web‑development layers” table. | Behaviour layer is omitted. | Add a concise “Behaviour layer” box that mentions JavaScript, why it is optional for this objective, and a simple commented‑out script example. |
| 21.2 – Create a web page (HTML content layer) | Provides a complete copy‑and‑paste HTML file, explains head/meta tags, links, images and bookmarks. | No coverage of semantic tags or accessibility attributes. | Insert a “Semantic HTML checklist” (5‑point) and a note on meaningful alt text/ARIA. |
| 21.3 – Use stylesheets (CSS presentation layer) | Shows external stylesheet linking, cascade‑order table and a simple rule. | Only element selectors are shown; no class/ID selectors, grouping or specificity detail. | Add a “CSS selector cheat‑sheet” and a short exercise styling a class and an ID. |
| 8.2 / 8.3 – e‑Safety & Data security | Discusses privacy risk of absolute paths exposing local directory structures. | No link to real‑world breach scenarios or Cambridge data‑protection principles. | Include a 2‑sentence case study and a “Before publishing” checklist. |
| 5.1 – Effects of using IT | Mentions productivity gains from using relative paths. | Could be richer with quantitative or anecdotal evidence. | Add a short “Real‑world impact” box with a school‑project example. |
| Syllabus Requirement | How the note meets it |
|---|---|
| 21 – Web development layers (content, presentation, behaviour) | All three layers are explicitly described and illustrated. |
| 21.2 – Create a web page (HTML content layer) | Provides a minimal, fully functional HTML file using semantic tags. |
| 21.3 – Use stylesheets (CSS) in the presentation layer | Step‑by‑step example of creating css/style.css, linking it with a relative path, and a selector cheat‑sheet. |
| 8.2 / 8.3 – e‑Safety & Data security | Explains privacy risks of absolute paths, includes a case study and a pre‑publish checklist. |
| 5.1 – Effects of using IT | Real‑world impact box quantifies time saved when moving a project. |
file:///C:/Users/John/Documents/site/index.htmlhttps://www.example.com/assets/css/style.cssimages/logo.png../scripts/app.js../../styles/main.cssfile://, https://).. for the current folder and .. to move up one level.images/photo.jpg – from current folder to a sub‑folder.../scripts/app.js – up one level, then into scripts.../../styles/main.css – up two levels, then into styles.Although the current learning outcome does not require scripting, students should recognise that JavaScript forms the behaviour layer of a web site. A simple, commented‑out script can illustrate the layer without affecting the assessment:
<!-- Behaviour layer (optional) --><script>
/* Uncomment to display a greeting
alert('Welcome to my site!');
*/</script>
Understanding that the behaviour layer exists helps learners see the three‑layer model (content, presentation, behaviour) and why path concepts apply to all external resources.
| Reason | Explanation |
|---|---|
| Portability | An absolute path ties the link to a specific drive letter or server address. Moving the folder to another computer or USB stick breaks the link. |
| Security & Privacy | Absolute paths reveal the full directory structure (e.g., C:/Users/John/Documents/…). If a project is uploaded, these details can expose personal information and aid path‑based attacks. |
| Collaboration | Team members rarely share identical folder structures. Relative paths ensure everyone can open the pages correctly. |
| Web publishing | When the site is uploaded, the server’s root is different. Relative paths automatically adjust; absolute paths would still point to the original local location. |
Emma uploaded a group project to the school’s learning‑management system. The HTML pages used absolute paths such as file:///C:/Users/Emma/Documents/Project/images/logo.png. After publishing, visitors could see the C:/Users/Emma folder name, inadvertently revealing Emma’s home‑directory structure. The teacher asked the group to replace every absolute path with a relative one before re‑uploading, thereby protecting personal data and complying with Cambridge data‑protection principles.
website/│
├─ index.html
├─ about.html
├─ images/
│ └─ logo.png
└─ css/
└─ style.css
about.html to the logo imagefile:///C:/Users/John/website/images/logo.pngimages/logo.pngUsing meaningful tags improves accessibility, SEO and aligns with good ICT practice.
<header>.<nav>.<section> or <article>.<footer>.alt attributes that describe the image purpose (e.g., alt="School logo").| Selector type | Syntax | Example |
|---|---|---|
| Element (type) selector | h1 { … } | All <h1> elements |
| Class selector | .note { … } | <p class="note">…</p> |
| ID selector | #mainHeader { … } | <h1 id="mainHeader">…</h1> |
| Descendant selector | nav a { … } | All links inside a <nav> |
| Group selector | h1, h2, .title { … } | Applies to several selectors at once |
<p class="note">Important note</p> inside index.html.<h1 id="mainHeader">Welcome</h1> to the same page.css/style.css write:.note { background:#fffbcc; padding:5px; }#mainHeader { colour:#0066cc; }
css inside website.css create style.css with the following rules:/* Presentation layer – external stylesheet */body { font-family: Arial, sans-serif; line-height: 1.5; }
h1 { colour:#0066cc; }
.note { background:#fffbcc; padding:5px; }
#mainHeader { colour:#0066cc; }
index.html (or any HTML page) and add the link in the <head> section using a relative path:<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Page</title>
<!-- Relative link to the external stylesheet -->
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<h1 id="mainHeader">Welcome to My Site</h1>
</header>
<nav>
<a href="about.html">About</a>
</nav>
<section>
<p class="note">This paragraph is highlighted using a class selector.</p>
<img src="images/logo.png" alt="School logo">
</section>
<footer>
<p>© 2026 My School</p>
</footer>
</body>
</html>
https://example.com/css/style.css, the page will still work online but will break when the folder is moved offline or when the internet connection is unavailable.Copy the block below into a notebook, save as index.html inside the website folder, and test it.
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>Sample Page</title>
<link rel="stylesheet" href="css/style.css"> <!-- relative path -->
</head>
<body>
<header>
<h1 id="mainHeader">Sample Heading</h1>
</header>
<nav>
<a href="about.html">Go to About page</a>
</nav>
<section>
<p>This paragraph demonstrates a basic HTML page.</p>
<p class="note">Note: this uses a class selector for styling.</p>
<img src="images/logo.png" alt="School logo">
</section>
<footer>
<p>© 2026 My School</p>
</footer>
</body>
</html>
Move the whole website folder to a different location or another computer; all links continue to work because they are relative.
| Source | Specificity | Example |
|---|---|---|
| Inline style | Highest | <h1 style="color:red;">Title</h1> |
| Embedded (internal) stylesheet | Medium | <style> h1 {color:green;} </style> |
| External stylesheet | Lowest | <link rel="stylesheet" href="css/style.css"> |
When the same property is defined in more than one place, the rule with the highest specificity wins. Class and ID selectors increase specificity over element selectors.
| Layer | What the note demonstrates |
|---|---|
| Content (HTML) | Semantic tags, hyperlinks, images, alt text, and a checklist for accessibility. |
| Presentation (CSS) | External stylesheet linked with a relative path, selector cheat‑sheet, cascade order and specificity table. |
| Behaviour (JavaScript) | Optional commented‑out script illustrating the layer and reinforcing the three‑layer model. |
Productivity gain: In a recent school project, a group of six students saved 45 minutes of debugging time by using relative paths. When the folder was copied to a USB stick for the teacher’s review, every link worked without modification.
../ to move up directories as needed, then list the sub‑folders./) – even on Windows.C:/).index.html, about.html, css/style.css and an image. Use relative paths for all links. Verify that the site works after moving the folder to a USB stick or another computer.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.