Exercise 1

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Light bulb</title>
</head>
<body>
    <button onclick="document.getElementById('onbtn').src='on.jpg'">Turn on the light</button>
    <img id = "onbtn" src="off.jpg" style="width:100px">
    <button onclick="document.getElementById('onbtn').src='off.jpg'">Turn off the light</button>
</body>
</html>

Comments

Popular posts from this blog

SET(A) Q1

Exercise 2

Exercise 4