logo

Cambridge IGCSE Information and Communication Technology revision notes

Web development layers Revision Notes

Cambridge IGCSE revision notes for Web development layers.

At a glance

revision notes

Resource type

Topic

Web development layers

CambridgeIGCSEInformation and Communication TechnologyWebsite authoring

Complete revision guide

Understanding the Three Layers of Web Development

Web development is organised into three distinct layers: content, presentation, and behaviour. Each layer plays a specific role in creating a functional, visually appealing, and interactive web page. This note explains the responsibilities of each layer, how they interact, and provides clear examples to aid understanding.

Syllabus source

Section 3, Topic 21.1, page 33, objective 21.1.1

Open source document ↗

What you should be able to do

  • ✓Identify and explain the role of the content layer in web development.
  • ✓Describe how the presentation layer controls the visual layout and styling of a web page.
  • ✓Explain how the behaviour layer adds interactivity through scripting languages.
  • ✓Understand the separation of concerns among the three layers to improve web design and maintenance.
1

The Content Layer: Structuring Web Page Information

The content layer is the foundation of any web page. It involves entering and organising the actual information that users will see and interact with. This includes text, images, videos, and other media elements. The content is typically written in HTML (HyperText Markup Language), which uses tags to define the structure and meaning of the content.

For example, a heading is marked with <h1> tags, paragraphs with <p>, and images with <img>. This semantic structure helps browsers and assistive technologies understand the page's content.

A simple example: <p>Welcome to our website!</p> adds a paragraph of text to the page. The content layer focuses solely on what information is presented, not how it looks or behaves.

  • Uses HTML to input and organise text, images, and media.
  • Defines the structure and meaning of content with tags.
  • Forms the basis for the other layers to style and add interactivity.
2

The Presentation Layer: Formatting and Visual Styling

The presentation layer controls how the content appears on the screen. It determines colours, fonts, spacing, layout, and other visual aspects that make the page attractive and readable. This layer is usually implemented using CSS (Cascading Style Sheets).

CSS rules target HTML elements and apply styles. For example, to make all paragraphs blue and centred, the CSS might be: p { colour: blue; text-align: centre; }

Separating presentation from content allows developers to change the look of a website without altering the underlying information. This improves maintainability and consistency across pages.

  • Uses CSS to style HTML elements visually.
  • Controls layout, colours, fonts, and spacing.
  • Enables consistent design and easier updates without changing content.
3

The Behaviour Layer: Adding Interactivity with Scripting

The behaviour layer manages how the web page responds to user actions and events. It uses scripting languages, most commonly JavaScript, to create dynamic and interactive features.

Examples include validating form inputs before submission, showing or hiding elements when buttons are clicked, or updating content without reloading the page.

For instance, a script might check if a user has entered a valid email address and display an error message if not. This layer enhances user experience by making pages responsive and interactive.

  • Uses JavaScript or similar scripting languages.
  • Adds interactivity and dynamic content changes.
  • Handles user events like clicks, input, and navigation.
4

Why Separate These Layers?

Separating content, presentation, and behaviour improves web development in several ways:

**Maintainability:** Changes to one layer (e.g., updating styles) do not require rewriting content or scripts.

**Reusability:** The same content can be presented differently for various devices or themes by changing CSS alone, without touching HTML or scripts.

  • Improves organisation and clarity of code.
  • Facilitates teamwork by allowing specialists to focus on one layer.
  • Enhances accessibility by keeping content semantic and separate from styling and scripts.
5

Example: Building a Simple Web Page

Consider a web page with a heading, a paragraph, and a button that changes the paragraph text when clicked.

**Content layer:** HTML defines the heading (<h1>), paragraph (<p>), and button (<button>).

**Presentation layer:** CSS styles the heading colour and centres the text, and styles the button appearance (background colour, font). Example: h1 { colour: green; text-align: centre; } button { background-colour: lightgrey; }  - **Behaviour layer:** JavaScript adds an event listener to the button that changes the paragraph text when clicked. Example: document.querySelector('button').addEventListener('click', function() { document.querySelector('p').textContent = 'Text changed!'; });

  • Shows clear division of roles among layers.
  • Demonstrates how layers combine to create a functional page.

At-a-glance summary

Comparison table

LayerRoleImplementation ExampleExam Use
ContentInput and structure of informationHTML tags like <h1>, <p>, <img>Identify HTML elements and explain their purpose
PresentationVisual styling and layoutCSS rules such as colour, font, alignmentDescribe CSS effects on page appearance
BehaviourInteractivity and dynamic changesJavaScript event handlers and functionsExplain how scripts add user interaction
SeparationKeeps concerns distinct for easier maintenanceContent in HTML, styles in CSS, scripts in JavaScriptExplain benefits of separating layers

Active recall

Quick check

1. Which layer is responsible for the text and images on a web page?

The content layer, which uses HTML to structure and input the page's information.

2. How does the presentation layer affect a web page?

It controls the visual appearance, such as colours and layout, using CSS.

3. What role does the behaviour layer play?

It adds interactivity and dynamic features through scripting languages like JavaScript.

4. Why is it beneficial to separate content, presentation, and behaviour?

Separating layers improves maintainability, allows easier updates, and keeps code organised.

Related topics

Study nearby topics next

Revision hubs

Keep studying from the right hub