tags
Some Basic HTML Tags (to Get You Started)

Beginning and Ending Tags

Most html tags consist of a beginning tag and an ending tag. For example:

<P>   </P>

P is the tag for beginning and ending a paragraph. Notice the / in the second tag. All ending tags contain a /. This slash is important, it tells the browser that the tag is closed (what you wanted done has ended.)

All it takes is a small mistake like a missing quotation mark to create errors on your webpage. Be careful when you enter tags!

Entering Breaks

Hitting the "Enter" key will have no affect on your web page. If you want to start a new line in a certain place within a paragraph, you need to use this tag:

<BR>

It means "break". It is a single tag requiring no end tag and acts like the <P> tag except it skips one line instead of two.You don't need to use it at the end of each sentence in a paragraph, just use it if you want to start a new line in a particular place within a paragraph. Example:

The key to learning to use tags is practice.<BR> You can do it! <P>

This is what it would look like on your page:

The key to learning to use tags is practice.
You can do it!

Changing the Way Text Looks

To make a word or several words bold, use these tags:

<B> </B>

The text that you want bold is enclosed between these tags:

Only one word here will be bold <B> Guess </B>which one?

Did you pick "guess"? You're right!

Underlining works like this? Use these tags:

<U> </U>

What about italicized words?

This is what to use:

<I> </I>

You can use any or all combinations of these tags depending on the effect you want to have on your text:

The<I>key</I>in learning to make web pages is
<B> <U> <I>practice.</I> </U> </B>

Notice how the words to be affected are enclosed in the beginning and end tags. Notice the slash in the end tags. Don't forget them. Result:

The key to learning to make tags is practice.

Attributes
Telling Tags What To Do

The text on this web page is pretty small. We can change that with a new tag:

<FONT> </FONT>

Inside this tag we are putting what is called an attribute. Attributes tell tags how or where they are to display the items between them. To change the size of text we will use the SIZE attribute inside the FONT tag like so:

<FONT SIZE="+3">practice</FONT>

Result:

practice

Note that the attribute was only required for the beginning tag. Note also the quotation marks around the +3 and the equal sign preceding it. Don't forget to use qoutes when using attributes otherwise it will have no effect on your text. You may use any size from -1 to -6 and from +1 to +6 but remember to put them inside quotation marks.

Color
Another attribute that can be used with the FONT tag is COLOR:

<FONT COLOR="#FF0000">practice</FONT>

Result:

practice

"#FF0000" is the code for red. Notice the # in front of the code, don't forget to include it inside the quotes. You can use the name of the color instead but it's better to use the code since some older browsers will not understand color names. Click here for a table of color codes and their names.

Style
To change the style of text add the FACE attribute to the FONT tag:

<FONT FACE="arial">practice</FONT>

Result:
practice

Keep in mind that the style of font the viewers of your web page see depends on the style fonts they have installed on their computer. If they don't have the style you're using for your webpage, they'll get the default setting of their browser.

You can use any combination or all attributes in the font tag like so:

<FONT SIZE="+6" COLOR="red" FACE="arial">practice</FONT>

Note: Leave a space between each attribute in a tag.

Result:

practice

Attributes work the same way in other tags.

Here's the heading tag <H> You can have it on the right side of your

web page like this

by using the ALIGN attribute in the beginning heading tag:

<H3 ALIGN="right"> your text </H3>

The items between the beginning and end tag will be on the right side of the page. Notice again that the attribute is only required for the beginning tag.You can also put text to the right of the page using the ALIGN attribute in the <P> tag, but here you need an end </P> tag:


<P ALIGN="right">practice, practice, practice</P>

Result:

practice, practice, practice

Goog luck using tags and attributes!

Last updated  2008/09/28 01:16:05 PDTHits  291