Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Lesson details

      Learning outcome

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

      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.

      Teacher tip

      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.

      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.

      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...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      Match the terms to their definitions.

      Correct Answer:HTML,structures the content of a web page

      structures the content of a web page

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

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

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

      adds a title or heading to a web page

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

      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

      changes the text colour

      Correct Answer:background-color,changes the background colour

      changes the background colour

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

      changes the size of the text

      Correct Answer:text-align,aligns text horizontally

      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

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