If you want to change a section like a header, you must include the tag in front the bracket. Ex= h1{color:ex}
Using * tag selects all and makes it universal
To select an HTML element by its class using CSS, a period (.) must be prepended to the class’s name. In the example above, the class is brand, so the CSS selector for it is .brand.
If there are multiple classes, you can create different rule sets or include both using space in html.
The ID attribute has only one value compared to the class. To select an ID , you must use a hashtag #
The attribute selector targets elements that already contain attributes. You use [ ] to select them.
- Psuedo class: ex focus, visited, disabled, active that creates user interaction.
- different ways of selecting an element. By type, class and ID.
- Chaining combines multiple sectors.
- ex: h1.special the (.) connects two different elements.
- A descendant combinator selects all elements within a list.
You can add more styles to multiple selectors. Separate the CSS selectors with a comma.
Top comments (0)