The <FONT> and </FONT>
tags may use three attributes (i.e.,
size, color,
and face) to format the
text between them.
The size attribute of the
<FONT size=value>
and </FONT> tags
controls how large or small text appears between them.
The value of the size attribute is
either an actual text size (from 1 to 7)
or relative to the default body text size (i.e, 3).
Click here to review
how the following document appears in a Web browser.
<HTML> <HEAD> <TITLE>Enter the Page Title
Here</TITLE> </HEAD> <BODY> <FONT
size=1>This text is in size=1</FONT><BR>
<FONT size=2>This text is in size=2</FONT><BR>
<FONT size=3>This text is in size=3</FONT><BR>
<FONT size=4>This text is in size=4</FONT><BR>
<FONT size=5>This text is in size=5</FONT><BR>
<FONT size=6>This text is in size=6</FONT><BR>
<FONT size=7>This text is in size=7</FONT><BR>
<FONT size=+4>This text is in size=+4</FONT><BR>
<FONT size=+3>This text is in size=+3</FONT><BR>
<FONT size=+2>This text is in size=+2</FONT><BR>
<FONT size=+1>This text is in size=+1</FONT><BR>
<FONT size=-1>This text is in size=-1</FONT><BR>
<FONT size=-2>This text is in size=-2</FONT><BR>
</BODY> </HTML> |
The color attribute of
the <FONT color=value>
and </FONT> tags
defines the color of text appears between them.
The value of the color attribute is
either a predefined color or the corresponding hexadecimal
representation.
Some of the popular predefined colors include: black, red, blue, green,
white, cyan, magenta, and yellow.
Color |
Hexadecimal Value |
Color |
Hexadecimal Value |
Black |
#000000 |
White |
#FFFFFF |
Red |
#FF0000 |
Cyan |
#00FFFF |
Blue |
#0000FF |
Magenta |
#FF00FF |
Green |
#00FF00 |
Yellow |
#FFFF00 |
Click here to review
how the following document appears in a Web browser.
<HTML> <HEAD> <TITLE>Enter the Page Title
Here</TITLE> </HEAD> <BODY bgcolor=#999999>
<FONT color="black">This
text is in black</FONT><BR>
<FONT color="red">This
text is in red</FONT><BR>
<FONT color="blue">This
text is in blue</FONT><BR>
<FONT color="green">This
text is in green</FONT><BR>
<FONT color="white">This
text is in white</FONT><BR>
<FONT color="cyan">This
text is in cyan</FONT><BR>
<FONT color="magenta">This
text is in magenta</FONT><BR>
<FONT color="yellow">This
text is in yellow</FONT><BR>
<FONT color=#000000>This text is
in black</FONT><BR> <FONT
color=#FF0000>This text is in red</FONT><BR>
<FONT color=#0000FF>This text is
in blue</FONT><BR> <FONT
color=#00FF00>This text is in green</FONT><BR>
<FONT color=#FFFFFF>This text is
in white</FONT><BR> <FONT
color=#00FFFF>This text is in cyan</FONT><BR>
<FONT color=#FF00FF>This text is
in magenta</FONT><BR>
<FONT color=#FFFF00>This text is
in yellow</FONT><BR>
</BODY> </HTML> |
Note that the background color of this example Web page is also set to
#999999 by using the bgcolor
attribute of the <BODY> and
</BODY> tags.
The face attribute of the
<FONT face=value>
and </FONT> tags
declares which typeface to use for the text between them.
The value of the face attribute is
the name of the typeface preferred. If the declared typeface is not installed
in the system where the browser resides, the declared typeface is ignored.
Click here to review
how the following document appears in a Web browser.
<HTML> <HEAD> <TITLE>Enter the Page Title
Here</TITLE> </HEAD> <BODY> <FONT
face="Arial">This text is in Arial</FONT><BR>
<FONT face="Courier New">This
text is in Courier New</FONT><BR>
<FONT face="Times New Roman">This
text is in Times New Roman</FONT><BR>
</BODY> </HTML> |
Different attributes of the <FONT> and </FONT>
tags can be mixed to format text.
Click here to review
how the following document appears in a Web browser.
<HTML> <HEAD> <TITLE>Enter the Page Title
Here</TITLE> </HEAD> <BODY> <FONT
size=6 color="red" face="Arial">This
text is in size 6 red Arial</FONT><BR>
</BODY> </HTML> |
The <BASEFONT size=value>
tag changes the entire document's basic font size. The
standard browser text size is 3, and the value
of the size attribute can range from 1
to 7.
|