previous

page 10

next

Now that we have our word4_sets.js file we're ready to make the game itself.
Start a new file, index.html and populate it with the required basic html

<html>
<head>
<title>Words 4</title>
<link rel='stylesheet' href='styles.css'>
<script src='word4_sets.js'></script>
</head>
<body>
</body>
</html>

We start by making the grid. It requires 4 rows each of 4 cells. The numbers are the id values I plan to use.

Each row and each cell will simply be a div. Give each row the class, 'row' and each cell the class, 'cell'.

We could use JavaScript loops but I think it's easier to understand if we write out each line in html.

My effort is on the next page.

"But we don't want those four cells in the centre", I hear you say.
Quite right! We'll simply make them invisible using CSS !

previous
next