Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Web Browser
Learn

Just like HTML, CSS follows certain best practices for spacing and indentation.

h1 { color: blue; } p { color: red; }
  1. One space should be used between the selector and the opening curly brace ({).

  2. No extra spaces should exist between opening and closing curly braces ({ and }) and CSS declarations (as in the example above).

  3. Two spaces of indentation should be used for CSS declarations.

  4. One line of spacing should exist between CSS rules. In the example above, there is one line of spacing between the CSS rule for the heading and the CSS rule for the paragraph.

CSS files can become lengthy as styling is added to a web page. Proper spacing and indentation helps keep CSS code maintainable and readable for you and other developers.

Instructions

Take a look at the code in style.css. Do you notice any code that is improperly indented? If so, fix the code to follow best practices for CSS spacing and indentation. Otherwise, continue to the next exercise.

Report a Bug
If you see a bug or any other issue with this page, please report it here.