Background

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<>, initial-scale=1.0">
    <title>Document</title>
 <style>
body{
    background-color: #323275;
    background-image: url('img/goldencar.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 500px;
    width: 500px;
    background-attachment: fixed;
}

 </style>
</head>
<body>  
    <pre class="div"  >
        This chapter teaches you how to set backgrounds of various HTML elements. You
        can set the following background properties of an element:
         The background-color property is used to set the background color of an
        element.
         The background-image property is used to set the background image of
        an element.
         The background-repeat property is used to control the repetition of an
        image in the background.
         The background-position property is used to control the position of an
        image in the background.
         The background-attachment property is used to control the scrolling of
        an image in the background.
         The background property is used as a shorthand to specify a number of
        other background properties.<br>
        This chapter teaches you how to set backgrounds of various HTML elements. You
can set the following background properties of an element:
 The background-color property is used to set the background color of an
element.
 The background-image property is used to set the background image of
an element.
 The background-repeat property is used to control the repetition of an
image in the background.
 The background-position property is used to control the position of an
image in the background.
 The background-attachment property is used to control the scrolling of
an image in the background.
 The background property is used as a shorthand to specify a number of
other background properties.
This chapter teaches you how to set backgrounds of various HTML elements. You
can set the following background properties of an element:
 The background-color property is used to set the background color of an
element.
 The background-image property is used to set the background image of
an element.
 The background-repeat property is used to control the repetition of an
image in the background.
 The background-position property is used to control the position of an
image in the background.
 The background-attachment property is used to control the scrolling of
an image in the background.
 The background property is used as a shorthand to specify a number of
other background properties.
This chapter teaches you how to set backgrounds of various HTML elements. You
can set the following background properties of an element:
 The background-color property is used to set the background color of an
element.
 The background-image property is used to set the background image of
an element.
 The background-repeat property is used to control the repetition of an
image in the background.
 The background-position property is used to control the position of an
image in the background.
 The background-attachment property is used to control the scrolling of
an image in the background.
 The background property is used as a shorthand to specify a number of
other background properties.
    </pre>



</body>
</html>

Comments