HTML2: More Formatting


Slide 2: Line Formatting

HTML ignores all of the line breaks and extra spaces you may make.

<p> This is a


with a lot of

line breaks


Slide 3: Manual Line Breaks

<p> This is a <br>

paragraph <br>

with a lot of <br>

line breaks


Slide 4: Manual Line Breaks

<p> This is a <br> paragraph <br> with a lot of <br> line breaks </p>

Slide 5: Preformatted Text


This is      a


text paragraph           with

line breaks


Slide 6: Color

Add color by just editing your tags. There are certain acceptable color names, otherwise you need to use hexadecimal color tags.

Background color

<body style=”background-color:pink;”>

Text Color

<p style=”color:red;”>   <h1 style=”color:white;”>

Slide 7: Fonts

You can also change the font by editing the <p> and <h> tags.

<h1 style=”font-family:courier”>

You can change the font and the color like this!

<h1 style=”color:white; font-family:courier”>

Slide 8: You Try

Add to your webpage from yesterday these elements.

  • Background color
  • 2 different text colors for your 2 paragraphs
  • 2 different fonts for your 2 different paragraphs