<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
    width: 500px;
    height: 500px;
    background: coral url('smiley.gif') no-repeat fixed center;
    color: white
}

</style>
</head>
<body>

<p>Click the "Try it" button to change the background property of the DIV element:</p>

<button onclick="myFunction()">Try it</button>

<div id="myDIV">
  <p>My DIV element</p>
</div>

<script>
function myFunction() {
    document.getElementById("myDIV").style.background = "url('smiley.gif') lightblue repeat-x center";
}
</script>

</body>
</html>