Home > OS >  how to add background image in a webpage by using css
how to add background image in a webpage by using css

Time:12-07

which tag and css we will use for adding background image and how remake it's size full length I have tried by using external css in html of head section background-image: url() ;

CodePudding user response:

You have two options: either create it in your in CSS or read the documentation in w3school.

example :

<html>
<head>
<style>
   body {
    background: url(https://cdn.urldecoder.org/assets/images/url-fb.png);
    background-repeat: no-repeat;
    background-size: 100% 100vh;
  </body>
</head>
<body>

<p>hello</p>

</body>

CodePudding user response:

<html>
<body>
<style>
    body {
      background: url(# write the address of image);
      background-size: 100%;
    }
</style>

<p>HOPE IT HELPS !</p>
</body>
  • Related