Table of Contents

Web Development Lesson 3 - Tables

Cascading Style Sheets (CSS)

Setup

<h1 style="font-family:arial, sans-serif; color: green; font-size: 1.7em; text-decoration: underline; font-variant:small-caps; text-shadow:2px 2px #ff0000;">
My Story
</h1>
<p style="text-align:right">
My friend Pablo has a <em style="color:red; font-weight:700">pet dog</em> called Sam who likes to have his tummy scratched. When they go to the park, <strong>he likes to chase a <em>ball</em>.</strong> He rolls in the dirt so Pablo has to wash him when they get home.
</p>
<p style="text-indent:50px">
On Sundays they drive to the <sup>mountains</sup> where he runs around smelling the grass and <span style="color:blue;">wagging his tail</span>. He gets so tired that he sleeps all the way home.
</p>

CSS

p {
  color: blue;
}

Indent

p {
  color: blue;
  text-indent: 50px;
}

Alignment

text-align: justify;

Italic

span {
  font-style: italic;
}

Font Family

h1 {
  font-family: Arial, sans-serif;
}

Font Size

font-size: 3em;

Underline, Small Caps, Line Height, Shadow

h1 {
  font-family: Arial, sans-serif;
  font-size: 3em;
  text-decoration: underline;
  font-variant: small-caps;
  line-height: 3em;
  text-shadow:2px 2px #ff0000;
}

Next: Table Structure and Content