The Essential Guide to HTML5

(Greg DeLong) #1

INDEX


customizing, 315
rules of the game, 287
shapes for, 298
testing/uploading, 315
word list for stored in external script, 295
head element, 4, 7, 187, 317, 330
script element within, 10
style element within, 8
heading elements (h1-h6), 7
height attribute
canvas and, 30
for img elements, 5
hold variable, 328
holder variable, 152
holderimg variable, 152
holderinfo variable, 152
horizontal displacement, ballistics simulation
and, 100, 106
horizontal value, 31, 79
househand array, for blackjack card game
sample, 324
href attribute, 19
htaccess file, 210
htarget variable, 103, 110
HTML
angle brackets (< >) and, 270
dynamic generation and, 184, 186–189
structure of, 4–10, 29
tags for. See elements
html element, 4
.html files, 12
HTML5
audio/video support and, 128
basic HTML structure and, 1–10
blackjack card game sample and, 323–330
bouncing ball sample and, 70–80
button element new with, 38
cannonball sample and, 101–111
canvas element new with, 21, 29
craps game sample and, 24–38
element types new with, 8
features of, 2
footer element new with, 317, 330
Hangman game sample and, 295–302
header element new with, 317, 330
local storage and, 214, 224–231
mazes sample and, 219–232
memory game sample and, 146–154


naming conventions and, 103
official web site of, 10
quiz sample and, 184–193
regular expressions and, 80
rock-paper-scissors game sample and,
263–274
slingshot sample and, 101–111
video and, 179, 184, 191–193, 210
hue variable, 73, 75
hyperlink element, 5
hyperlinks
a element for, 5
favorite web sites sample illustrating, 2–19
Hypertext Markup Language. See entries at
HTML

I
I/O (input-output), 24
id attribute, 10
if statement, 24, 27
blackjack card game sample and, 324
craps game sample and, 55
Hangman game sample and, 301
preventing cheating and, 153
while loop and, 326
image files, 5, 18
Image function, 71
Image objects, 71, 110, 323
images
blackjack card game sample and, 323
drawing on the canvas, 71
memory game and, 141, 145, 147, 166
target, replacing one with another, 99, 101,
110
img element, 5, 18, 71
inboxboundx/inboxboundy variables, bouncing
ball sample and, 78
increase function, 77
indenting code, 4
index variable, 323
info property, memory game sample and, 152
init function, 27
for blackjack card game sample, 330
for bouncing ball sample, 71, 76, 80
for cannonball sample, 111, 118
for Hangman game sample, 302
for mazes sample, 232, 246
Free download pdf