levo

Website Authoring

CSS rules, classes and the cascade

  • 3 things to know
  • Papers 1 and 3
Start revising · £5/month

Overview

Writing CSS rules and classes for backgrounds and fonts, attached and inline styles, and which style takes priority.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Why is an external stylesheet better than inline styles for a large website?

Key term

In what order of priority are styles applied, from lowest to highest?

Key term

What is a cascading stylesheet?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a cascading stylesheet?

    Model answer

    A cascading stylesheet is a file of style rules, saved as .css, that sets how the elements of web pages look.

  2. 2

    What is the difference between an attached stylesheet and an inline style?

    Model answer

    An attached stylesheet is a separate file linked to many pages. An inline style is written inside one HTML tag and affects only that element.

  3. 3

    Which takes priority, an inline style or an attached stylesheet?

    Model answer

    An inline style takes priority, because it is applied closest to the element.

  4. 4

    What is the difference between a style and a class in CSS?

    Model answer

    A style rule applies to every element of a type, such as every h1. A class is a named set of styles applied only to the elements given that class.

  5. 5

    How is a class written in a stylesheet?

    Model answer

    A class name begins with a full stop in the stylesheet, such as .warning, and is applied in HTML with class="warning".

  6. 6

    Give four font properties that can be set in CSS.

    Model answer

    CSS can set the font family, size and colour. CSS can also set alignment, bold and italic.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Types and Components of Computer Systems
Input and Output Devices
Storage Devices and Media
Networks and the Effects of Using Them

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Stock is reordered .
automaticallymanuallyweekly

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

FTP means protocol for transferring files.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Website Authoring, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.