Elements of the DOM have to be targeted precisely if we want the webpage to look exactly as we envisioned. We have many different CSS selectors to choose from, and we will cover just the base ones in this exercise
Universal selector * selects all elements on the page.
Type selectors h1 h2 p span ul li (these are just examples, you can select any HTML element) select all elements of that type on the page. For example a
div selector will select all the
div elements on the page and apply specified styles to them.
Class selector .my-class (a dot followed by a class name) target all elements that have the class attribute the same as the selector.
ID selector #my-id selects only one element with the specified unique id.
Apply the following styles:
color: blue; - to every element
border: 1px solid black; - to every paragraph (the
p tag)
background-color: cyan - to every element with
cyan-class class
font-size: 20px; - to element with id
my-id