<html>
<head>
<style>
#img1 {
position: absolute;
left: 0px;
top: 0px;
z-index: -1
}
</style>
</head>
<body>
<h1>This is a Heading</h1>
<img id="img1" src="bulbon.gif" width="100" height="180">
<button type="button" onclick="myFunction()">Change stack order</button>
<p>Default z-index is 0. Z-index -1 has lower priority.</p>
<script>
function myFunction() {
document.getElementById("img1").style.zIndex = "1";
}
</script>
</body>
</html>