The Essential Guide to HTML5

(Greg DeLong) #1

INDEX


src attribute, 5, 18
starting tag, 4, 19
starttime variable, 148, 176
startwall function, for mazes sample, 220, 233
statements, 11
steps array, for Hangman game sample, 300
storage/retrieval (sample) application, 224–230
stretchwall function, for mazes sample, 233
string values, 27
strings
character, vs. numbers, 77
quotation marks (" ") and, 5, 28, 75
stroke method, paths and, 299
strokeRect function, 71
style element, 8, 189
submit element, 38
substr method, 188
substring method, 187
sw string variable, 230
swalls variable, 231
swapindeck function, for blackjack card game
sample, 328, 331
switch statement, 24, 28
blackjack card game sample and, 329
craps game sample and, 55
sx property
intersection and, 222, 230
position and, 102, 147, 154
sy property
intersection and, 222, 230
position and, 102, 147
syntax, 5, 11


T
tablecolor variable, 150
tags, 1, 4–10, 19. See also elements
target variable, 103, 110
tev variable, 77
text
drawing, 149–151, 167
form input and, 79
output, form element for, 38
text-align property, 8, 330
text editors, 11, 95
text feedback, quiz sample and, 190
textContent, 300, 301
TextPad text editor (for the PC), 11


TextWrangler text editor (for the Mac), 11
this keyword, 102, 188
Hangman game letters and, 301
rock-paper-scissors game throws and, 263
throw function for rock-paper-scissors game
sample, 263, 264, 275
throwdice function
for complete craps game sample, 55
for two-die throws, in craps game sample, 47
tid variable, 270
time. See date and time
timing events, 76–77
title element, 4
toggles, 153
token, for mazes
collision detection and, 222–224
defining, 219
token function for, 219, 232, 246
top value, 31
translations, for drawings, 103–107
triangles, polygons and, 151
try... catch statement, errors and, 226, 230

U
underscore (_), 297
URLs (Universal Resource Locators), 5
absolute/relative, 18
input validation and, 79

V
validation, for form input. See input validation
value, local storage and, 224
values, types of, 27
var statements, 25, 71
variables, 25
global, 26
naming conventions for, 25
vertical displacement, ballistics simulation and,
100
vertical value, 31, 79
video
HTML5 and, 179, 184, 191–193, 210
in quiz sample, 179, 182, 191–193, 201, 210
support for, 128
upload considerations for, 210
video element, for quiz sample, 189, 191–193
Free download pdf