Introduction: 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.
Cascading Style Sheets properties
allow authors to specify the foreground color and background of an element.
Backgrounds may be colors or images. Background properties allow authors to
position a background image. Backgrounds
are a core part of
Cascading Style Sheets.In
this article we will cover the basics of using
Cascading Style
Sheets backgrounds including
properties such as background attachment.
Some properties of CSS background
background-color:
specifies the solid color to fill the background with.background-image:
calls an image for the background.background-position:
specifies where to place the image in the element background.background-repeat:
determines whether the image is
tiled.background-attachment:
determines whether the image scrolls with the page.
Example:
Code:

Output:

Summary:
In this program
using Cascading Style Sheets set the background of web page.