- Cascading Style Sheets
- lets style webpages
- based on "rules" applied to html elements
- each rule begins with a selector used to identify the html tag
- the selector is followed by curly braces
- declarations are made in the braces
- declarations consist of a property and value
- a colon follows the property and a semicolon follows the value
Example
h1 {
color: blue;
font-size: 10em;
}- 3 ways to add css: external, internal, inline
- add the follwing to your html head to link an external css file:
<link rel="stylesheet" href="style.css">- color is inherited
Example
body {
color: rgb(140, 85, 37)
}