Press "Enter" to skip to content

Background Examples in CSS

Last updated on October 5, 2019

Definition :

Which is meant for when we have to give the background color to the content.

Program :

<html>

<style type=”text/css”>

div

{

 background:#ff00aa url(“unnamed.jpg”) no-repeat right top;

 width:500px;

 border:5px;

 height:500px;

}

</style>

                                <body>

<div>HELLO</div>          

                                </body>

</html>                              

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *