Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Cascading Style Sheets (CSS)

CSS is one of the main languages used in the creation of web pages, alongside HTML and Javascript.

CSS

CSS

  • CSS stands for cascading style sheets.
  • CSS describes how a web page written in HTML should look, in terms of style and formatting.
  • CSS can be written once and applied throughout a website.
  • This makes designing a webpage more efficient, especially when making changes.
CSS rules

CSS rules

  • CSS rules are made up of selectors and declarations:
    • Selectors identify the component of HTML that requires formatting.
    • Declarations describe how the component should look.
Attributes

Attributes

  • There are many different attributes you can change with CSS. For example:
    • background-color.
    • border-color.
    • border-style.
    • border-width.
    • color (named and hex colours).
    • font-family.
    • font-size.
    • height.
    • width.
  • Note the American spelling of 'color',
External CSS

External CSS

  • External CSS is when the HTML and CSS code exist as separate, but linked files.
    • This is the most common way to use CSS.
  • To link a CSS file into an HTML file, we use the following syntax:
    • "stylesheet" type"text/css" href="style.css">
Embedded CSS

Embedded CSS

  • Embedded CSS is when CSS is put in <style></style> tags in the <head> part of the HTML code.
Inline CSS

Inline CSS

  • Inline CSS is when CSS is put directly in the <body> of the HTML.
    • This is ideal for solitary adjustments of formatting.
Jump to other topics
1

Components of a Computer

2

Software & Software Development

3

Exchanging Data

4

Data Types, Data Structures & Algorithms

5

Legal, Moral, Cultural & Ethical Issues

6

Elements of Computational Thinking

6.1

Thinking Abstractly

6.2

Thinking Ahead

6.3

Thinking Procedurally

6.4

Thinking Logically

6.5

Thinking Concurrently

7

Problem Solving & Programming

8

Algorithms

Practice questions on CSS

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
    What does CSS stand for?Fill in the list
  2. 2
Answer all questions on CSS

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium