Background Color

Section 1 - Introduction
Section 2 - Basics
      Your first page
      Formatting
      Text tricks
      Pictures
      Links
      Backgrounds
         Color tutorial
         Background Color
         Background Pictures
         Text Color
         Font
         Link Colors
         Text Decoration
         You Try It
Section 3 - Next Level
Section 4 - Advanced
Section 5 - Publishing
Section 6 - Extras
Appendices
Background Color
One of the easiest ways to add color to your document is by putting in a background color. Once upon a time, the automatic background color was a dull grey. On older browsers, if no color is specified, it still turns this hideous shade. On most modern browsers, the default color is white.

To change the background, you're going to add on to the <body> tag. You remember that one? All of the main text of the document goes between the body tags. For the first time, you're going to modivy that tag a bit. I'll show you what that looks like. It's easier than telling.
<body bgcolor="#00FF00">
And , of course, your </body> tag comes at the end of the document. The tag looks exactly as it did before, except it now has the command for background color. This is bgcolor for short. You can make the background of your document any color, but make sure the text shows up. You'll learn how to fix the text later in this lesson.
Code
<body bgcolor="#00FF00">
TEXT
</body>
What you see

TEXT

Back Home Forward