icon-background-square
New
New
Year 8

Introduction to CSS

I can describe and use HTML and CSS to style the appearance of a web page.

icon-background-square
New
New
Year 8

Introduction to CSS

I can describe and use HTML and CSS to style the appearance of a web page.

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Inline styling is a method of formatting a web page within the HTML file.
  2. CSS (Cascading Style Sheets) allows for centralised styling, making web page design more efficient and consistent

Keywords

  • Inline styling - applying style changes directly to an HTML element

  • CSS (Cascading Style Sheets) - used to control the appearance of a web page by defining styles like colours, fonts, and layout

Common misconception

CSS rules must always include < > like HTML tags.

CSS uses just the tag name, without brackets.


To help you plan your year 8 computing lesson on: Introduction to CSS, download all teaching resources for free and adapt to suit your pupils' needs...

Note that, within code, the word colour is spelt 'color', which is the American spelling. This is the spelling used in both HTML and CSS, and many other programming languages.
speech-bubble
Teacher tip
equipment-required

Equipment

A HTML editor is required to enable pupils to complete activities. Links to the same projects in the Raspberry Pi Code Editor are provided as one option.

copyright

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

6 Questions

Q1.
Match the terms to their definitions.
Correct Answer:HTML,structures the content of a web page
tick

structures the content of a web page

Correct Answer:tag,a piece of code used to define elements on a web page
tick

a piece of code used to define elements on a web page

Correct Answer:`<heading>`,adds a title or heading to a web page
tick
<heading>
- 

adds a title or heading to a web page

Correct Answer:`<p>`,adds a paragraph
tick
<p>
- 

adds a paragraph

Q2.
What is the purpose of an HTML attribute?
to define the structure of a web page
to display images on a web page
Correct answer: to describe an aspect of an object, such as its colour or size
to create links between web pages
Q3.
Which HTML tag is used to display an image on a webpage?
<div>
<p>
<a>
Correct answer: <img>
Q4.
Which HTML attribute is used to specify the source of an image?
alt
Correct answer: `src`
href
class
Q5.
Why is it important to use the alt attribute for images?
Correct answer: to improve accessibility
to make the image load faster
to change the image size
to link the image to another page
Q6.
Which attribute can be used to control the size of an image?
src
alt
Correct answer: width and height
id

6 Questions

Q1.
What does CSS stand for?
Computer Styling System
Creative Styling Structure
Correct answer: Cascading Style Sheets
Custom Style Syntax
Q2.
Which method allows you to apply style changes directly to an HTML element?
CSS files
Correct answer: inline styling
external style sheets
JavaScript
Q3.
What is a key benefit of using CSS over inline styling?
Correct answer: CSS allows centralised styling for consistency.
CSS is easier to write.
CSS does not require HTML.
CSS cannot be overridden.
Q4.
Which of the following is an example of inline styling?
Correct answer: <h1 style="color: blue;">Heading</h1>
h1 { color: blue; }
<link rel="stylesheet" href="styles.css">
Q5.
Match each CSS property to its function.
Correct Answer:color,changes the text colour
tick

changes the text colour

Correct Answer:background-color,changes the background colour
tick

changes the background colour

Correct Answer:font-size,changes the size of the text
tick

changes the size of the text

Correct Answer:text-align,aligns text horizontally
tick

aligns text horizontally

Q6.
What is a common mistake when writing CSS rules?
writing CSS in lower-case letters
adding too many properties
Correct answer: using < > brackets like HTML tags
forgetting to use semicolons