|
colour
The
size and color of text on an HTML document can be controlled by
using the FONT tag. You'll set color of text for the entire page
in the body tag, but you can enclose indivdual words, sentences,
or even sections of your page in between FONT tags.
<FONT> </FONT>
The FONT tag's
can effect several different aspects of the text you place between
them.
SIZE
and Color
However, you
will need to include what type of font you want displayed. You
do this by assigning it an
ATTRIBUTE
COLOR is an
Attribute, as is SIZE.
Every single
attribute must have a value. The value would be what color or size
you want your text to be.
Check out this
example then we'll talk about it.
<FONT
COLOR=RED> YOUR TEXT</FONT>
In this example,
FONT is the tag name, COLOR is the attribute, and RED is the value
of that attribute.
You could just
as easily use blue or yellow or green as the value of your color
attribute. If you want a fairly basic color, you can use it's name;
But if you're looking for a real off the wall color like Burlywood
Brown...Well, that's another matter altogether. In that case you'll
need to use it's HEXADECIMAL name.
Colours
Hexidecimal
Color names are six digit codes used to specify how much of the colors
RED, BLUE, and GREEN are in the desired color.
Here are the
hexidecimal codes for some of the more common colors:
| #FF0000 |
RED |
| #00FF00 |
GREEN |
| #0000FF |
BLUE |
| #00FFFF |
CYAN |
| #A020F0 |
PURPLE |
| #FFA500 |
ORANGE |
| #FFFF00 |
YELLOW |
| #A52A2A |
BROWN |
| #000000 |
BLACK |
| #FFFFFF |
WHITE |
You
can use the hexidecimal code in place of the color's name in your
font tag like this:
<
FONT COLOR="#FF0000">
Your Text </FONT>
Font
Size
Use the size
attribute just like the font color attribute, by inserting it into
your opening font tag
<FONT
SIZE=5> YOUR TEXT</Font>
When an HTML
tag accepts attributes, like the font tag does, you can put all
of it's attributes in the same tag. So in our font tag we can put
both the size and color attributes like this:
<FONT
SIZE=5 COLOR=#FF0000>
There are seven
font sizes you can use with 7 being the largest and 1 being the
teensiest.
SIZE=7
SIZE=6
SIZE=5
SIZE=4
SIZE=3
SIZE=2
SIZE=1
Font
Face
You
can also display your text in different font styles by inserting
<FONT FACE=ARIAL> YOUR TEXT</FONT>
or
altogether like this:
<FONT
SIZE=5 COLOR=#FF0000 FACE=ARIAL>
|
Times
New Roman
|
|
Courier
|
|
Arial
|
|
Verdana
|
|
Comic
|
To display:
Happy National Day
Everyone!!!
The code will
read: <font
size=4 color=#0000FF face=Verdana>Happy National Day Everyone!!!</b></font>
If you need
more help, you can visit
HTML:
An Interactive Tutorial for Beginners
Beginning HTML at htmlgoodies.com
webknowhow.net
HTML Crash
Course
Basic
HTML Tags
|