Continuous Test Orchestration And Execution Platform Online

Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.

How to set a background image in HTML?

In HTML, adding a background image to your website is simple. You can use the HTML style attribute and the CSS background-image property.


<style>
body {
  background-image: url('lambdatest.png');
}
</style>

Following is the code for adding the background image on an HTML element.


<!DOCTYPE html>
<html>
<body>

<h2>Background Image</h2>

<p>A background image for a p element:</p>

<p style="background-image: url('lambdatest.png');">
Perform both manual <br>
and automated testing <br>
for websites <br>
and mobile applications.
</p>

</body>
</html>
LambdaTest

Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.

Start Free Testing
LambdaTest

Earn resume-worthy Selenium certifications that help you land a top job.

Learn More
LambdaTest

Test your web or mobile apps

Test orchestration and execution cloud of 3000+ browsers and OS

Support

24/7 support

Security

Enterprise grade security

Cloud

Fastest test execution cloud