Creating the Memory Game

HTML Document

We'll start by creating a new HTML document - I called mine memory.htm, because that made it harder to forget what I was doing (I'll stop, I promise). The code for the document is very simple, and just contains a reference to an external Javascript file (memory-game.js in this example) and a Canvas element with and width of 300px and a height of 400px, and the ID game:

<!DOCTYPE html>
<html>
<head>

<script type="text/javascript" src="memory-game.js"></script>

</head>
<body>

<canvas id="game" width="300" height="400"></canvas>

</body>
</html>
Page loaded in 0.012 second(s).