Practice listening for and handling JavaScript DOM Events
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Stoplight Exercise</title>
|
|
|
|
<script defer src="script.js"></script>
|
|
|
|
<link rel="stylesheet" href="styles.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="controls">
|
|
|
|
<h1 id="stopButton" class="button">Stop</h1>
|
|
|
|
<h1 id="slowButton" class="button">Slow</h1>
|
|
|
|
<h1 id="goButton" class="button">Go</h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="traffic-light">
|
|
|
|
<div id="stopLight" class="bulb"></div>
|
|
|
|
<div id="slowLight" class="bulb"></div>
|
|
|
|
<div id="goLight" class="bulb"></div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|