Previous task
Introduction to HTML and CSS13/13
Back to the list of tasks
  1. 1. Let's Go!
  2. 2. CSS in action
  3. 3. Consolidation
  4. 4. HTML basics
  5. 5. Single HTML tags
  6. 6. Attributes of HTML tags
  7. 7. Looking for errors in HTML
  8. 8. Basics of CSS
  9. 9. Other ways to connect CSS
  10. 10. CSS selectors
  11. 11. CSS classes
  12. 12. CSS properties and values
  13. 13. Looking for errors in CSS
Task list
  • Courses
  • Sign up
  • Log in

Loading...
It will be ready in a few seconds.

  • Theory
  • Theory

Looking for errors in CSS

CSS syntax is much simpler than HTML syntax, but that doesn't stop you from making annoying mistakes.

Of course, some of the most common mistakes are typos in property names or selectors.

Other common errors include the absence of ; in the list of CSS properties. When you forget to put a semicolon after a property-value pair, the browser doesn't apply that property or all subsequent properties.

Cupcake decided to do some final work with styles to make the outline "prettier". It worked well, but this time Cupcake was careless and made some annoying typos that broke some of the styles.

Well, that's great! Now you can practice finding errors in CSS!

1. Line 8.

2. Line 17.

3. Line 27.

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html> <head> <title>Looking for errors in CSS</title> <link rel="stylesheet" href="style.css"> </head> <body> <h1>Course outline</h1> <p class="completed">Paired tags.</p> <p class="completed">Single tags.</p> <p class="completed">Tag attributes.</p> <p class="completed">Inline styles.</p> <p class="in-progress">External Styles.</p> <p class="new">Styling by class.</p> </body> </html>
CSS
body { margin: 30px; font-family: "Georgia", serif; } p { margin: 10px 0; padding: 5px 10px border: 1px solid #cccccc; border-left-width: 10px; color: white; } .completed { border-color: #27ae60; background-color: #2ecc71; text-decoration: linr-through; } .in-progress { border-color: #f39c12; background-color: #f1c40f; } .new { border-color: #c0392b; backround-color: #e74c3c; }

The code has changed, click "Update" or enable autorun.

You have moved to another page

Click inside the mini-browser to highlight this window.

100%
GoalsCompleted
0

    Help Cupcake correct errors in outline styles:

    1. First error with lost styles for all paragraphs,
    2. second error with no strikethrough for completed items,
    3. third error with missing background of uncompleted ones.

    © 2023-2024, codehero.pro