Table of Contents

Web Development Lesson 2 - Text

Headings

Objectives

In this exercise you'll learn how to create a heading and some more formatting styles that make a heading pop.

Setup

We'll continue to use the code you've been working on in jsfiddle.

My Story
<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>

Tag: Heading

<h1>My Story</h1>

Font-family

<h1 style="font-family:Arial,sans-serif;">My Story</h1>
<h1 style="font-family:Arial,sans-serif; color:green;">My Story</h1>

Font-size

<h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em;">My Story</h1>

Underline

<h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline;">My Story</h1>

Changing Case

<h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline; text-transform:uppercase;">My Story</h1>
<h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline; font-variant: small-caps;">My Story</h1>

Line Height

<h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline; font-variant: small-caps; line-height: 3em;">My Story</h1>

Shadow

<h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline; font-variant: small-caps; line-height: 2em; text-shadow:2px 2px red;">My Story</h1>

Next: Javascript