set a url as a background image code example

Example 1: css background image

background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;

Example 2: inserting a image in html backgound

<html>
  <style>
	body
      {
      background-color: url('url from web'); /* replace "url from the web" with your url*/
      }
  </style>
  <body>
    <!-- Your body displayed with the picture-->
    <h1></h1> 
  </body>  
</html>

Example 3: how to embed a url in html for background

div {
   /* Background pattern from Toptal Subtle Patterns */
   background-image: url("https://amymhaddad.s3.amazonaws.com/morocco-blue.png");
   height: 400px;
   width: 100%;
}

Tags:

Misc Example