<html>
<head><title>DOM Example</title></head>
<body>
<h1> hello world</h1>
<h1 id= "line2" onclick="style.color='red'">Click on this text tochange the color</h1>
<h1 onclick="window.document.bgColor='blue'">
Click on this to change the background color</h1>
<h1 onclick="window.document.all[4].style.color='green'">
Click on this to make hello world green</h1>
<h1 onclick="line2.style.color='green'">
Click on this to make line2 green</h1>
</body>
</html>