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

Updated on: 2020-01-30T08:55:46+05:30

128 Views

Kickstart Your Career

Get certified by completing the course

Get Started