HTML Additional Formatting

Slide 2: Line Formatting

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

<p> This is a

paragraph

with a lot of

line breaks

</p>

Slide 3: Manual Line Breaks

<p> This is a <br>

paragraph <br>

with a lot of <br>

line breaks

</p>

Slide 4: Manual Line Breaks

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

Slide 5: Preformatted Text

<pre>

This is      a

preformatted

text paragraph           with

line breaks

</pre>

Slide 6: Color

Add color by just editing your tags. There are certain acceptable color names, otherwise you need to use hexadecimal color tags. https://www.w3schools.com/colors/colors_names.asp

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

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.