To select a text color in an HTML document, use the following tag:
<font color="#ff00ff">text to be displayed</font>

Example:
text to be displayed
A webpage's background is set using the color in the body statement.
<body bgcolor="#00ffff">
There can only be one body statement per html document.
As such, this method allows only one background color per document.
Replace 'f f f f f f' with numerics listed with the example color.
Most browsers now support the use of color names:
<font color="red">text to be displayed</font>

Example:
text to be displayed
The font command is being replaced by Cascading Style Sheets (CSS).
As a short term solution, the
span/class/style combination can be used.
<span class="font" style="color: maroon">
text to be displayed
</span>

Example:
text to be displayed
Using this method, the background color can also be specified:
<span class="font" style="color: yellow; background: blue">
text to be displayed </span>

Example:
text to be displayed
0 0 0 0 0 0 =
black
c 0 c 0 c 0 =
silver
8 0 8 0 8 0 =
gray
f  f  f  f  f  f  =
white *
8 0 0 0 0 0 =
maroon
f  f  0 0 0 0 =
red
8 0 0 0 8 0 =
purple
f  f  0 0 f  f  =
fuchsia
0 0 8 0 0 0 =
green
0 0 f  f  0 0 =
lime
8 0 8 0 0 0 =
olive
f  f  f  f  0 0 =
yellow
0 0 0 0 8 0 =
navy
0 0 0 0 f  f  =
blue
0 0 8 0 8 0 =
teal
0 0 f  f  f  f  =
aqua
*
White is black, so it can be seen against the background.