Now let’s look at a few options you can add to the <body> tag — attributes for text color and background color. The attribute name for a background color is bgcolor, and the attribute name for text color is simply text. You add these options to the body tag like this:

<body bgcolor="#ffffff" text="#000000">

This sets the background color to white and the text color to black. The number sign followed by the 6-digit (or hexadecimal) alphanumeric code indicates RGB (red-green-blue) color values, which is how monitors display color variations. There are several websites where you can test various colors and record their hexadecimal values. Noted web author Lynda Weinman has a browser-safe color page that lists both hexadecimal and RGB color values.

There are also several plain-text color names that can be used.

<body bgcolor="white" text="black">

This code produces the same result as the tag used in the previous paragraph. The plain-text color names that can be used are: black, white, aqua, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, and yellow.