Please note that index links point to page beginnings from the print edition. Locations are approximate in e-readers, and you may need to page down one or more times after clicking a link to get to the indexed material.
A
<a> tag, 58
AAC codec, 214
<abbr> tag, 71
abbreviations, 71
absolute URLs, 55
<acronym> tag, 71
action attribute, 61
addColorStop( ) function, 115–120
<address> tag, 72
Ajax technology, 60
align attribute
tables, 45–46
alphabetic value for text, 129
alt attribute, 36
ampersands (&) for query strings, 57
anchors for hyperlinks, 59–60
Android operating system
audio support, 214
video support, 220
angle brackets (<>) for tags, 8
angles for rotation, 174–176
appendChild( ) method, 232
Apple iOS operating system
audio support, 214
video support, 220
<applet> tag, 72
arc( ) function, 144–147
arcTo( ) function, 147–149
<area> tag, 72
attributes overview, 8–9
audio, 213
<audio> and <source> tags, 215–217
codecs, 213–214
overview, 93–94
audio.swf Flash player, 216
autocomplete attribute, 92, 194
autoplay attribute
audio, 216
video, 221
B
<b> tag, 24
background processing, 95, 227–229
<base> tag, 73–74
<bdo> tag, 74
beginPath( ) function, 137
Berners-Lee, Timothy, 3–4
bezierCurveTo( ) function, 150–151
bgcolor attribute
fonts, 30
tables, 45
Bing maps, 190
<blockquote> tag, 75–76
blur for shadows, 157
body sections, 19
comments, 19–20
<div> and <span> tags, 20–21
headings, 21–22
line breaks, 22–23
paragraphs, 22
text emphasis, 24–26
<body> tag, 16
bold text, 24
border attribute
images, 36
tables, 45
bordercolor attribute, 45
bottom value for text, 129
<br> tag, 22–23
browsers
invention of, 3
video support, 220
<button> tag, 64–65
C
canvas
accessing, 105–106
<canvas> tag, 104–105
compositing and transparency, 167–171
converting to images, 106–108
curves, 144–151
gradients, 114–120
images, 153–156
JavaScript overview, 97–104
lines, 135–137
overview, 88–90
paths, 137–143
patterns, 120–123
pixel editing, 159–164
rectangles, 111–114
shadows, 156–159
as source image, 156
text. See text
transformations, 170–181
<caption> tag, 48
Cascading Style Sheets (CSS)
description, 9
emphasis, 26
images, 39
including, 13–14
cellpadding attribute, 45
cellspacing attribute, 45
checkbox attribute, 63
Chrome browser
audio support, 214
video support, 220
citations, 76
<cite> tag, 76
class attribute, 9
clear attribute
images, 40
line breaks, 23
clearRect( ) function, 113
clip( ) function, 140–143, 159
closePath( ) function, 137
cm font units, 126
<code> tag, 77–78
codecs
audio, 213–214
video, 219–223
<col> tag, 78
<colgroup> tag, 78
color
canvas, 107
columns, 78
curves, 148
fills, 112–113
form input, 201
images, 36
pixels. See pixel editing
rectangles, 111–113
tables, 45
text, 130–132
color input type, 201
colspan attribute, 49–52
columns in tables, 45–52
comments
conditional, 70
inserting, 19–20
JavaScript, 103
comparisons, 70
compositing, 167
globalAlpha property, 169–170
globalCompositeOperation property, 167–169
conditional HTML, 69–82
controls attribute
audio, 216
video, 221
converting
canvas to images, 106–108
degrees to radians, 176
cookies, 93
coordinates
arcs, 144
copy value for compositing, 169
createImageData( ) function, 164
createLinearGradient( ) function, 114–117
createPattern( ) function, 121–123, 133
createRadialGradient( ) function, 117
cross-document messaging, 210–212
CSS (Cascading Style Sheets)
description, 9
emphasis, 26
images, 39
including, 13–14
curves, 144
arc( ), 144–147
arcTo( ), 147–149
bezierCurveTo( ), 150–151
quadraticCurveTo( ), 149–150
D
darker value in compositing, 169
data lists for forms, 92–93
data[] array, 160–161
<datalist> tag, 196–197
date input type, 201
date pickers, 201–202
datetime input type, 202
datetime-local input type, 202
<dd> tag, 44
defaults
audio support, 214
fonts, 74
gradients, 114
image alignment, 40
image size, 36
image type, 108
lists, 42–44
paragraph spacing, 22
video support, 220
definition lists, 44
degrees, 176
denied( ) function, 187
destination-atop value, 169
destination-in value, 169
destination-out value, 169
destination-over value, 169
<dfn> tag, 71
dir attribute, 74
<dir> tag, 78
direction
text, 74
<div> tag
geolocation, 188
overview, 20–21
<dl> tag, 44
DNS (Domain Name System), 7
<!DOCTYPE> declarations, 11–12
DOM (Document Object Model), 97–98
Domain Name System (DNS), 7
dots (.) in relative URLs, 58
double quotation marks (") in tags, 8
drag and drop support, 231–232
drawImage( ) function, 153–156
<dt> tag, 44
E
em font units, 126
<em> tag, 25
email input type, 203
<embed> tag, 94
emphasis for text, 24–26
enctype attribute, 61
equal signs (=) in attributes, 8
events
drag and drop, 231–232
web workers, 228–229
ex font units, 126
exclamation points (!) in comments, 19, 70
extending rows and columns, 49–52
F
<fieldset> tag, 79
fill( ) function, 140
fillRect( ) function, 90, 111–112, 116
fillstyle property, 112–113
fillText( ) function, 129–133
Firefox browser
audio support, 214
video support, 220
Flash programming environment, 213–214
flowplayer.swf files, 222–223
font property, 125–126
fonts. See also text
color, 30–33
font property, 125–126
size units, 126
form attribute, 194–195
formenctype attribute, 195
formmethod attribute, 195
formnovalidate attribute, 92, 196, 198
forms
autocomplete attribute, 194
autofocus attribute, 194
<button> tag, 64–65
creating, 60–62
date and time pickers, 201–202
fields, 79
form attribute, 194–195
HTML5 enhancements, 92–93
input types, 200–204
<input> tag, 63
JavaScript for, 99–108
<label> tag, 65
name attribute, 63
new attributes, 193
overrides, 195–200
<select> tag, 64
<textarea> tag, 64
value attribute, 63
<forms> tag, 61
frames, 65–66
G
gateways, 5
geolocation
document example, 188–190
geolocation property, 186
getCurrentPosition( ), 186–187
GPS service, 191–192
JavaScript for, 185–190
overview, 90–91
geolocation property, 186
Get requests, 7
getContext( ) function, 106
getCurrentPosition( ) function, 186–187
getElementById( ) function, 100
getImageData( ) function, 159–160
getItem( ) function, 208
.gif images, 36
Global Positioning Systems (GPS), 91, 191–192
globalAlpha property, 169–170
globalCompositeOperation property, 167–169
Google Android operating system
audio support, 214
video support, 220
Google Chrome browser
audio support, 214
video support, 220
Google maps, 188–190
GPS (Global Positioning Systems), 91, 191–192
gradients
addColorStop( ), 117–120
createLinearGradient( ), 116–117
createRadialGradient( ), 117
creating, 114–116
text, 130–131
granted( ) function, 186–187
greater than signs (>) in comments, 19, 70
H
<h1> tag, 21–22
H.264 codec, 220
hanging value for text, 129
<head> tag, 13
headings, 21–22
height attribute
canvas, 105
forms, 196
images, 36
tables, 45–46
video, 221
hexadecimal digits for color, 33
hidden attribute, 63
horizontal rules, 80
<hr> tag, 80
.htaccess file, 230
.htm and .html extensions, 6
<html> tag, 12–13
HTML5 overview, 87
HTTP (Hyper Text Transfer Protocol), 4–5
hyperlinks
query strings, 56–57
relative URLs, 57–58
hyphens (-) in comments, 19, 70
I
<i> tag, 25
id attribute, 9
ideographic value for text, 129
ids for form access, 100
if statements, 70
Image( ) function, 121
images
canvas as source, 156
converting canvas to, 106–108
displaying, 36–40
drawImage( ), 153–156
URLs in, 59
imagetype argument, 108
<img> tag, 36–40
in font units, 126
input types in forms, 200–204
Internet Explorer browser
audio support, 214
conditional HTML for, 69–82
local documents, 12
video support, 220
inverting images, 163
IP (Internet Protocol) addresses for geolocation, 191
<isindex> tag, 81
isPointInPath( ) function, 143
italic text, 25
J
JavaScript, 88
form element access from, 99–108
for geolocation, 185–190
incorporating, 14–15
overview, 97–99
joined lines, 136–137
.jpg images, 36
K
<kbd> tag, 78
L
<label> tag, 65
lat setting for geolocation, 190
layout, 11
<body> tag, 16
<!DOCTYPE> declarations, 11–12
<head> tag, 13
<html> tag, 12–13
JavaScript, 14–15
metadata, 15–16
style sheets, 13–14
<title> tag, 13
<legend> tag, 79
less than signs (<) in comments, 19, 70
<li> tag, 42
lighter value, 169
line breaks, 22–23
linear gradients, 114–116
lineCap property, 136
lineJoin property, 136–137
lines
lineCap property, 136
lineJoin property, 136–137
miterLimit property, 137
lineTo( ) function, 137–138
<link> tag, 14
links
query strings, 56–57
relative URLs, 57–58
lists
building, 41–43
defaults, 43–44
definition, 44
local documents in Internet Explorer, 12
long setting for geolocation, 190
loop attribute
audio, 216
video, 221
lossless codecs, 214
lowercase style, 23
lt keyword, 70
M
MAC (Media Access Control) addresses for geolocation, 191
mapTypeId setting for geolocation, 190
The Mark of the Web, 71
Media Access Control (MAC) addresses for geolocation, 191
<menu> tag, 81
messaging, cross-document, 210–212
<meta> tag, 15–16
metadata, 15–16
method attribute, 61
methods, 101
metrics object, 133–134
middle value for text, 129
MIME (Multipurpose Internet Mail Extensions), 229
miterLimit property, 137
mm font units, 126
month input type, 202
moveTo( ) function, 137–138
Mozilla Firefox browser
audio support, 214
video support, 220
MP3 codec, 214
MP4 codec, 219
Multipurpose Internet Mail Extensions (MIME), 229
N
name attribute
forms, 63
hyperlinks, 59–60
named colors, 31–32
negative images, 163
new keyword, 121
<noframes> tag, 65
no-repeat type for patterns, 121–122, 133
not operator, 70–71
novalidate attribute, 198
number input type, 203
numbers for color, 33
O
O( ) function, 101–102
offline web applications, 229–231
<ol> tag, 42
ondragover events, 231–232
ondragstart events, 231–232
ondrop events, 231–232
onload events, 121–122, 132, 154, 160
onmessage event, 228–229
Opera Firefox browser
audio support, 214
video support, 220
<optgroup> tag, 81–82
option groups, 81–82
ordered lists, 41–42
origin, canvas, 177
P
<p> tag, 22
paragraphs, 22
password attribute, 63
paths, 137
beginPath( ) and closePath( ), 137
clip( ), 140–143
fill( ), 140
isPointInPath( ), 143
moveTo( ) and lineTo( ), 137–138
rect( ), 139
stroke( ), 138
patterns
canvas, 120–123
regular expressions, 199
pc font units, 126
PCM codec, 214
percentages for font units, 126
periods (.) in relative URLs, 58
pixel editing, 159
createImageData( ), 164
data[] array, 160–161
getImageData( ), 159–160
putImageData( ), 161–164
.pl and .php extensions, 7
placeholder attribute, 93, 199–200
.png images, 36
Post requests, 7
poster attribute, 221
postMessage( ) function, 210–212
pound symbol (#)
color, 33
hyperlink anchors, 59
preload attribute
audio, 216
video, 221
programming code, 77–78
proxies, 5
pt font units, 126
putImageData( ) function, 161–164
px font units, 126
Q
<q> tag, 75–76
quadraticCurveTo( ) function, 149–150
query strings for hyperlinks, 56–57
question mark character (?) in query strings, 57
QuickTime media player, 214
quotations, 75–76
R
radial gradients, 117
radian offsets for arcs, 144
radians, 174–176
radio attribute, 63
radius in arcs, 144
range input type, 203
rect( ) function, 139
rectangles
clearRect( ), 113
fillRect( ), 112
fillstyle property, 112–113
rect( ), 139
scaling, 171–173
strokeRect( ), 113–114
regular expressions, 199
relative URLs, 57–58
removeItem( ) function, 208–210
repeat type for patterns, 121
repeat-x type for patterns, 121–122
repeat-y type for patterns, 121–122
request/response sequence, 6–7
required attribute, 200
restore( ) function, 172–174
retrieving local storage, 208–209
road maps, 190
rotate( ) function, 174–176
routers, 5
rows in tables, 45–52
rowspan attribute, 49–52
S
S( ) function, 102–104
<s> tag, 25
Safari browser
audio support, 214
form support, 197–199
video support, 220
<samp> tag, 78
satellite maps, 190
save( ) function, 172–174
scale( ) function, 170–174
search input type, 204
security zones, 71
<select> tag, 64
serving pages, 5
setData( ) method, 232
setInterval( ) function, 231
setItem( ) function, 208–209
setTransform( ) function, 181
shadowBlur value, 157
shadowColor value, 157
shadowOffsetX value, 156
shadowOffsetY value, 157
shadows, 156–158
shearing squares, 179–180
single quotation marks (’) in tags, 8
size
images, 155
slash (/) characters
in tags, 8
in URLs, 58
<source> tag
audio, 215–217
video, 220–222
source-atop property, 169
source-in property, 168
source-out property, 168
source-over value, 167–168
spaces in tags, 62
<span> tag, 20–21
src attribute
audio, 216
images, 36
video, 221
start attribute, 43
<strike> tag, 25
strikethrough text, 25
stroke( ) function, 138
strokeRect( ) function, 113–114
strokeText( ) function, 127
<strong> tag, 25
style attribute, 9
description, 9
emphasis, 26
images, 39
including, 13–14
<style> tag, 14
submit attribute, 63
T
<table> tag, 45–46
tables
creating, 44–45
tags
attributes, 8–9
description, 8
target attribute in hyperlinks, 59
<td> tag, 45–46
tel input type, 204
text
centering, 76
citations, 76
deleted, 79
direction, 74
emphasis, 24–26
fillText( ), 129–133
font property, 125–126
font size units, 126
programming code, 77–78
quotations, 75–76
size, 75
strokeText( ), 127
textAlign property, 127–128
textBaseline property, 129
width, 133–134
text attribute, 63
textAlign property, 127–128
<textarea> tag, 64
textBaseline property, 129
<th> tag, 47
Theora codec, 220
time input type, 202
time pickers, 201–202
title attribute, 9
<title> tag, 13
toDataURL( ) function, 107–108
top value for text, 129
<tr> tag, 45–46
transform( ) function, 178–180
transformations, 170
rotate( ), 174–176
scale( ), 170–174
setTransform( ), 181
transform( ), 178–180
translate( ), 176–177
translate( ) function, 176–177
transparency, 169–170
<tt> tag, 78
type attribute
audio, 216
forms, 93
lists, 43
video, 221
U
<u> tag, 26
<ul> tag, 43
underlined text, 26
unordered lists, 42–43
url input type, 204
URLs (Uniform Resource Locators)
absolute, 55
Get requests, 7
in images, 59
relative, 57–58
request/response sequence, 6–7
V
value attribute, 63
versions, testing for, 70–71
video, 219
codecs, 219–223
overview, 93–94
<video> tag
new, 93–94
video support, 220–222
Vorbis codec, 214
VP8 codec, 220
W
web applications
description, 95
offline, 229–231
web messaging, 210–212
WebM codec, 220
week input type, 202
width and width attribute
canvas, 105
forms, 196
images, 36
lines, 135
tables, 45–46
text, 133–134
video, 221
X
X coordinates for arcs, 144
xor value, 169
Y
Y coordinates for arcs, 144
Z
zoom setting for geolocation, 190
18.117.189.157