HTML For Webpages


This page looks at:

The Color Element

<FONT> and other
Text Attributes

<MARQUEE>



Using Color Elements

Before we get into <font> I want to go over using color elements as these will be used in the FONT tag.
You may have noticed that in the body tag I used numbers instead of color names. Using RGB COLOR CODES gives you more options and control over your colors. RGB stands for Red, Green, Blue. The numbers are in HEX or HEXADECIMAL code. HEXADECIMAL is a numbering system based on 16 instead of 10. This makes it easily converted into binary numbers which computers can understand and use. For an explaination of binary and how it relates to hexidecimal ask me.

In the HEXIDICIMAL system, 1 to 9 are the same as in the decimal system but 10 dec.=A in hex. 11 dec.=B hex. 12 dec.=C hex. 13 dec.=D hex. 14 dec.=E hex. 15 dec.=F hex. F is the highest value for a hex digit where 9 is the highest value for a decimal digit. Two hex digits together are known as a "byte" and have a maximum value of FF hex which equals 255 dec. A byte can have a value of from 0 to 255 in dec. or 00 to FF in hex. Each of the three primary colors in the picture tube are driven by these values. An RGB COLOR CODE has 6 digits. The first two drive the Red, the second two drive the Green, and the third two drive the blue. The value of each byte (2 digits) in the code determins the intensity of it's coressponding color.
RGB codes are always preceded in HTML codes with the # sign and placed in quotes. The color element looks like this: color="#3366FF". This code is for a shade of blue.





<FONT>    </FONT>

<BASEFONT SIZE=3>:
This is your browser's default text size. It sets the font size for the page at SIZE=3. By using this tag at the top of your page you can change the default setting for that page from 1 to 7. If you do not specify a basefont size it will automatically default to 3.


The following are examples of how font tags can be used throughout your page. The <FONT> tags are placed before the text you want to change and the </FONT> tags are placed right after the text.




SELECT FONT SIZE: (ranges from 1-7)
<FONT SIZE=1>This is a sample of FONT SIZE 1</FONT>


<font size=7>
This is FONT SIZE 7
</font>




CHANGE FONT SIZE: (Adds to or subtracts from existing basefont size)
<font size="+2"> This is a sample of adding "+2" making the font size equal to 5 </font>


<font size="-1"> This is a sample of subtracting "-1" making the font size equal to 2 </font>




FONT COLOR: (Color names or RGB codes may be used)
<FONT COLOR="#009900"> This is a sample of changing color to green </font>




In addition to changing the size and color you can add effects to the text.




EMBOSS:
<font effect="emboss"> This effect may not show well on all backgroung and text color combinations. </font>




RELIEF:
<font effect="relief"> I have enlarged the text and changed to a contrasting color to demonstrate the effect. </font>




SHADOW
<font effect="shadow"> This is how the text looks using the "shadow" effect. </font>



THE FOLLOWING TAGS ARE NOT USED WITHIN THE FONT TAG BUT MAY BE USED ALONE OR IN COMBINATION WITH FONT TAGS OR WITH ONE ANOTHER. THEIR CLOSING TAG MUST BE USED JUST AS WITH THE FONT TAG


ITALICS:
<I> This is a sample of ITALICS text </I>




BOLD:
<B> This is a sample of BOLD text </B>




STRONG:
<STRONG> This is STRONG text </STRONG>




CITE:
<CITE> This is a sample of CITE text </CITE>




BLACKFACE:
<BLACKFACE> This is a sample of BLACKFACE text </BLACKFACE>




BLOCKQUOTE:
<BLOCKQUOTE>

This is a sample of BLOCKQUOE text and was positioned here by the tag
</BLOCKQUOTE>




UNDERINE:
<U> This is a sample of UNDERLINE text </U>  




STRIKEOUT:
<STRIKE> This is a sample of STRIKEOUT text </STRIKE>




STRIKEOUT (4,0):
<S> This is a sample of STRIKEOUT text </S>




SUBSCRIPT:
<SUB> This is a sample of SUBSCRIPT text </SUB>




SUPERSCRIPT:
<SUP> This is a sample of SUPERSCRIPT text </SUP>




TYPEWRITTER:
<TT> This is a sample of TYPEWRITER text </TT> (displays in a monospaced font)




PREFORMATTED:
<PRE>

This is  a  
sample  of       PREFORMATTED        text
</PRE>
(displays text spacing exactly as it appears in the text editor. I put those spaces in there in the editor. Normally the browser will close up extra spaces to no more than two.)




<MARQUEE>    </MARQUEE>


MARQUEE: Optional elements are:
SCROLLAMOUNT=#
SCROLLDELAY=#
DIRECTION="LEFT"
DIRECTION="RIGHT"
BEHAVIOR="ALTERNATE".
WIDTH=#

All of these elements are optional. The basic tag looks like this:

<MARQUEE> Text goes here </MARQUEE>

The tag for the MARQUEE below looks like this:

<MARQUEE scrollamount=5 scrolldelay=10>
This is what a MARQUEE looks like. </MARQUEE>

This is what a MARQUEE looks like.

Here I changed SCROLLDELAY to 50.

Here I changed SCROLLAMOUT to 1.

Here I added WIDTH=300.

Here I added DIRECTION="RIGHT".

Here I added BEHAVIOR="ALTERNATE".

Here I changed SA to 500 and SD to 600.



Now lets put several elements from this page together into one display.

There are many things you can do with text using HTML

The codes for this display look like this:

<FONT SIZE=7 COLOR="#8620D7" EFFECT="RELIEF"> <CITE><STRONG><U>
<MARQUEE SCROLLAMOUNT=10 SCROLLDELAY=0>
There are many things you can do with text using HTML
</MARQUEE></U></STRONG></CITE> </FONT>


Now lets add this to our page.

<HTML>
<HEAŠ> <TITLE> My HTML Webpage </TITLE> </HEAD>
<BODY BGCOLOR="#AAC6DD" TEXT="#000020" LINK="#000066" VLINK="#660000">
<CENTER>
<H2>My HTML Webpage </H2>
<P> <HR WIDTH=400>
<SPACER TYPE=VERTICAL SIZE=70>
Welcome to my Homepage. I learned to make this page with HTML and without the use of a page builder from Techniguy's Homepage Help Site. <BR>
I have learned many new things from Techniguy's Help Site and have enjoyed it all. <P>
I never knew writing webpages with HTML could be so much fun and I am looking forward to adding images and links and much more. <FONT SIZE=7 COLOR="#8620D7" EFFECT="RELIEF"> <CITE><STRONG><U>
<MARQUEE SCROLLAMOUNT=10 SCROLLDELAY=0>
There are many things you can do with text using HTML
</MARQUEE></U></STRONG></CITE> </FONT>

</CENTER>
</BODY>
</HTML>

Now lets see how our page looks when we view it.

My HTML Webpage


Welcome to my Homepage. I learned to make this page with HTML and without the use of a page builder from Techniguy's Homepage Help Site.
I have learned many new things from Techniguy's Help Site and have enjoyed it all.

I never knew writing webpages with HTML could be so much fun and I am looking forward to adding images and links and more to this page.

There are many things you can do with text using HTML


Are we having fun yet? All these codes and numbers are making me dizzy. Let's look at some pictures......


BACK
NEXT




This page is written and Copyrighted by Techniguy
© 1999 All rights reserved.
©