Table of Contents

Web Development Lesson 2 - Text

Formatting Text

Objectives

In this exercise, you'll learn some more HTML tags and how to use them to make sections of your text stand out.

Setup

Continue to use the jsfiddle from the previous lesson. If you need it again, here it is.

My Story
<p>My friend Pablo has a pet dog called Sam who likes to have his tummy scratched. When they go to the park, he likes to chase a ball. He rolls in the dirt so Pablo has to wash him when they get home.</p>
<p>On Sundays they drive to the mountains where he runs around smelling the grass and wagging his tail. He gets so tired that he sleeps all the way home.</p>

Bold

<p>My friend Pablo has a pet dog called Sam who likes to have his tummy scratched. When they go to the park, <strong>he likes to chase a ball</strong>. He rolls in the dirt so Pablo has to wash him when they get home.</p>

Italic

<p>My friend Pablo has a <em>pet dog</em> called Sam who likes to have his tummy scratched. When they go to the park, <strong>he likes to chase a ball</strong>. He rolls in the dirt so Pablo has to wash him when they get home.</p>

Superscript

<p>On Sundays they drive to the <sup>mountains</sup> where he runs around smelling the grass and wagging his tail. He gets so tired that he sleeps all the way home.</p>

Rule: Nesting Tags

<strong>he likes to chase a <em>ball</em></strong>

Next: Attributes