Check out a free preview of the full Introduction to CSS course
The "CSS Validator" Lesson is part of the full, Introduction to CSS course featured in this preview video. Here's what you'd learn in this lesson:
Jen reviews how to check CSS code for errors using a validator.
Transcript from the "CSS Validator" Lesson
[00:00:00]
>> Jen Kramer: So this URL is the validator for the CSS. So yesterday we talked about validation and HTML. I’m gonna drop this on in here.
>> Jen Kramer: The validator.
>> Jen Kramer: So yesterday we talked about HTML and the importance of validating it as a way of checking errors and making sure you're writing good code.
[00:00:24]
There's a validator also that's available for CSS and it works pretty much the same way that the HTML validator worked. So the URL here is jigsaw.w3.org/css-validator, I think it's in your notes. And if you go here to this and we go to the direct input tab. Just like we did yesterday, you can take your CSS, just copy it right out of your style sheet, drop it on into the direct input window here, and check it.
[00:00:58]
>> Jen Kramer: And it will find any mistakes or errors that you've made. Hopefully, it says just like this, Congratulations No errors found. But if something, quote, doesn't work, and you just can't find the problem this can sometimes help you track down the problem. It's often a curly bracket that's missing, or you forgot a semicolon, or some other crazy thing that you did.
[00:01:21]
That's often what the problem is.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops