The key to understanding how CSS works is to imagine that there is an invisible box around every HTML element.
Imagin box
hese rules govern how the content of specified elements should be displayed. A CSS rule contains two parts: a
selector
and adeclaration.
CSS declarations sit inside curly brackets and each is made up of two parts: a
property
and avalue
, separated by a colon.
color >#### The color property allows you to specify the color of text inside an element. You can specify any color in CSS in one of three ways: 1. **RGB Values**
>p { color: rgb(100,100,90);} 2. **HEX Codes**
>h2 { color: #ee3e80;} 3. **Color Names**
>h1 { color: DarkCyan;}
background-color
body { background-color: rgb(200,200,200);}
h2 { background-color: #ee3e80;}
h1 { background-color: DarkCyan;}
p { background-color: white;}