HTML Lesson 6



Don't Forget,


Print this page if you want to. To study off line.

How's that for colors? 140 colors to be exact. Now I suppose you want to know how to use them? Yes you could just type their name, but I'm not sure if that would work for all browsers. So to be sure they work you use the numbers and letters given to each one.

In the color chart I typed the names and the letters in capital letters. That was so you could see them better. You should use all lower case letters. NO capitals, OK!

Before you type them you have to use the number symbol #
just before the code, like they were in the color chart.

The number symbol is on the number 3 key. Hold down the shift key to type it.

In these color codes the numbers only go from 1 to 0 (thats a zero).
The letters go from a to f. There is no O.

So when you see this, 0 it's a number zero.

All my pages are Floral White. So this is how you write it.
<body bgcolor="#fffaf0"> or change font colors.
<font color="#fffaf0"> I think you get it.

(see why I wrote the letters in the color chart in capital? In lower case they can look blurry.)

Just remember if you write the name of a color, (use lower case letters also) don't use the number symbol. If you use a color code then use it.


Here's three real easy tags in case you want a word or sentence to stand out or just be different.

1. Your word or words are underlined.
<u> Hello </u> You get, Hello

2. Your words slant to the right. This is called Italic writing
< i > Hello </ i > And you get, Hello

3. Your words are type writer writing. This is called tele type writing.
< tt >Hello</ tt > And you get, Hello

How's that for some easy ones?

Yes you can combine them together or with other tags.
<font size="5"color="green"><b><i><u><tt>Hello</tt></u></i></b></font>

Hello


Now suppose you want your header or any thing to be in the center of the page instead of being stuck to the left.
You use a center tag. <center> </center>

<center> Put me in the center </center> And you get;

Put me in the center

Or you could use this.
<center>My First Web Page</center> And get this,

My First Web Page

Not
so
bad
is
it?

I used the center tag and a lot of break tags for that.


You could use the center tag for an entire paragraph, or use the paragraph tag to do it.

Remember that paragraph tag that gives you space inbetween paragraphs? You can tell the browser where you want your paragraphs by telling it to align to the center or to the right
You don't have to align left, that just happens automatically.

<p align="center">Put me in the center</p>

Put me in the center

<p align="right">Put me to the right</p>

Put me to the right

<p>I will automatically go left</p>

I will automatically go left




We know that the font tag can make our words big or small. And the bold tag will make them look bold.

If we just want to write a header for a paragraph, we can save a lot of writing by using the header tags. These are only used for headers and they make the words bold automatically.

Like the font tags each number will make your letters big or small. They only work for black letters so if you want a colored header you will need a font color tag.

Remember font size tags are from 1 to 7. And 1 is the smallest and 7 is the largest.

In header tags they just go from 1 to 6. And the size is reversed.

1 is the largest and 6 is the smallest. They also act like a paragraph tag giving you the same space between your header and your paragraph of words.

h1

h2

h3

h4

h5
h6

<h6>My First Web Page</h6>

My First Web Page

<h5 align="right">My First Web Page</h5>
My First Web Page

<h4>My First Web Page</h4>

My First Web Page


<h3 align="center">My First Web Page</h3>

My First Web Page


<h2>My First Web Page</h2>

My First Web Page


<h1>My First Web Page</h1>

My First Web Page
<h2><font color="green">My First Web Page</font></h2>

My First Web Page


<h2>Remember</h2>There is no need to use a paragraph tag when you use a header tag. You close the header tag and just start writing.

Remember

There is no need to use a paragraph tag when you use a header tag. You close the header tag and just start writing.


Of coarse you need a font size tag to make all your other words the size you want them.

<font size="4"color="blue"><h2>Heck Yes</h2>This works for me</font>

Heck Yes

This works for me


Or this,

<font size="4"><h2>Heck Yes</h2>This works also</font>

Heck Yes

This works also


Or maybe this,

<h2>OK</h2><font size="4">So does this work</font>

OK

So does this work


You can write it any way you want it. Changing your font and header tags any time. This example has all the words one font size.

<body ???????????><font size="?"><center><h3>My First Header</h3>Then you could write your first paragraph</center><h3>My Second Header</h3>Then you could write your Second Paragraph</font></body>

If you deceide to have a header in the center or to the right and you want your words there also, don't forget to align them both.
<h2 align="right">My Header</h2><p align="right">My Paragraph</p>

If you want them in the center, just use the center tag like I did in the example above and save typing. Or put your header in one place and your words some where else.

Remember it's your pages and you create them the way you want them to look.



We had a lot of new tags this lesson so lets go over them real quick before we practice them.

The number symbol for color codes. #

Underline <u> </u>      Italic <i> </i>      Typewriter <tt> </tt>

Center <center> </center>

Paragraph <p> </p>   <p align="center"> </p>   <p align="right"> </p>

Header
<h1></h1>   <h2></h2>   <h3></h3>   <h4></h4>   <h5></h5>   <h6></h6>
<h? align="center">    <h? align="right">



Are you ready to practice these new tags?

Before we practice would you like to go back to the color chart and write down on paper some color codes to practice with? You can go directly to Practice 6 from the color chart. Or return here, or go to the practice now. It's up to you.

Color Chart click here

Ok lets get to it. Practice


Or go back to,
Lesson 5
Lesson 4 ------ Practice 4
Lesson 3 ------ Practice 3
Lesson 2 ------ Practice 2
Lesson 1 ------ Practice 1
Introduction
Home Page