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>
Updated on: 2020-01-30T08:55:46+05:30

150 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements