Exercise: Errors in CSS

Make changes to the CSS so that the HTML is styled as indicated. Do not change the HTML.

Selecting a line and placing your cursor over the square or triangle to the left of the line number will allow you to see a message. Try to make the changes without looking at the messages! However, if you need a hint about what might be wrong, feel free to look. When you have fixed the errors, the squares and triangles will disappear.

Once you have solved the problem, you can restore the original CSS and look at the messages.

Checking your work

You can access a solution to the exercise by using the arrow or dot on the header bar above.

Note:

Hints:

  • Make sure that you use the correct syntax for both class and ID selectors.

Solution to the exercise

You can navigate back to your answer to compare your work with the solution.

Here are a few changes to notice:

  • The correct syntax for using an ID as a selector is to put a number sign before the value of the ID.
  • Values should not be put in quotation marks.
  • There is a text-decoration property, but no font-decoration property.
  • DeclarationsA specification of style as property:value. should be separated by semicolons.

Note:

Hints:

  • undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
.colourful {
    color"blue";
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX