Know and understand that the presentation layer is used to display and format elements within a web page.
| Layer | Technology | What It Does |
|---|---|---|
| Content layer | HTML | Provides the structure and meaning of the page – headings, paragraphs, tables, forms, etc. |
| Presentation layer | CSS (Cascading Style Sheets) | Controls how the HTML content looks – colours, fonts, spacing, layout, responsive behaviour. |
| Behaviour layer | JavaScript (optional for IGCSE) | Adds interactivity – menus, form validation, dynamic content updates. |
| Meta‑tag | Purpose (Why It’s Needed) |
|---|---|
<meta charset="UTF-8"> | Specifies character encoding – essential for all modern pages. |
<meta name="viewport" content="width=device-width, initial-scale=1"> | Enables responsive design on mobile devices. |
<meta name="description" content="Brief description of the page"> | Used by search engines and social‑media previews. |
<meta name="keywords" content="ICT, presentation layer, CSS"> | Optional – helps with SEO. |
<meta name="author" content="Your Name"> | Identifies the page author. |
These tags are part of the content layer but have default visual effects. They are the building blocks that CSS styles.
| Tag | Purpose | Typical Visual Effect |
|---|---|---|
<h1>–<h6> | Headings | Font size decreases from h1 to h6. |
<p> | Paragraph | Vertical margin before/after; line‑height applied. |
<div> | Division (block container) | Used for grouping and applying CSS styles. |
<span> | Inline container | Styles a fragment of text without breaking flow. |
<ul>, <ol>, <li> | Lists | Bulleted or numbered items; default indentation. |
<table>, <tr>, <td>, <th> | Tabular data | Rows & columns; borders, spacing, alignment are CSS‑controlled. |
<a> | Hyperlink | Default colour & underline; can be styled. |
<header>, <nav>, <section>, <article>, <footer>, <main> | Semantic layout containers | Improve accessibility & SEO; visual style set via CSS. |
<figure> & <figcaption> | Media with caption | Allows styling of images, video, or audio together with a caption. |
<img> | Embedded image | Requires src, alt and optional width/height. |
<audio>, <video> | Embedded media | Controls, fallback text, and track for subtitles. |
style attribute.<p style="color:red;">Red text</p><style> block in the <head>.<style> p { color:red; } </style>.css file and linked with <link>.<link rel="stylesheet" href="styles/main.css">Order of precedence (cascade): inline > internal > external > browser default.
p, .intro, #main).color, margin).#336699, 15px).| Selector Type | Specificity Score |
|---|---|
Inline style (style="") | 1000 |
ID selector (#header) | 0100 |
Class, attribute, pseudo‑class (.intro, [type="text"], :hover) | 0010 |
Element & pseudo‑element (p, ::first-line) | 0001 |
If two rules apply, the one with the higher specificity wins; if scores are equal, the later rule in the stylesheet wins.
Every element is a rectangular box composed of four areas:
+---------------------------+ ← margin | +-------------------+ | | | +-------------+ | | | | | content | | | | | +-------------+ | | | +-------------------+ ← padding +--------------------------- ← border
Formulas:
Setting box-sizing: border-box; makes the width and height include padding and border, preventing accidental overflow.
<div class="intro highlight">…</div><section id="main‑article">…</section>.btn.primary).<link rel="stylesheet" href="css/style.css"><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>| Link Type | Example | Key Attributes |
|---|---|---|
| Internal page link | <a href="chapter2.html">Next chapter</a> | href |
| External website | <a href="https://www.bbc.co.uk">BBC</a> | href |
| Mailto link | <a href="mailto:info@example.com">Email us</a> | href="mailto:" |
| Open in new tab/window | <a href="https://example.com" target="_blank">New tab</a> | target="_blank" |
alt attribute for accessibility.<img src="logo.png" alt="Company logo" width="120"><audio controls><source src="song.mp3" type="audio/mpeg">Your browser does not support audio.</audio>controls, provide track for subtitles.<video width="320" controls><source src="movie.mp4" type="video/mp4">Your browser does not support video.</video><div> vs. Tables<div> or semantic containers (header, nav, main, etc.) together with CSS (Flexbox or Grid) to create flexible, responsive layouts and keep presentation separate from content.alt text for all images.<header>, <nav>, <main>, <footer>, <section>, <article>) to aid screen readers.role="navigation" for a custom menu).em, rem, %) over fixed px for fonts and layout.@media (max-width: 600px) {
.intro {
padding: 10px;
font-size: 0.9rem;
}
nav ul {
flex-direction: column;
}
}
This example demonstrates:
alt, a data table, and a hyperlink that opens in a new tab.<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A brief guide to the presentation layer for IGCSE ICT">
<meta name="author" content="Your Name">
<title>Presentation Layer – IGCSE ICT</title>
<!-- External stylesheet – most styling lives here -->
<link rel="stylesheet" href="css/presentation.css">
<!-- Internal fallback (used only if the external file fails) -->
<style>
body {font-family: Arial, sans-serif; margin:20px;}
.intro {background:#F0F8FF; padding:15px; border:1px solid #B0C4DE;}
</style>
</head>
<body>
<header id="site-header">
<h1>The Presentation Layer</h1>
</header>
<nav class="main-nav">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="https://www.cambridgeinternational.org" target="_blank">Cambridge</a></li>
</ul>
</nav>
<main>
<section class="intro">
<p>This paragraph is inside a styled <code>div</code> that demonstrates background colour, padding and border.</p>
</section>
<section>
<h2>Sample Data Table</h2>
<table>
<thead>
<tr><th>Item</th><th>Quantity</th><th>Price</th></tr>
</thead>
<tbody>
<tr><td>Apples</td><td>10</td><td>$2.00</td></tr>
<tr><td>Bananas</td><td>5</td><td>$1.50</td></tr>
</tbody>
</table>
</section>
<section>
<h2>Image Example</h2>
<figure>
<img src="images/presentation.png" alt="Diagram of the presentation layer">
<figcaption>Figure 1: The presentation layer in a web page.</figcaption>
</figure>
</section>
</main>
<footer>
<p>© 2026 Your Name – All rights reserved.</p>
</footer>
</body>
</html>
Create an account or Login to take a Quiz
Log in to suggest improvements to this note.
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.