Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>HTML Style Object</h1> <h2>The background Property</h2> <button onclick="myFunction()">Set background</button> <script> function myFunction() { document.body.style.background = "#f3f3f3 url('img_tree.png') no-repeat right top"; } </script> </body> </html>