Usage of background-image property in CSS


The background-image property is used to set the background image of an element.

Example

You can try to run the following code to learn how to work with the background-image property:

<html>
   <head>
      <style>
         body {
            background-image: url("/latest/inter-process-communication.png");
            background-color: #cccccc;
         }
      </style>
      <body>
         <h1>Hello World!</h1>
      </body>
   </head>
<html>

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 30-Jan-2020

89 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements