reading-notes

Class 5 - Design Web Pages with CSS

What is CSS?

CSS Syntax

h1 {color: red; font-size: 5px;}

Inserting CSS into Document

  1. External CSS - Adding a separate “stylesheet” that contains only CSS code. Needs to be referenced in the HTML with: <link rel="stylesheet" href="[file-name].css">
  2. Internal CSS - CSS code inserted into the HTML file (usually in the <head> section) using the <style> HTML element: <style>h1 {color: maroon; margin-left: 40px;}</style>
  3. Inline CSS - Applies CSS code to a single HTML element within the HTML file using the style= attribute: <h1 style="color:blue;text-align:center;">This is a heading</h1>

Cascading Order

CSS Color Property

Reset CSS