From the course: HTML, CSS, and JavaScript: Building the Web
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Selectors and properties
From the course: HTML, CSS, and JavaScript: Building the Web
Selectors and properties
- [Instructor] Hi, welcome back. This is Chapter 3, Introduction to CSS, Unit 5, Selectors and Properties. In the previous lesson, we created a style sheet. We understood how default styles are set, take inheritance, and we learned they can be overridden based on these two, rules, think style sheets, and also priorities cascading. Now it's finally time for us to style the desired elements of our terrarium using this knowledge, but how can we actually select the right elements to override those defaults? This is where CSS selectors come in. CSS selectors are a way to target specific elements on a webpage to applied styling. Think of it as a language we can use to help the browser filter the elements in the dom to find the ones that match your conditions and then apply the style you want. And there are many kinds of selectors. Here are some examples. First, you can think of a element selector. This one targets all elements based on their type, their tag type. For example, you can use a…