A B C D E F G H I J K L M N O P Q-R S T U V W X-Y-Z
block-level linking, 295-296
changes to, 294-295
link types, 300
placeholder links, 296-297
about attribute, 269
absolute positioning, 38
accept attribute, 333
accessibility validators, 121
add() method, 364
addColorStop property, 168
adding
alerts with jQuery, 73-75
audio streams, 210
colors and background images, 93-94
HTML5 features as extras, 113-115
JavaScript to web pages, 68-69
meta tags to mobile web applications, 96-99
microformats to websites, 266-267
music files, 212
shadows to text, 178-179
video
with Flash fallback, 216-217
video streams, 210
ADT plug-in, 410
advertising, targeted, 389
Alchemy WebSockets, 325
alerts, adding with jQuery, 73-75
alignment, 191-193
alternate link type, 299-301
Amazon Appstore, 419
Amazon.com website, 108
Android
emulator for, 134
HTML5 compatibility, 6-7
meta tag support, 98
video, troubleshooting, 211
Android apps, building
in PhoneGap, 411-413
necessary tools, 410
Android devices, putting applications on, 418
Android icons, 416
Android SDK, 410
Android tablets, 126
animated URLs, 384
for web applications, 310
in HTML5, 29
App Store icon, 414
Appcelerator, 409
Apple App store, submitting applications to, 418
Apple icon, 415
Apple iOS developer accounts, 416
apple-mobile-web-app-capable meta tag, 96
apple-mobile-web-app-status-bar-style meta tag, 97
apple-touch-icon meta tag, 98
apple-touch-icon-precomposed meta tag, 98
apple-touch-startup-image meta tag, 97
<applet> tag, 27
debugging, 351-352
lazy cache setup, 346-347
listening for changes, 348-350
application icons, 414-416
application programming interfaces. See APIs
applications
mobile web applications
applying CSS, 91-96
building HTML layout, 89-91
changing the visual design, 124-130
checking for HTML5 and CSS3 support, 130-132
compatibility with older browsers, 134-138
designing, 85-86
evaluating content, 123-124
meta tags, adding, 96-99
multiple device support, 132-133
optimizing, 99-102
planning, 86-88
testing, 63-64, 121-123, 133-134
web editors, choosing, 120-121
offline web applications, 113-115
putting on Android devices, 418
putting on iOS devices, 416-417
selling, 418-419
submitting to Apple App Store, 418
testing, 416
web applications
popularity of, 30
versus desktop applications, 4
applications. See web applications
Appstore Developer Portal, 419
arc method, 175-177
aspect ratio, checking, 62
aspect-ratio keyword, 62
attaching
events to scripts, 165
scripts to events, 312
style sheets for mobile devices, 61-62
attributes
<a> tag, 294-295
<area> tag, 297
audio and video attributes, 213
changes from HTML 4, 25-27, 442
data-* attributes, 318-320
for drag and drop, 279-280
event attributes, 24-25
event-handler attributes, 443
global attributes
for links, 297-298
list of new, 24-25
quotation marks and, 114
RDFa (Resource Description Framework in attributes), 269-270
source attributes, 214-215
track attributes, 215
video attributes, 213-214
audio
embedding, 21
audio codecs, browser support, 208-209
MP3, 209
Vorbis, 209
WAV, 209
audio streams, adding, 210
adding music files with, 212
advantages and disadvantages of, 205-206
attributes, 213
fallback options, 216-217
support for, 113
author link type, 299-301
autocomplete in forms, 227-228
autocomplete attribute, 227-228
autofocus in forms, 226
autoplay attribute, 213
background colors, rotating, 314-315
background images, adding, 93-94
background property, 94
background threads, 326-332
background-color property, 94, 125
background-image property, 94
background-position property, 94
background-repeat property, 94
base font size, setting, 189-191
<basefont> tag, 27
baselines for non-English text, 177
<bdi> tag, 23
beginPath() method, 171
benefits
of HTML5 apps, 407-408
of native apps, 406-407
Berners-Lee, Tim, 1
best practices, optimizing mobile web applications, 99-102
<big> tag, 27
bind() method, 312
Bing Maps API, 396
birthday application example, 365-370
Blackberry, emulator for, 134
blob (binary large object), 332
Blob interface, 332
block-level elements, linking, 295-296
<blockquote> tag, 149
blocks of text, color of, 125
blogs, building with sectioning elements, 152-154
<body> tag, 149
bookmark link type, 299
bookmarking
without History API, 376-379
scrolling pages, 376
books for HTML5 information, 447-448
border-bottom-left-radius property, 43
border-bottom-right-radius property, 43
border-color property, 125
border-radius property, 42-43
border-top-left-radius property, 43
border-top-right-radius property, 43
borders
drawing, 181-182
for <canvas> tag, 164
box model (CSS), 38-39
box-shadow property, 45
Bräunlich, Philip, 219
browser extensions for placeholder text, 225
browser history
bookmarking without History API, 376-379
changing URLs with History API, 379-380
History API
animated URLs, 384
on multiple domains, 383
phishing schemes with, 383-384
History API browser support, 375-376
History API methods, 375
photo gallery example, 380-383
reasons for controlling, 373-374
browser prefixes, Indexed Database API and, 364
browser sniffing, 318
browser-specific keywords, 42
BrowserCam, 134
<audio> and <video> tag fallback, 216-217
audio codec support, 208-209
browser support for data-* attributes, 319
<canvas> tag support, 164-165
checking local storage support, 358
compatibility with older browsers, 134-138
drag-and-drop support, 276-277
draggable and dropzone attributes, 279
editing content in
contenteditable attribute, 245-247
execCommand() method commands, 247-251
spellcheck attribute, 251-252
support for, 255-257
evaluating usage, 109-110
File API support, 333
geolocation, fallback options for older browsers, 393-394
Geolocation API support, 388
growth in mobile web browsing, 110-111
History API support, 375-376
history of, 2
HTML5 support, 50-52, 58-59, 112-113
offline web application support, 342
spellcheck support, 252
support for current standards, 106-108
testing in, 7
video codec support, 206-208
web applications and, 4
Web SQL Database API support, 361
WebSockets API support, 323
WOFF (Web Open Font Format) support, 201-202
browsing contexts, 295
business marks, 197
cache manifest, 343. See also application cache
lazy cache setup, 346-347
usage of, 343-344
writing, 344-346
cached event, 347
calculator example, 327-332
calling scripts at page load, 165
canonical link type, 301
borders, setting, 164
browser support for, 164-165
clearing shapes, 166
drawing images, 179
creating patterns with, 181-182
scaling and clipping images, 179-181
drawing shapes, 165-166
circles, 175-177
polygons and lines, 171-175
rectangles and squares, 166-171
drawing text, 177-179
how to use, 163-165
support for, 113
SVG and Flash versus, 182-183
Cascading Style Sheets. See CSS
case for tags, 28
CDN (content delivery network), 80
cell phones. See mobile devices
<center> tag, 27
changeVersion() method, 362
character encoding, declaring, 111
for advanced punctuation, 198
for business marks, 197
for quotation marks, 197
checked attribute, 24
checking event, 347
choosing
HTML5 tags to use, 50
web editors, 120-121
circles
converting square <div> tags to, 128
drawing, 175-177
<cite> tag, 26
Clarke, Andy, 137
clear() method, 360
clearing shapes, 166
clearInterval() method, 313
clearRect function, 167
clearTimeout() method, 313
clearWatch() method, 389-391
click events in iOS, 313
click-to-call links, 100
click-to-talk links, 100
clicking links, 73-75
client-side file handling, File API, 331-333
browser support, 333
building input field, 333
drag-and-drop file uploader example, 335-337
getting file information, 334
reading file information, 334-335
clients, WebSockets API, 325
clipping images, 179-181
closePath() method, 171
closing windows with JavaScript, 71
cloud scripts, speed of, 80
<code> tag, 155
code validators, 121
codecs
audio codecs, browser support, 208-209
video codecs
browser support, 206-208
checking for support, 55-56
WebM versus H.264, 54
color keyword, 62
color-index keyword, 63
colors
adding, 93-94
background colors, rotating, 314-315
of blocks of text, 125
for <canvas> tag, 168-171
checking, 62
color types, 233-235
in mobile designs, 125-126
transparent colors, creating, 45
web safe colors, 198
ColourLovers web site, 93
commands
execCommand() method commands, 247-251
menu commands, 236-237
comments, conditional, 57
common fonts, 37
communication, WebSockets API, 323
benefits of, 324-325
browser support, 323
establishing, 325-326
security, 324
comparing HTML5 apps with native apps, 405-406
compatibility
of HTML5 with iOS and Android, 6-7
of mobile web applications with older browsers, 134-138
compatibility mode (Internet Explorer), 106
competitors, planning web applications, 87
conditional comments, 57
console icon, 414
contacts, hCard microformat, 261-267
content
editing
browser support, 255-257
contenteditable attribute, 245-247
execCommand() method commands, 247-251
spellcheck attribute, 251-252
evaluating for mobile devices, 123-124
hiding with CSS, 70
what to include, 8-9
content delivery network (CDN), 80
contenteditable attribute, 25, 245-247
browser support, 255-257
support for, 112
context, setting, 166
contextmenu attribute, 25, 297-298
controls, custom video controls, 217-219
controls attribute, 211-213
converting
microformats to microdata, 268-269
to native apps, 408-413
to new layout tags, 16-18
square <div> tags to circles, 128
cookies
disadvantages of, 355
managing with JavaScript, 71-72
web storage versus, 356-357
coords.accuracy property, 390
coords.altitude property, 390
coords.altitudeAccuracy property, 390
coords.heading property, 390
coords.latitude property, 390
coords.longitude property, 390
coords.speed property, 390
copyright symbols, 197
created elements, checking properties of, 53-54
createLinearGradient property, 168
createPattern() method, 181-182
createRadialGradient property, 168
creation callback, 362
cross site scripting (XSS), 361
CSS (Cascading Style Sheets), 33
box model, 38-39
browser extensions for placeholder text, 225
content, hiding, 70
drop zones, highlighting, 282
embedded styles, 34
extensions for drag and drop, 280
external styles, 35-36
font properties, 188-190
font styles, setting, 190-191
@font-face feature, 199-201
hyphenation properties, 195
inline styles, 34
in mobile web applications, 91
colors and background images, adding, 93-94
layout, styling, 94-96
type, changing, 91-93
rollovers, creating, 69-71
style sheets
creating, 34-36
fonts, changing, 36-37
resetting styles, 40
web page layout, 38-41
styling canvas fonts, 178
typography. See typography
widows and orphans properties, 196
CSS3, 115
checking for support of, 130-132
media attribute extensions, 60-61
aspect ratio, 62
colors, 62
resolution, 63
screen orientation, 62
tv and grid devices, 63
width and height, 61-62
on mobile devices, 46
new features, 42
rounded corners, 42-44
shadows, 45
transparent colors, 45
curly quotes, 196
custom fonts, 199-201
custom video controls, creating, 217-219
customers, planning web applications, 87
data storage. See web storage
data types, SQLite and, 363
data-* attributes, 318-320
databases. See SQL databases
datalists in forms, 227-228
dataset property, 319
dataTransfer object, 278-279, 283
date and time types, 231-232
datetime attribute, 158-159
debugging application cache, 351-352
declaring character encoding, 111
default attribute, 215
default font size, changing, 92
degrading gracefully, 58-59
degrees, radians versus, 175
<del> tag, 155
deleting cookies with JavaScript, 71-72
design
changing for mobile devices, 124-130
elements of, 125-129
mobile design patterns, 129-130
mobile web applications, 85-86
designmode attribute, 246
desktop applications, web applications versus, 4
desktop emulators, 134
detecting
HTML5 functions, 52-53
with created element properties, 53-54
with element value retention, 56-57
with global element properties, 53
graceful degradation, 58-59
with Internet Explorer previous versions, 57-58
with method values, 54-56
mobile browsers, 60-61
aspect ratio, checking, 62
color, checking, 62
resolution, checking, 63
screen orientation, checking, 62
tv and grid devices, checking, 63
width and height, checking, 61-62
device-height keyword, 61
device-height property, 99
device-width keyword, 61
device-width property, 99
DeviceAnywhere, 134
<dfn> tag, 155
DHTML (Dynamic HTML), 276
<dir> tag, 27
direction in mobile designs, 125
disabling user interface, 247
display property, visibility property versus, 70
<div> tag, 16
converting from square to circle, 128
converting to WYSIWYG editor, 246-247
when to use, 149
<dl> tag, 26
Document Object Model (DOM), 53
document.queryCommandEnabled() command, 250
document.queryCommandIndeterm() command, 250
document.queryCommandState() command, 250
document.queryCommandSupported() command, 250
document.queryCommandValue() command, 250
Dojo Toolkit, 356
DOM (Document Object Model), 53
custom video controls, 217-219
DOM manipulation, Web Workers API and, 326
events and properties for offline web applications, 347-348
storage. See local storage
domains
for mobile device websites, 10
multiple domains, History API and, 383
dotMobi Emulator, 134
downloading event, 347
drag and drop
attributes, 279-280
browser support, 276-277
building, steps for, 280-281
CSS extensions, 280
dataTransfer object, 283
drag events, setting on draggable objects, 281
draggable objects, defining, 281
drop zones, 282-283
effect, defining, 283-284
events, 276-279
explained, 275-276
in iOS, 287
building, 289-290
draggable elements, creating, 287-288
drop zones, creating, 288
puzzle example, 284-287
support for, 112
drag() function, 281
drag-and-drop file uploader, 335-337
dragend event, 277
dragenter event, 276
draggable objects
creating in iOS, 287-288
defining, 281
setting drag events on, 281
dragleave event, 276
dragstart event, 276
drawImage function, 179-181
drawing. See also <canvas> tag
borders, 181-182
images on canvas, 179
creating patterns with, 181-182
scaling and clipping images, 179-181
shapes, 165-166
circles, 175-177
polygons and lines, 171-175
rectangles and squares, 166-171
text on canvas, 177-179
Dreamweaver, 120
drop event, 277
drop zones
creating in iOS, 288
defining, 282
highlighting, 282
setting events on, 282-283
drop() function, 282
Dynamic HTML (DHTML), 276
e.preventDefault() function, 283
Eclipse Classic IDE, 410
editing content
browser support, 255-257
contenteditable attribute, 245-247
execCommand() method commands, 247-251
spellcheck attribute, 251-252
effects in drag and drop, defining, 283-284
elements. See also tags
of design, 125-129
list of, 437
ellipses, 197
em dashes, 197
<em> tag, 155
email types, 233-235
<embed> tag, 20-21
embedded styles, 34
embedding audio/video, 21
emphasized text in screen readers, 156
ems
as relative font sizes, 192
defined, 92
en dashes, 197
enableHighAccuracy property, 392
error event, 351
evaluating
browser usage, 109-110
web application content for mobile devices, 123-124
event attributes, 24-25
event handlers
for user interface components, 253-255
list of, 310-313
event-handler attributes (HTML5), 443
events
attaching scripts to, 165, 312
click events, 313
DOM events for offline web applications, 347-348
for drag and drop, 276-279
drag events, setting on draggable objects, 281
hCalendar microformat, 262-264
local storage, 361
for mobile devices, 116
offline web applications, 342
on drop zones, setting, 282-283
WebSockets API, 326
execCommand() method
commands supported by, 247-251
disabling user interface, 247
executeSql() method, 362
explicit section of cache manifest, 344
eXtensible Markup Language (XML), 2
external link type, 299
external resources, hyperlinks versus, 294
external styles, 35-36
fallback section of cache manifest, 346
fat footers, 94
fault tolerance in JavaScript, 69
<fieldset> tag, 149
<figcaption> tag, 16-18, 114, 149
<figure> tag, 16-18, 114, 149-150
File API, 331-333
browser support, 333
building input field, 333
drag-and-drop file uploader example, 335-337
getting file information, 334
reading file information, 334-335
file extensions of HTML files, 6
File interface, 332
FileError interface, 332
FileException interface, 332
FileList interface, 332-334
FileReader interface, 332
fill() method, 171
fillRect function, 167
fillText() method, 177
finding text editors, 5
Firefox extensions for border-radius property, 43
Flash
<canvas> tag and SVG versus, 182-183
as video fallback, 216-217
floating positioning, 38
Flowplayer, 216
Font Squirrel @Font-Face Generator, 202
font stacks, 37
<font> tag, 27
font-effect property, 190
font-emphasize property, 190
font-emphasize-position property, 190
@font-face feature (CSS), 199-201
font-size-adjust property, 189
font-smooth property, 190
font-stretch property, 189
font-variant property, 37, 188
fonts. See also typography
CSS font properties, 188-190
default size, changing, 92
drawing on canvas, 177-179
licensing, 200
on mobile devices, 92
relative font sizes, 192
setting base size, 189-191
styles, 190-191
typefaces versus, 188
web safe fonts, 198
WOFF (Web Open Font Format)
advantages and disadvantages of, 198-199
browser support for, 201-202
@font-face feature (CSS), 199-201
Fontspring @Font-Face Syntax, 202
footer elements, 150-152
form field labels, placeholder text as, 224
form tags, 21-22
format-detection meta tag, 97
formatting. See styling
creating, 239-241
HTML5 features, 114
input types, 115
date and time types, 231-232
email, URLs, colors, search box types, 233-235
number types, 228-231
new features, 223
autocomplete and datalists, 227-228
autofocus, 226
key generation form field, 235-236
menu commands, 236-237
<output> tag, 236
placeholder text, 224-226
validating
with JavaScript, 71
with jQuery, 76-78
validation, 237-239
<frame> tag, 27
frames, lack of support for, 10
<frameset> tag, 27
frameworks for multiple device support, 132-133
fraud detection, geolocation, 389
gaming, geolocation, 389
geo microformat, 262
geo.js, 394
geo.js script, 393
geolocation. See Geolocation API
browser support, 388
fallback options for older browsers, 393-394
mapping application example, 397-400
methods, 389
positionOptions object, 392-393
privacy and, 394-396
using, 389-391
watchPosition(), 393
GeoTargeting by IP address, 396
getContext() method, 166
getCurrentPosition() method, 389, 391
getItem() method, 360
gift status in online store, saving, 359-360
GitHub, 376
global attributes
for links, 297-298
global elements, checking properties of, 53
goals, SMART, 87
Google Analytics, 110
Google Gears, 393
Google Maps JavaScript API, 397
Google Website Optimizer, 109
new doctype on, 114
GotProject, 287
GPS (global-positioning system), 388, 392
graceful degradation, 58-59, 108
gradients for <canvas> tag, 168-171
grid devices, checking, 63
<h#> tags, 150
<h1> tag, 146
H.264 video codec, 207-208
checking for support, 55-56
WebM versus, 54
half circles, drawing, 175-177
handheldFriendly meta tag, 96
hashtags, 272
hCalendar microformat, 262-264
hCard microformat, 261-267
<head> tag, 26
header elements, 150-152
heading elements, 150-152
headlines with sectioning elements, 146
height, checking, 61-62
height keyword, 61
help link type, 299
hidden attribute, 25, 252, 297-298
hiding
content with CSS, 70
elements, 252
high attribute, 157
highlighted text, 156-157
highlighting drop zones, 282
History API
animated URLs, 384
bookmarking pages without, 376-379
browser support, 375-376
changing URLs with, 379-380
methods, 375
on multiple domains, 383
phishing schemes with, 383-384
photo gallery example, 380-383
reasons for using, 373-374
support for, 113
history
of browsers, 2
of HTML5, 1-3
history.back() method, 375
history.forward() method, 375
history.go() method, 375
history.js script, 376
home pages, redirection to, 100
hRecipe microformat, 262-265
hreflang attribute, 297
hReview microformat, 262-265
deciding when to upgrade, 105-106
browser support for standards, 106-108
browser usage, 109-110
growth in mobile web browsing, 110-111
iterative design, 108-109
entities. See character entities
mobile web applications, building, 89-91
storing data in, disadvantages of, 355
HTML 4
changes to tags and attributes from, 25-27
tags changed to semantic tags, 155-156
HTML5 versus, 3
semantic tags, 155
syntax changes in HTML5, 27-28
HTML validators, 121
HTML5
APIs in, 29
attributes, 442
event-handler attributes, 443
global attributes, 442
browser support for, 50-52
changes to HTML 4 tags and attributes, 25-27
checking for support of, 130-132
choosing elements to use, 50
compatibility with iOS and Android, 6-7
detecting, 52-53
with created element properties, 53-54
with element value retention, 56-57
with global element properties, 53
graceful degradation, 58-59
with Internet Explorer previous versions, 57-58
with method values, 54-56
drag and drop
attributes, 279-280
browser support, 276-277
building, steps for, 280-281
CSS extensions, 280
dataTransfer object, 283
drag events, setting on draggable objects, 281
draggable objects, defining, 281
drop zones, 282-283
effects, defining, 283-284
events, 276-279
explained, 275-276
in iOS, 287-290
puzzle example, 284-287
tags. See tags
forms. See forms
history of, 1-3
HTML 4 versus, 3
links. See links
media elements, 210-212
audio and video attributes, 213
source attributes, 214-215
track attributes, 215
video attributes, 213-214
mobile support for, 28-30
new features, 318-320
Open Web Standard specifications, 4-5
resources for information, 447-448
semantic elements, 155-159
syntax changes, 27-28
upgrading to
adding features as extras, 113-115
browser support for, 112-113
features to start with, 111-112
mobile device-specific features, 115-116
user interface components, 253-255
web pages, writing, 5-6
<audio> and <video> tags
advantages and disadvantages of, 205-206
fallback options, 216-217
HTML5 apps
benefits of, 407-408
comparing with native apps, 405-406
HTML5 Doctor website, 448
The HTML5 Gallery website, 448
HTML5 Outliner website, 143
HTML5 Rocks website, 448
html5shiv script, 57-58, 131, 137
HttpOnly flag, 357
hyperlinks, external resources versus, 294
hypertext, 1
hyphenate-character property, 195
hyphenate-limit-chars property, 195
hyphenate-limit-last property, 195
hyphenate-limit-lines property, 195
hyphenate-limit-zone property, 195
hyphenate-resource property, 195
hyphenation, 193-195
hyphens property, 195
icon link type, 299
icons, creating, 414-416
IE6 Universal CSS, 137
IETF (Internet Engineering Task Force), 2
image maps, 297
image rollovers, creating with jQuery, 75-76
images
background images, adding, 93-94
drawing on canvas, 179
creating patterns with, 181-182
scaling and clipping images, 179-181
sizes, 415
Indexed Database API, 363-365
initial-scale property, 98
inline styles, 34
input fields for File API, 333
<input> tag, 22
date and time types, 231-232
email, URLs, colors, search box types, 233-235
number types, 228-231
input types on forms, 115
<ins> tag, 155
international support tags, 22-23
Internet Engineering Task Force (IETF), 2
Internet Explorer
detecting previous versions, 57-58
HTML5 support, 50
rich text editors, 256
support for current standards, 106-108
testing in, 7
The Internet Explorer 6 Countdown website, 107
iOS
applications building
necessary tools, 409
in PhoneGap, 410-411
click events in, 313
drag and drop in, 287
building, 289-290
draggable elements, creating, 287-288
drop zones, creating, 288
emulator for, 134
file upload, lack of support for, 333
video, troubleshooting, 210
iOS devices, putting applications on, 416-417
IP addresses, geolocation, 388
iphone-photo-picker, 333
Irish, Paul, 201
itemid attribute, 267
itemprop attribute, 267
itemref attribute, 267
itemscope attribute, 267
itemtype attribute, 267
iterative design, 108-109
adding to web pages, 68-69
clearing shapes on <canvas> tag, 166
cookies, managing, 71-72
datasets and, 320
defined, 67
drawing shapes on <canvas> tag, 165-166
circles, 175-177
polygons and lines, 171-175
rectangles and squares, 166-171
fault tolerance, 69
forms, validating, 71
jQuery, 72-75
alerts, adding, 73-75
cloud scripts, speed of, 80
date pickers, 232
as fallback for autocomplete and datalists, 228
forms, validating, 76-78
image rollovers, creating, 75-76
web applications, advantages of jQuery, 78-79
jQuery Mobile, 79-81
rollovers, creating, 69-71
windows, opening/closing, 71
Jo framework, 132
joins
building lines with, 174-175
types of, 173
jQTouch, 313
jQuery, 72-75
alerts, adding, 73-75
bind() method, 312
cloud scripts, speed of, 80
date pickers, 232
as fallback for autocomplete and datalists, 228
forms, validating, 76-78
image rollovers, creating, 75-76
web applications, advantages of jQuery, 78-79
jWebSocket, 325
Kaazing HTML5 WebSocket Gateway, 325
<kbd> tag, 155
kerning, 191-192
key generation form field, 235-236
key() method, 360
keywords, browser-specific, 42
kind attribute, 215
Komodo IDE, 120
label attribute, 215
<label> tag, 26
landscape mode, 126
language attribute, 27
language support tags. See international support tags
launch image, 414
launcher icon, 414
layout tags
converting to, 16-18
list of, 15-16
lazy cache setup, 346-347
leading, 191-193
length attribute, 360
letter-spacing property, 191-192
license link type, 299
licensing fonts, 200
ligatures, 191-193
line height, changing, 92
line-height property, 189, 193
linear gradients, 168
lineCap property, 173
lineJoin property, 173
lines
drawing, 171-175
in mobile designs, 127
lineTo() method, 171
lineWidth property, 173
link relationships, 299-300
alternate link type, 300-301
author link type, 301
prev and next link types, 304
sidebar link type, 305
stylesheet link type, 305
link types
alternate link type, 300-301
author link type, 301
list of, 299-300
prev and next link types, 304
sidebar link type, 305
stylesheet link type, 305
adding alerts with jQuery, 73-75
hyperlinks versus external resources, 294
new features, 293-294
alternate link type, 300-301
author link type, 301
block-level element linking, 295-296
global attributes, 297-298
image maps, 297
link relationships, 299-300
placeholder links, 296-297
prev and next link types, 304
sidebar link type, 305
stylesheet link type, 305
<a> tag changes, 294-295
loading scripts, 21
Local Shared Objects in Flash, 356
local storage, 115
checking browser support, 358
cookies versus, 356-357
defining storage object, 358
explained, 356
interface methods, 360-361
plug-ins for, 356
saving gift status in online store example, 359-360
session storage versus, 357-358
local() command, 201
location services, turning off, 396
long-polling, 325
loop attribute, 213
low attribute, 157
Lynx, 2
managing cookies with JavaScript, 71-72
manifest attribute, 343
<map> tag, 297
mapping
geolocation, 389
mapping application example, 397-400
MapQuest Open API, 397
maps, static, 400
market share for browsers, 50-52
max attribute, 157
maximum-scale property, 98
maximumAge property, 392-393
measure (in typography), 191-193
media attribute, 60-61, 214, 294, 297
aspect ratio, 62
colors, 62
resolution, 63
screen orientation, 62
tv and grid devices, 63
width and height, 61-62
media elements (HTML5), 210-212
audio and video attributes, 213
source attributes, 214-215
track attributes, 215
video attributes, 213-214
media queries (CSS), 95-96
mediagroup attribute, 213
menu commands, 236-237
<menu> tag, 26, 147, 236-237, 298
<meta charset> tag, 23
meta tags, 96-99
methods
checking values of, 54-56
Geolocation API, 389
History API, 375
local storage interface methods, 360-361
Meyer, Eric, 40
microdata
converting microformats to, 268-269
explained, 267-268
microformats and RDFa versus, 270-271
microformats versus, 267
Microformat website, 271
microformats
adding to websites, 266-267
benefits of, 263-264
converting to microdata, 268-269
examples of current, 264-265
explained, 261-263
microdata and RDFa versus, 270-271
microdata versus, 267
mobile devices and, 271-272
principles for using, 264
MIME types
for cache manifest, 343
troubleshooting video support, 207
min attribute, 157
minimum-scale property, 98
miterLimit property, 175
mobile applications, testing, 63-64
mobile browsers, detecting, 60-61
aspect ratio, checking, 62
color, checking, 62
resolution, checking, 63
screen orientation, checking, 62
tv and grid devices, checking, 63
width and height, checking, 61-62
mobile design patterns, 129-130
CSS3 on, 46
events for, 116
GPS hardware on, 392
installed fonts, 92
jQuery Mobile, 79-81
microformats and, 271-272
modal dialog support, 316
rollovers, avoiding, 70
style sheets, attaching, 61-62
writing websites for, 7
content included, 8-9
on separate domain, 10
screen size/resolution, 8
testing, 11
validity and size of code, 9-10
what to avoid, 9-10
mobile home page, redirection to, 100
mobile validators, 121
mobile web applications
applying CSS, 91
colors and background images, adding, 93-94
layout, styling, 94-96
type, changing, 91-93
building HTML layout, 89-91
converting web applications to
changing the visual design, 124-130
checking for HTML5 and CSS3 support, 130-132
compatibility with older browsers, 134-138
evaluating the content, 123-124
multiple device support, 132-133
testing on multiple devices, 133-134
testing the application, 121-123
designing, 85-86
meta tags, adding, 96-99
optimizing, 99-102
planning, 86-88
web editors, choosing, 120-121
mobile web browsing, growth in, 110-111
mobileOptimized meta tag, 96
mobiReady, 121
mockups, planning web applications, 88
modal dialogs, 316
building, 316-317
mobile support for, 316
Modernizr, 130-132
modules (CSS), 42
monchrome keyword, 63
Mosaic, 2
moveTo() method, 171
MP3 audio codec, 209
.mp4 extension, 207-208
multimedia
<audio> and <video> tags
advantages and disadvantages of, 205-206
fallback options, 216-217
audio codecs, 208-209
custom video controls, 217-219
HTML5 media elements, 210-212
audio and video attributes, 213
source attributes, 214-215
track attributes, 215
video attributes, 213-214
video codecs, 207-208
multimedia tags, 19-21
multiple attribute, 333
multiple devices
supporting, 132-133
testing on, 133-134
multiple domains, History API and, 383
multiple sources for audio and video, 210
music files, adding, 212
muted attribute, 214
nanoformats, 272
native apps
benefits of, 406-407
comparing with HTML5, 405-406
converting to, 408-413
options other than converting to, 419
navigation, 146-147
navigator.geolocation, 389
navigator.onLine property, 348
nesting tags, 3
Nettuts+, 230
new features
in CSS3, 42
in HTML5, 318-320
links, 293-294
<a> tag changes, 294-295
alternate link type, 300-301
author link type, 301
block-level element linking, 295-296
global attributes, 297-298
image maps, 297
link relationships, 299-300
placeholder links, 296-297
prev and next link types, 304
sidebar link type, 305
stylesheet link type, 305
nofollow link type, 299
<noframes> tag, 27
non-breaking hyphens, 194
non-English text, baselines, 177
noreferrer link type, 299
<noscript> tag, 68-69
notifications, push, 406
noupdate event, 347
novalidate attribute, 237
number types, 228-231
object store, exposing with Indexed Database API, 363
obsolete tags and attributes, 27
octagons, drawing, 172
offline web applications, 115, 341-342
browser support, 342
cache manifest, 343
lazy cache setup, 346-347
usage of, 343-344
writing, 344-346
debugging application cache, 351-352
DOM events and properties, 347-348
events, 342
listening for cache changes, 348-350
support for, 113
web storage and, 342
Ogg Vorbis audio codec, 209
ogg/Theora video codec, 208
onabort attribute, 24
onabort event handler, 253
onbeforeonload attribute, 24
onbeforeonunload attribute, 24
oncanplay event handler, 253
oncanplaythrough event handler, 253
onclose event, 326
oncontextmenu attribute, 24
oncontextmenu event handler, 253
ondrag attribute, 24
ondrag event handler, 253
ondragend attribute, 24
ondragend event handler, 253
ondragenter attribute, 24
ondragenter event handler, 253
ondragleave attribute, 24
ondragleave event handler, 253
ondragover event handler, 253
ondragstart attribute, 24
ondragstart event handler, 253
ondrop attribute, 24
ondrop event handler, 253
ondurationchange event handler, 253
onemptied event handler, 254
onended event handler, 254
onerror attribute, 24
onerror event handler, 254, 326
oninvalid event handler, 254
online emulators, 134
online stores, saving gift status example, 359-360
online whitelist of cache manifest, 345
onloadeddata event handler, 254
onloadedmetadata event handler, 254
onloadstart event handler, 254
onmessage attribute, 24
onmessage event, 326
onopen event, 326
onpause event handler, 254
onplay event handler, 254
onplaying event handler, 254
onprogress event handler, 254
onratechange event handler, 254
onreadystatechange event handler, 254
onresize attribute, 24
onscroll attribute, 24
onseeked event handler, 254
onseeking event handler, 254
onshow event handler, 254
onstalled event handler, 254
onsuspend event handler, 254
ontimeupdate event handler, 254
onunload attribute, 24
onvolumechange event handler, 255
onwaiting event handler, 255
opacity, 45
openCursor() method, 365
openDatabase() method, 362
opening new windows with JavaScript, 71
Opera Mini, 52
Opera Mini Simulator, 134
Opera Mobile, emulator for, 134
optimizing mobile web applications, 99-102
optimum attribute, 157
orientation keyword, 62
orphans, 196
orphans property, 196
outlines
creating, 142-144
testing, 143
OviMaps API, 397
page load, calling scripts at, 165
page locations of sectioning elements, 145
pattern attribute, 238
patterns
creating with images, 181-182
mobile design patterns, 129-130
pause() event, 218
PERMISSION DENIED (1) code, 390
persistent storage. See web storage
phishing schemes with History API, 383-384
Build, 410
converting to native apps, 410-413
phones. See mobile devices
photo gallery example, 380-383
photo locator, 389
phpwebsocket, 325
picoformats, 272
pingback link type, 299
placeholder attribute, 224-226
placeholder links, 296-297
placeholder text, 114, 224-226
planning mobile web applications, 86-88
play() event, 218
plug-ins for local storage, 356
polling, 324
polygons, drawing, 171-175
popstate listener, 380
portrait mode, 126
POSITION UNAVAILABLE (2) code, 390
positionError object, 390
positionOptions object, 392-393
prefetch link type, 299
preload attribute, 213
preloading rollover images, 75
printing as user prompt, 315
privacy, geolocation and, 394-396
progress event, 347
progressive enhancement, 86, 108
properties
DOM properties for offline web applications, 347-348
of created elements, checking, 53-54
of global elements, checking, 53
property attribute, 270
pseudo-classes, placeholder links and, 297
punctuation, 197
push notifications, 406
pushState() method, 375
puzzle example application, building with drag and drop, 284-287
pywebsocket, 325
quotation marks
attributes and, 114
in typography, 196-197
radial gradients, 169-171
radians, degrees versus, 175
rag (in typography), 195-196
range type, 230
RDFa (Resource Description Framework in attributes), 269-271
reading
cookies with JavaScript, 71-72
file information in File API, 334-335
real-time connections. See WebSockets API
recipes, hRecipe microformat, 262-265
rectangles, drawing, 166-171
redirection to mobile home page, 100
rel attribute
link types, 299-300
alternate link type, 300-301
author link type, 301
prev and next link types, 304
sidebar link type, 305
stylesheet link type, 305
rel-nofollow microformat, 265
relationships. See link relationships
relative font sizes, 192
reloads, session storage and, 358
removeItem() method, 360
Rentacomputer.com, 133
replaceState() method, 375
request-response functionality, 325
resetting styles, 40
resolution, checking, 63
resolution keyword, 63
resolution of screen, 8
resource attribute, 270
Resource Description Framework in attributes (RDFa), 269-270
resources for information, 447-448
results attribute, 234
reviews, hReview microformat, 262-265
rich text editors, creating, 246-247
risks, planning web applications, 87
rollovers
creating, 69-71
image rollovers, creating with jQuery, 75-76
root elements (sections), 149-150
rotating background colors, 314-315
rounded corners, creating, 42-44
<rp> tag, 23
<rt> tag, 23
ruby annotations, support for, 113
<ruby> tag, 23
<samp> tag, 155
sans serif fonts, serif fonts versus, 92
saving gift status in online store example, 359-360
Scalable Vector Graphics (SVG), 115
scaling images, 179-181
screen orientation, checking, 62
screen readers, emphasized text, 156
screen size, 8
Scripting API, 310-313
scripts. See also JavaScript
attaching events to, 165
attaching to events, 312
background color rotation example, 314-315
calling at page load, 165
loading, 21
running in background with Web Workers API, 326-332
scrolling pages, bookmarking, 376
search box types, 233-235
search link type, 299
searches
displaying results, 234
field styles, 234-235
sectioning elements
<article> tag, 144
<aside> tag, 144-145
building blog with, 152-154
heading, header, footer elements, 150-152
<h1> tag, 146
list of, 141-142
<nav> tag, 146-147
page locations of, 145
root elements, 149-150
<section> tag, 147-148
sectioning tags
converting to, 16-18
list of, 15-16
secure flag, 357
secure pages, caching, 345
security
phishing schemes with History API, 383-384
web storage, 361
WebSockets API, 324
Selectivizr, 137
selectors (CSS), 34
selling applications, 418-419
semantic elements, 154
changed to semantic in HTML5, 25, 155-156
explained, 16
function of, 19
in HTML 4, 155
in HTML5, 156-159
layout tags
converting to, 16-18
list of, 15-16
list of, 18-19
support for, 113
semantic markup
comparing formats for, 270-271
microdata
converting microformats to, 268-269
explained, 267-268
microformats versus, 267
microformats
adding to websites, 266-267
benefits of, 263-264
examples of current, 264-265
explained, 261-263
mobile devices and, 271-272
principles for using, 264
RDFa (Resource Description Framework in attributes), 269-270
Sencha Touch, 132
serif fonts, sans serif fonts versus, 92
server cache, 351
server setup, WebSockets API, 325
session storage, local storage versus, 357-358
setInterval() method, 313
setItem() method, 360
setTimeout() method, 313
setting cookies with JavaScript, 71-72
SGML (Standard Generalized Markup Language), 1
shadowBlur property, 178
shadowColor property, 178
shadowOffsetX property, 178
shadowOffsetY property, 178
adding to text, 178-179
creating, 45
shapes
clearing, 166
drawing, 165-166
circles, 175-177
polygons and lines, 171-175
rectangles and squares, 166-171
in mobile designs, 127
sidebars
<aside> tag, 144-145
simple prompts, 315
site statistics, viewing, 110
SiteSpinner Pro, 120
size
of Android icons, 416
of code for mobile device websites, 9-10
SMART goals, 87
smart quotes, 196
Socket.IO, 326
soft hyphens, 193-194
attributes, 214-215
multiple sources, 210
spacing (in typography), 191-193
specifications in Open Web Standard, 4-5
speech attribute, 115
spellcheck attribute, 25, 251-252
split testing, 109
spotlight search icon, 414
Indexed Database API, 363-365
Web SQL Database API, 361-370
SQLite, data types and, 363
square <div> tags, converting to circles, 128
squares, drawing, 166-171
srclang attribute, 215
Standard Generalized Markup Language (SGML), 1
state objects, 379-380
static maps, 400
statistics (site), viewing, 110
stop colors for gradients, 168
storage event, 361
storage object, defining, 358
StorageEvent object, 361
storing data. See web storage
straight quotes, 196
<strike> tag, 27
strings, 357
stroke() method, 171
strokeRect function, 167
strokeStyle property, 168
style sheets
creating, 34-36
embedded, 34
external, 35-36
fonts, changing, 36-37
inline, 34
resetting styles, 40
rounded corners, 42-44
shadows, 45
transparent colors, 45
web page layout, 38-41
<style> tag, 26
styles
for mobile devices, 61-62
for <canvas> tag, 168-171
of fonts, 190-191
search field styles, 234-235
stylesheet link type, 299, 305
styling layout, 94-96
submitting applications to Apple App store, 418
summary attribute, 27
SVG (Scalable Vector Graphics), 115, 182-183
syntax changes in HTML5, 27-28
System information API, 310, 317-318
tabindex attribute, 255
tablets. See mobile devices
tag link type, 299
block-level elements, linking, 295-296
changes from HTML 4, 25-27
checking value retention of, 56-57
form tags, list of, 21-22
hiding, 252
international support tags, list of, 22-23
layout tags
converting to, 16-18
list of, 15-16
list of HTML5 elements, 437
media elements, 210-212
audio and video attributes, 213
list of, 19-21
source attributes, 214-215
track attributes, 215
video attributes, 213-214
nesting, 3
sectioning elements
<article> tag, 144
<aside> tag, 144-145
building blog with, 152-154
<h1> tag, 146
heading, header, footer elements, 150-152
list of, 141-142
<nav> tag, 146-147
outlines, creating, 142-144
page locations of, 145
root elements, 149-150
<section> tag, 147-148
semantic elements, 154
changed to semantic in HTML5, 155-156
function of, 19
in HTML 4, 155
in HTML5, 156-159
list of, 18-19
target attribute, 294-295
targeted advertising, 389
<td> tag, 149
tel type, 230
testing
applications, 416
mobile applications, 63-64
web applications for mobile devices, 121-123
in Internet Explorer, 7
mobile device websites, 11
on multiple devices, 133-134
outlines, 143
split testing, 109
text
blocks of text, color of, 125
drawing on canvas, 177-179
emphasized text, 156
placeholder text, 224-226
text editors, finding, 5
text-align property, 193
text-shadow property, 45
textAlign attribute, 177
textBaseline attribute, 177
texture in mobile designs, 129
threads, running in background, 326-332
time and date types, 231-232
timeline, planning web applications, 88
TIMEOUT (3) code, 390
timeout property, 392
timestamp property, 390
TinyMCE, 256
title attribute, 157
titles in state objects, 380
TopStyle, 120
touchmove event, 116
touchstart event, 116
<trace> tag, 210
tracking, 191-193
trademark symbols, 197
transaction() method, 362
transparent colors, creating, 45
triangles, drawing, 172
troubleshooting
application cache debugging, 351-352
video
in Android, 211
checking MIME types, 207
in iOS, 210
Web Workers API, 327
<tt> tag, 27
turning off location services, 396
tv devices, checking, 63
type, changing, 91-93
type attribute, 26, 211, 214-215
typefaces
CSS font properties, 188-190
fonts versus, 188
setting font styles, 190-191
business marks, 197
defined, 187
hyphenation, 193-195
punctuation, 197
quotation marks, 196-197
rag, 195-196
spacing, 191-193
typefaces
CSS font properties, 188-190
fonts versus, 188
setting font styles, 190-191
widows and orphans, 196
<ul> tag, 27
UNKNOWN ERROR (0) code, 390
updateready event, 347
upgrading
deciding when to upgrade, 105-106
browser support for standards, 106-108
browser usage, 109-110
growth in mobile web browsing, 110-111
iterative design, 108-109
to HTML5
adding features as extras, 113-115
browser support for, 112-113
features to start with, 111-112
mobile device-specific features, 115-116
uploading files with File API, 331-333
browser support, 333
building input field, 333
drag-and-drop file uploader example, 335-337
getting file information, 334
reading file information, 334-335
URI scheme interface, 332
URLs
animated URLs with History API, 384
changing with History API, 379-380
URL types, 233-235
user interface
browser support for HTML5 features, 255-257
disabling, 247
HTML5 components, 253-255
user prompts, 316-317
User prompts API, 310, 315-316
user-scalable property, 98
user-select attribute, 280
userData (local storage plug-in), 356
@username nanoformat, 272
uTest, 133
valid documents, well-formed documents versus, 2
validating
forms, 237-239
with JavaScript, 71
with jQuery, 76-78
importance of, 238
input types, 230
validators, 121
validity of code for mobile device websites, 9-10
value attribute, 157
values
of elements, 56-57
of methods, 54-56
<var> tag, 155
video
adding with Flash fallback, 216-217
custom video controls, creating, 217-219
embedding, 21
troubleshooting
in Android, 211
in iOS, 210
video codecs
browser support, 206-208
checking for support, 55-56
WebM versus H.264, 54
video streams, adding, 210
advantages and disadvantages of, 205-206
attributes, 213-214
fallback options, 216-217
specifying video types, 214-215
support for, 113
viewing site statistics, 110
viewport meta tag, 96-99
VirtualBox, 64
visibility property, display property versus, 70
visual design, changing for mobile devices, 124-130
voice recognition, 115
Vorbis audio codec, 209
W3C (World Wide Web Consortium), 2
W3C mobileOK Checker, 121
W3C validator, 9
W3C website, 448
W3Counter.com, 109
Warpspire Experiments, 376
watchPosition() method, 389-393
WAV audio codec, 209
<wbr> tag, 19
web applications, 309
APIs, 310
background color rotation example, 314-315
click events in iOS, 313
converting to mobile applications
changing the visual design, 124-130
checking for HTML5 and CSS3 support, 130-132
compatibility with older browsers, 134-138
evaluating the content, 123-124
multiple device support, 132-133
testing on multiple devices, 133-134
testing the application, 121-123
desktop applications versus, 4
File API, 331-333
browser support, 333
building input field, 333
drag-and-drop file uploader example, 335-337
getting file information, 334
reading file information, 334-335
jQuery, 78-79
offline web applications, 341-342
browser support, 342
cache manifest, 343-347
debugging application cache, 351-352
DOM events and properties, 347-348
events, 342
listening for cache changes, 348-350
web storage and, 342
popularity of, 30
Scripting API, 310-313
System Information API, 317-318
Timers API, 313
user prompts, 316-317
User Prompts API, 315-316
Web Workers API, 326-332
WebSockets API, 323
benefits of, 324-325
browser support, 323
establishing, 325-326
security, 324
web browsers. See browsers
Web Design and HTML at About.com website, 448
Web Developer extension, 64
web editors, choosing, 120-121
Web Hypertext Application Technology Working Group (WHATWG), 3
Web Open Font Format. See WOFF (Web Open Font Format)
web pages
CSS for layout, 38-41
editing content
browser support, 255-257
contenteditable attribute, 245-247
execCommand() method commands, 247-251
spellcheck attribute, 251-252
JavaScript, adding, 68-69
writing, 5-6
web safe colors, 198
web safe fonts, 198
web server cache, 351
web sites, deciding to upgrade, 105-106
browser support for standards, 106-108
browser usage, 109-110
growth in mobile web browsing, 110-111
iterative design, 108-109
Web SQL Database API, 361-370
Indexed Database API, 363-365
local storage
checking browser support, 358
cookies versus, 356-357
defining storage object, 358
explained, 356
interface methods, 360-361
plug-ins for, 356
saving gift status in online store example, 359-360
session storage versus, 357-358
offline web applications and, 342
prior to HTML5, 355
Web SQL Database API, 361-370
Web Workers API, 326-332
WebKit browsers, 234-235
WebKit extensions for border-radius property, 43
webkit_draggable() method, 287
webkit_drop.add() method, 288
-webkit-min-device-pixel-ratio keyword, 63
-webkit-user-drag attribute, 280
WebOS, emulator for, 134
websites
adding HTML5 features as extras, 113-115
adding microformats to, 266-267
for HTML5 information, 448
writing for mobile devices, 7
content included, 8-9
on separate domain, 10
screen size/resolution, 8
testing, 11
validity and size of code, 9-10
what to avoid, 9-10
WebSockets API, 323
benefits of, 324-325
browser support, 323
establishing, 325-326
security, 324
well-formed documents, valid documents versus, 2
WHATWG (Web Hypertext Application Technology Working Group), 3
WHATWG Wiki, 215
whitelists (for cache manifest), 345
widows, 196
widows property, 196
width, checking, 61-62
width keyword, 61
width property, 27, 98, 193, 214
window.applicationCache.swapCache() method, 351
window.close() function, 71
window.navigator.appName method, 317
window.navigator.appVersion method, 317
window.navigator.platform method, 317
window.navigator.userAgent method, 317
window.open() function, 71
windows, opening/closing, 71
Windows Phone, emulator for, 134
advantages and disadvantages of, 198-199
browser support for, 201-202
@font-face feature (CSS), 199-201
word-spacing property, 193
World Wide Web Consortium (W3C), 2
writing
cache manifest, 344-346
web pages, 5-6
websites for mobile devices, 7
content included, 8-9
on separate domain, 10
screen size/resolution, 8
testing, 11
validity and size of code, 9-10
what to avoid, 9-10
WYSIWYG editors, creating, 246-247
Xcode, 409
XFN (XHTML Friends Network), 265
XHTML, 2
XHTML Friends Network (XFN), 265
XML (eXtensible Markup Language), 2
XSS (cross site scripting), 361
YUI Rich Text Editor, 256