-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.html
59 lines (57 loc) · 1.75 KB
/
game.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
<!DOCTYPE html>
<html>
<head>
<title>Snake Game</title>
</head>
<body>
<h1 class="heading" style="font-size: 25px">Welcome</h1>
<h2 class="heading" style="font-size: 20px">Let's start the game in 3 seconds....</h2>
<h3 id="Scores"><strong>Score : <div id="score">0</div></strong></h3>
<canvas id="board" width="500" height="500"></canvas>
<style>
#board
{
padding: 0;
margin: auto;
display: block;
}
#Scores
{
border: 2px;
border-style:solid;
border-color: black;
box-sizing: border-box;
width: 10%;
height: auto;
text-align: center;
margin-left:auto;
margin-right: auto;
background-color: black;
color: azure;
}
.heading
{
margin-left: auto;
margin-right: auto;
box-sizing: border-box;
width: 20%;
}
#foot
{
box-sizing: border-box;
margin-left: 75%;
border-color: black;
border: 2px;
border-style: solid;
background-color: #100f0f;
color: #adcfed;
padding-left: 2px;
padding-right: 2px;
}
</style>
<script src="script.js"></script>
</body>
<footer>
<p id="foot">This game is created by <strong>Swaroop Kumar Sahu</strong></p>
</footer>
</html>