UNC BACS 200

Web Pages with HTML/CSS

Logo

Lesson 19 - Spacing & Borders

LEARN

Office Hours

Reading for Today

Today

CSS Rule Set

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

Hooking up CSS

html <link rel="stylesheet" href="styles.css">

CSS Property Groups

Spacing Properties

Size of Elements

css h1 { width: 500px; height: 100px; border: solid 1px gray; }

Box Model

css body { padding: 50px; margin: 10px; border: solid 1px gray; }

Example Rule Set

```css h1 { margin: 100px; background-color: rgb(20%, 20%, 20%); }

body { padding: 200px; border: solid 2px yellow; } ```

Borders Properties

Examples

```css h1 { border: solid 1px gray; border-radius: 20px; box-shadow: 2px 2px 5px gray; }

```

BUILD

CSS Demo

W3Schools

Validator

Project 7 - Wanted Poster