-
Notifications
You must be signed in to change notification settings - Fork 4
/
1-tictactoe.html
62 lines (56 loc) · 1.51 KB
/
1-tictactoe.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>JavaScripTacToe</title>
<style>
body {
margin: 1rem auto;
padding: 3rem;
font-family: sans-serif;
}
header {
width: 50%;
margin: 1em auto;
}
#board {
max-width: 50%;
margin: 1em auto;
display:grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-gap: 1rem;
background-color: teal;
}
.square {
min-height: 1.3em;
text-align: center;
background-color: white;
font-size: 5rem;
font-family: monospace;
color: black;
}
</style>
</head>
<body>
<header>
<h1>Tic Tac Toe</h1>
<h2>A game you know</h2>
<div id="players">
<p id="p1" class="player">Player <span id="p1-symbol">X</span>: <span id="p1-name">Anjana</span></p>
<p id="p2" class="player">Player <span id="p2-symbol">O</span>: <span id="p2-name">Marc</span></p>
</div>
</header>
<div id="board">
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
</div>
</body>
</html>