UNC BACS 200

Web Pages with HTML/CSS

Logo

Lesson 17 - Using Stylesheets

LEARN

Reading for Today

Stylesheets

CSS Rule Set

css h1 { font-family: serif; font-size: 120%; }

CSS Rule Set

```css selector { property: value; / one rule / property: value; }

```

Hooking up CSS

html <head> <link rel="stylesheet" href="style.css"> </head>

Groups of CSS Properties

Using CSS

BUILD

Create a CSS File

css h1 { color: red; }

Style Your Page

html <head> <link rel="stylesheet" href="my_style.css"> </head>

Create a CSS File

```css h1 { color: green; background-color: gray; }

a { color: red; }

li { color: green; } ```

Explore Source Code

Validator

W3Schools

Project 6