-
Notifications
You must be signed in to change notification settings - Fork 263
/
index.html
31 lines (31 loc) · 1.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Tic Tac Toe</title>
<!-- link to CSS code -->
<link rel="stylesheet" href="tictactoe.css">
<!-- link to JavaScript code -->
<script src="scripts.js"></script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Welcome to Tic Tac Toe</h1>
<p>Get ready to play!</p>
<!-- uses the built-in onclick attribute to call the resetBoard function -->
<button onclick="resetBoard()" type="button" class="btn btn-primary btn-lg" name="button">Restart</button>
</div>
<table>
<tr>
<!-- the onclick calls a function called "handleClick" and passes itself to it -->
<td id='top-left' onclick="handleClick(this)" ></td>
<td id='top-middle'></td>
<td></td>
</tr>
<!-- @TODO create new rows and cells for the rest of your TTT board. -->
<!-- @TODO give each new cell an id & an event listener to call the "handleClick" function -->
</table>
</div>
</body>
</html>