Transcript from the "Wrapping Up" Lesson
>> Thanks so much for watching this course. And I just wanted to do a quick summary for you of all of the things that you've learned over this entire course. So first of all, semantic HTML is gonna help with search engine optimization, helps with accessibility, and it allows for interesting selectors, broadening that CSS range for fine-tune styling.
[00:00:23] You don't have to use 15 different classes on something. You don't have to worry about if somebody reorders the buttons that are all in a row. If they're still gonna be styled in the way that you want. If you're writing robust selectors that are based on your HTML, then you're going to wind up with flexible styling that is gonna stay in place even as users wind up changing your document.
[00:00:48] Remember that CSS selectors are broad, classes don't have to be your first choice. In fact, classes should be your last choice. Classes are the exceptions to the rule. Classes give you an easy way of selecting something to make it an exception to the rule. You have so many other tools in your tool chest for getting things to style the way you want it.
[00:01:09] CSS is about pattern matching. And I would encourage you to have this as one of the big takeaways from this course, when you're matching patterns of your HTML, that's what CSS does. It's gonna look for those patterns in your HTML and apply the styles accordingly. When you use classes, you kinda disrupt that process.
[00:01:29] You're adding a little pointer that says right here, this thing right here, that is where I want my style. Sometimes that is exactly what you need, but it doesn't necessarily have to be that way all the time. So remember that you can pattern match, and pattern matching may lead to a more robust solution to what you're doing.
[00:01:50] Inheritance, is gonna cause, more weird things to happen than you'd expect. So, as you think about things that you kind of know about CSS and the cascade, you think about the order of styles, you think about their specificity. Inheritance tends to be the one that is forgotten. And inheritance is very powerful and it can lead to some of those unexpected results.
[00:02:11] So, if you can remember that the inherited styles typically apply to text in some way or another. The font styles, the text styles and so forth, those are the ones you need to watch out for when you are debugging your CSS. Specificity and the Cascade are predictable. They are not simple, they are not without rules but they are predictable.
[00:02:35] Once you truly understand what's going on with specificity in the cascade, you know exactly what's going to happen to your styles along the way. And of course, you can visualize that inside of your developer tools. And finally you can explain everything that is happening in CSS with enough time studying these rules.
[00:02:55] I gave you an exercise along the way that helps you explain what's happening with the styling and why. I would encourage you to continue that process, to sharpen these skills. The next time you are working with CSS, take a look at something and see if you can explain why it looks the way it looks inside of your document.
[00:03:14] It'll help cement these rules inside your mind. And it will encourage you and increase your confidence so that you're gonna be better at these rules in the future. Thanks again so much for watching you, it's been a lot of fun presenting this material to you.
>> We should ask.