skunkbear
CSS already? Background Colors!

After you check out Your first webpage you can write a white web page with all sorts of black letters on it. A white background isn't always that fun though is it? You can easily change the color with a little style, CSS style that is. Forget the "CSS" is even there. It stands for cascading style sheets, which I'll tell you more about later. Just know that for now CSS is used to change the style of something on a webpage.
So in the first web page we included this code:
The reason our page is white is because it has a white body. The background-color of the body is set to white as the default, but you can change it by putting changing the background-color using style in the body tag like so:
That code will change the background color to blue. Just don't forget the quotes. Bascially it reads like: the body's style includes a background color set to blue. You can write common colors just like that in plain English. You can also pick any color you like at ColorPicker.com. It will let you select a color and then give you a color code that you can copy and paste. I picked a nice green color and put it in this code:
and here is the code again with the necessary HTML tags around it to make it a full webpage:


Make sure that if you are using a color code instead of plain English, you put a # sign before the color code. Now you can change the background of your page to any color you like!

submit to reddit

More: CSSstylebackground-color color code

Source: Seth | 2012-05-10

Recent Posts:

Repeating background image

Don't forget to comment your work

Layout your webpage using divs

Link it together

Images- the img tag