We have 3 alternatives of adding CSS on a web page: we can add the css inline, using the style attribute, we can add the CSS in head tag of the page, where we put the style tag and the last alternative is to add the CSS in a separate CSS file. After we chose one of this 3 options, let's say that we chose the second or the third option because this are the most recommended alternatives, we can start writing so-called CSS rules. Our CSS rules needs to be inside of a selector. A selector simply is an additional piece of information that tells CSS to which element in your DOM, so inside of your body and the body is also treated as an element by the way, to which element you want a specific declaration.
Read