Skip to main content

What is CSS — exercises and bug fixes

5 hands-on exercises and 5 find-the-bug challenges for the What is CSS lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.

Exercises(5)

  1. 1

    Write your first rule

    easy10 min

    Make the #title blue.

  2. 2

    Change a background

    easy10 min

    Give #wrap a #f5f5f5 background.

  3. 3

    Resize some text

    easy10 min

    Make #text 20px.

  4. 4

    Add a border

    easy10 min

    Give #wrap a 2px solid black border.

  5. 5

    Style a small page

    medium10 min

    Blue heading, 20px body text, padded wrapper.

Find the bug(5)

  1. 1

    Fix the missing selector

    easy8 min

    A rule needs a selector before its braces.

  2. 2

    Fix the wrong property

    easy8 min

    An element's fill is set with background-color.

  3. 3

    Fix the missing unit

    easy8 min

    A font size needs a unit.

  4. 4

    Fix the border with no style

    easy8 min

    A border needs a style to be drawn.

  5. 5

    Fix the rule on the wrong element

    easy8 min

    The heading should be blue, not the paragraph.

Ready to write the code?

The editor, the automatic checks and the worked solutions open up with an account.

Open the workspace