The background of your website is very important, so please spend some time with this tutorial. If you are aiming for a professional website, a good rule of thumb is to use a light background with dark text. However, if you're just making a website for pleasure, then any kind of color combination is acceptable.
With CSS, you are able to set the background color or image of any CSS element. In addition, you have control over how the background image is displayed. You may choose to have it repeat horizontally, vertically, or in neither direction. You may also choose to have the background remain in a fixed position, or have it scroll as it does normally. The following examples will show you how to implement all of these options.
As you have seen throughout Tizag Tutorials, many different background colors are present. These varying backgrounds were obtained without using tables! Below are a couple examples of CSS backgrounds.
h4 { background-color: white; } p { background-color: #1078E1; } ul { background-color: rgb( 149, 206, 145); }
This is a <h4> with a white background
This is a <p> with a background using the hexadecimal value of #1078E1
This is an unordered list
with an RGB value of 149, 206, 145