Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1006 Bytes

File metadata and controls

46 lines (35 loc) · 1006 Bytes

Design web pages with CSS

What is CSS?

  • 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;
}

How to add CSS

  • 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">

CSS Color Property

  • color is inherited

Example

body {
    color: rgb(140, 85, 37)
}

Links