You can style the background of an element in one declaration with the background property. Values include attachment, color, image, position and repeat.
If you are using an image as a background, you can set it to scroll or fixed:
background-attachment: value;
Values:
The background-color property describes the background color of elements.
background-color: value;
Values include:
The element <body> contains all the content of an HTML document. Thus, to change the background color of an entire page, the background-color property should be applied to the <body> element. You can also apply background colors to other elements including headlines and text. For example,
h1 {
color:#990000;
background-color:#FC9804;
}
The background-image property is used to insert a background image.
background-image: url(path_to_image);
Values include:
To insert an image as a background image for a web page, simply apply the background-image property to
and specify the location of the image. For example,body {
background-color: #FFCC66;
background-image: url(“image.jpg”);
}
You can position a background image using the background-position property.
background-position: value;
Values include:
You can set if a background image is to repeat (across=x and/or down=y) the screen using the background-repeat property.
background-repeat: value;
Values include: