HTML and CSS Reference
In-Depth Information
}
Close the function
</script>
Close the script
element
Close head element
</head>
<body onLoad="init();">
Body tag, set up init
<canvas id="canvas" width="900" height="400">
Canvas start tag
Your browser doesn't support the HTML5 element canvas.
Warning message
</canvas>
Close canvas
element
<br/>
Line break before
instructions
Click on two cards to see if you have a match.
Instructions
<form name="f">
Form start tag
Number of matches: <input type="text" name="count" value="0"
size="1"/>
Label and input
element used for
output
<p>
Paragraph break
Time taken to complete puzzle: <input type="text"
name="elapsed" value=" " size="4"/> seconds.
Label and input
element used for
output
</form>
Close form
Close body
</body>
</html>
Close html
You can change this game by changing the font, font size, color , and background color for the form. More
ways to make the application your own are suggested later in this section.
The version of the memory game that uses pictures has much the same structure as the polygon version.
It doesnt require a separate function to draw the picture. Table 5-3 is the function listing for this version
of the game.
 
Search WWH ::




Custom Search