Tải bản đầy đủ (.pdf) (20 trang)

Tài liệu Web Programming with HTML, XHTML, and CSS- P16 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (242.1 KB, 20 trang )

information provided, 381
layout, 387–397
listing required information, 380–381
paper forms and, 381
home pages, 345
influence of images on, 341
links
images as, 375
text links, 375
navigation, 342–343
bottom, 344
left, 343
menus, 369–374
right, 345
top, 343
top and left, 344
site searches
Google, 376–378
usability and, 376
sketching element placement, 337–339
structuring pages, 346–347
sacrificial columns, 354–355
single-column layout, 348–350
three-column layouts, 353–354
two-column layouts, 350–352
style, 339–342
tables, shading multiple rows, 378–379
text
alignment, 365
background images, 366–367
column width, 366


fonts, 367–368
line height, 365–366
white space and, 362–364
wireframe model, 338
<dfn> element, 32, 573
digit (d), 463
dimensions, properties, CSS, 619–621
dir attribute, 14, 115, 564
<bdo> element, 568
<head> element, 578
<hr /> element, 579
<html> element, 579
<isindex> element, 588
<meta> element, 593
<title> element, 605
<dir> element, 574, 701–702
direction attribute, <marquee> element, 592
directories, 57
directory structures, 57, 509
disabled attribute
<button> element, 571
<input type="button"> element, 582
<input type="checkbox"> element, 582
<input type="file"> element, 583
<input type="image"> element, 584
<input type="password"> element, 585
<input type="radio"> element, 586
<input type="reset"> element, 586
<input type="submit"> element, 587
<input type="text"> element, 587

<optgroup> element, 596
<option> element, 597
<select> element, 598
disabled controls, 176–177
discussion boards, 530
display property, 302
dithering, 80
<div> element, 49–50, 489
attributes, 574
liquid designs, 334
division (/) operator, 425
<dl> element, 39–40, 574
do while loops, 433, 434
DOCTYPE, 8–9, 187
document property, 448
document type declaration, 8–9
documents
linking to, 54–56
structure, 3
DOM (document object model), 405
alinkColor property, 413
bgcolor property, 413
collections, 410–411, 415–416
fgcolor property, 413
introduction, 410–412
lastModified property, 413
linkColor property, 413
methods and, 410
properties and, 410
referrer property, 413

scriptable objects, 410
title property, 413
vlinkColor property, 413
write method, 414
writeln method, 414
domain name, obtaining, 517–518
dot notation, 411
721
dot notation
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 721
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
dots per inch, 79
drag-and-drop, Scriptaculous, 490–492
drop-down navigation menus, 497
<dt> element, 574
dynsrc attribute, <img> element, 581
E
e-mail
addresses
hiding, 497
testing for, 465
forms example, 477–482
linking to addresses, 56–57
E property, 444
editing, text, inserting, 46
editing text, deleting, 46–47
elements, 4
<a>, 6, 65
<abbr>, 31, 565

<acronym>, 31, 565
<address>, 35, 565
<applet>, 566, 704–705
<area>, 567
basefont>, 565
attributes, 6–7
<b>, 26, 568
<base>, 64–65, 568
<basefont>, 686–687
<bdo>, 568
<bgsound>, 569
<big>, 28, 569
<blink>, 569
block elements, 48–49
<blockquote>, 32, 569
<body>, 5, 11, 569–570
<br>, 21–22
<br />, 570
<button>, 153, 570
<caption>, 571
<center>, 571, 691–697
child, 5
<cite>, 33–34, 572
<code>, 34, 572
<col>, 572
<colgroup>, 130–132, 572–573
<comment>, 573
<dd>, 573
<del>, 46–47, 573
<dfn>, 32, 573

<dir>, 574, 701–702
<div>, 49–50, 574
<dl>, 39–40, 574
<dt>, 574
<em>, 30, 574
<embed>, 575, 705–706
empty elements, 21
<fieldset>, 171–173, 575
<font>, 48, 576, 683–685
<form>, 140, 576
<frame>, 195–197, 576–577
<frameset>, 186, 577–578
grouping, 49–50
<head>, 5, 10–11, 578
<hn>, 578
<hr />, 28, 579
<html>, 9–10, 579–580
<i>, 26–27, 580
IE-specific, 707–708
<iframe>, 580
<img>, 86, 580–582
inline elements, 48–49
<input type="button">, 582
<input type="checkbox">, 582–583
<input type="file”>, 583
<input type=”hidden”>, 584
<input type=”image”>, 584
<input type=”password”>, 585
<input type=”radio”>, 585–586
<input type=”reset”>, 586

<input type=”submit”>, 587
<input type=”text”>, 587–588
<ins>, 46, 588
inside another, 6
<isindex>, 588–589, 706–707
<kbd>, 34–35, 589
<keygen>, 589
<label>, 169–171, 589
<layer>, 589
<legend>, 171–173, 590
<li>, 574, 591, 593
<link>, 591
<listing>, 591, 688–689
<map>, 592
<marquee>, 592
<menu>, 593, 701–702
<meta>, 502, 593
<multicol>, 593
nesting, 6
Netscape-specific, 712
722
dots per inch
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 722
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
<nextid>, 594
<nobr>, 594
<noembed>, 594
<noframes>, 186, 197–198, 577, 594
<nolayer>, 594
<noscript>, 408, 594

<object>, 93–94, 594
<ol>, 37–39, 596
<optgroup>, 596
<option>, 159, 597
<p>, 21, 597
<param>, 97–98, 567, 596, 597
parent, 5
<plaintext>, 597, 688–689
<pre>, 22–23, 597
<q>, 33, 598
<s>, 27, 598, 687
<samp>, 35, 598
<script>, 406, 598
<select>, 158–159, 598–599
<small>, 28, 599
<span>, 49–50, 599
<strike>, 27, 599, 687
<strong>, 30, 599
<style>, 599
<sub>, 28, 599
<sup>, 28, 599
<table>, 109, 600–601
tags, 4
comparison, 5
<tbody>, 126, 601
<td>, 601–602
<textarea>, 602–603
<tfoot>, 126, 603
<th>, 110, 604
<thead>, 126, 603

<title>, 11, 605
<tr>, 605
<tt>, 27, 606
<u>, 27, 606, 687–688
<ul>, 36–37, 606
<var>, 35, 606
<wbr>, 606
<xmp>, 606, 688–689
<em> element, 30, 574
em units, 250
<embed> element, 575, 705–706
emphasis, 30
empty-cells property, 292–294
empty elements, 21
enctype attribute, <form> element, 576
equal to (==) operator, 426
escaping characters, 463
events
common events, 16
intrinsic, 435
onblur, 437
onchange, 437
ondblclick, 436
onfocus, 437
onkeydown, 436
onkeypress, 436
onkeyup, 436
onload, 436
onmousedown, 436
onmousemove, 436

onmouseout, 436
onmouseover, 436
onmouseup, 436
onreset, 437
onselect, 437
onsubmit, 437
onunload, 436
triggering, 407
UI events, 16
user events, 435
window events, 435
ex units, 250
exp( ) method, 445
expiring web pages, 505
explicit labels, 387
expressions, 414
external JavaScript, 409
F
face attribute, 568, 576
Fetch, 521
fgcolor property (DOM), 413
fields (forms)
auto-tabbing, 471–472
trimming spaces from beginning and end,
474–475
<fieldset> element, 171–173, 385, 575
file, size, 84–85
file select boxes, 164–165
filepath, 60
FireFTP, 521

first-letter pseudo class, 239–240
fixed( ) method, 438
723
fixed( ) method
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 723
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
fixed positioning, 310–311
fixed-size fonts, screen resolution and, 369
fixed-width designs, 331, 335–336
Flash, 98–99, 535–536
Flash Player, files, 85
float property, 312–314
floating frames, 204–205
floor( ) method, 445, 485
flow, 17–18, 306
focus
first form item, 470–471
<input> element, 296
tabbing order, 173–174
focus( ) method, 417, 449, 471–472, 475–476
:focus pseudo class, 296
folders, directory structure, 57
<font> element, 48, 576, 683–685
font-family property, 368
font test page, 240–243
fontcolor( ) method, 438
fonts
CSS properties, 607–611
fixed-size, screen resolution and, 369

font-family property, 368
sans-serif, 367
serifs, 367
fontsize( ) method, 438
for attribute, <label> element, 589
for loops, 433, 434–435
<form> element, 140
attributes, 142–145, 576
creating forms, 141–145
methods, 417
onsubmit event handler, 454
properties, 416
white space and, 145
form-feed (f), 463
formatting
align attribute, 692–693
<center> element, 691–697
text, 23–26
forms
buttons, 150–152, 394
case conversion, 474
checkboxes, 154–155, 476–477
collecting data, 417–419
color, 395–396
controls, 139, 382
checkboxes, 383
<fieldset> elements, 385
grouping, 384–387
hidden, 165–166
labelling, 387–389

radio buttons, 383
relevant information and, 391–393
select boxes, 384
text boxes, 384
text inputs, 145–150
title attribute, 394–395
CSS and, 396–397
designing
form controls, 382–384
group-related information, 381
information provided, 381
layout, 387–397
listing required information, 380–381
paper forms and, 381
e-mail example, 477–482
fields
auto-tabbing, 471–472
trimming spaces from beginning and end,
474–475
file select boxes, 164–165
focus, first item, 470–471
introduction, 140–141
<legend> element, 385
name/value pairs, 141
numbering questions, 387
radio buttons, 156–157
registration form example, 166–169, 180–182
required information, 393
select boxes, 158–163
sending data to server, 178–179

site registration form example, 397–401
splitting into separate pages, 386
submission, preventing until checkbox selection,
469–470
submit button, 140
tab order of elements, 395
tables and, 389–391
testing, 397
text, 472–474
text area, selecting all content, 475–476
validation
checkboxes, 468–469
checking text fields, 457–459
finding characters, 462–464
how, 456
preventing submission until checkbox selection,
469–470
724
fixed positioning
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 724
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
radio buttons, 467–468
required text fields, 459–461
select box options, 464–465
testing characters, 464–465
when, 456
forms collection (DOM), 410–411, 415
forums, 530
forward( ) method, 449
forward slashes, 462

fragment identifiers, 61
framborder attribute, <frame> element, 577
frame attribute, 115–116
<table> element, 600
frame-based book viewer, 201–204
<frame> element, 194–195
attributes, 576–577
frameborder attribute, 193
<frame> element, 195
<frameset> element, 578
<iframe> element, 207, 580
frames, 185
DOCTYPE and, 187
floating, 204–205
inline, 204–205, 207–209
links between, 198–200
when to use, 188–189
frames property, 448
frameset, columns, 189–191
<frameset> element, 186
attributes, 189–194, 577–578
extensions, browser-specific, 192–194
Frameset XHTML, 8
framesets, 185, 200
framespacing attribute, 194, 578
FTP (File Transfer Protocol), uploading site and,
520–522
FTPX, 521
functions, 422
calling, 428

defining, 428
JavaScript, 407
return statements, 429
G
generated content
:after pseudo-element, 297–298
:before pseudo-element, 297–298
content property, 298
getDate( ) method, 442
getDay( ) method, 442
getFullYear( ) method, 442
getHours( ) method, 442
getMinutes( ) method, 442
getMonth( ) method, 442
getSeconds( ) method, 442
getTime( ) method, 442
getTimezoneOffset( ) method, 442
getUTCDate( ) method, 443
getUTCDay( ) method, 443
getUTCFullYear( ) method, 443
getUTCHours( ) method, 443
getUTCMilliseconds( ) method, 443
getUTCMinutes( ) method, 443
getUTCMonth( ) method, 443
getUTCSeconds( ) method, 443
getYear( ) method, 442
GIF (Graphics Interchange Format), 79–82
graphics, 77–79
graphics packages, 536
greater than (>) operator, 426

greater than or equal to (>=) operator, 426
grids, 109
grouping elements, 49–50
gutter attribute, <multicol> element, 593
H
handleOther( ) function, 473
<head> element, 5, 10–11
attributes, 578
meta tags, 502
headers attribute, 602, 604
headings, 18–21
height attribute, 88–89, 96
<embed> element, 575
<iframe> element, 206, 580
<img> element, 581
<marquee> element, 592
<table> element, 600
<td> element, 602
<th> element, 604
height property, 419
hexadecimal codes, 638–639
color, 637–638
color names and, 640–641
color reference, 641–644
hidden attribute, <embed> element, 575
hidden controls, 165–166
history property, 448
725
history property
Index

59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 725
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
<hn> elements, 18–19, 578
home( ) method, 449
home pages, designing, 345
host address, 60
hosting, 518
backups, 519
bandwidth, 519
choosing host, 519–520
country, 519
data centers, 519
dedicated, 520
disk space, 519
e-mail accounts, 519
shared, 520
statistical analysis, 526–527
statistics packages, 520
uptime, 520
hosting company, 501
<hr /> element, 28, 579
href attribute, 7
<a> element, 565
<area> element, 567
<base> element, 568
<link> element, 591
linking to documents, 54–56
hreflang attribute, 69, 565, 591
hspace attribute, 90, 96, 696–697
<embed> element, 575

<img> element, 581
<marquee> element, 592
<table> element, 600
hspace property, 419
<html> element, 9–10, 579–580
HTML (Hypertext Markup Language), 2
HTML validation, 509–512
http-equiv attribute, <meta> element, 593
HTTP headers, 505
HTTP (Hypertext Transfer Protocol), 59
hyperlinks. See links
I
<i> element, 26–27, 580
id attribute, 12–13, 564
<base> element, 568
<br /> element, 570
<comment> element, 573
<frame> element, 577
<head> element, 578
<hr /> element, 579
<html> element, 579
<isindex> element, 588
<keygen> element, 589
<marquee> element, 592
<param> element, 596
<title> element, 605
id selector, 244
if statements, 429–430
if else statements, 430
<iframe> element, 204–207, 580

image maps, 77, 100–105
image rollovers, 420–421, 482–483
images, 77
adding to documents, 92–93
background, text readability and, 366–367
background-image property, 277–278
bitmap, 78–79
as buttons, 152–153
formats, 78
GIF, 79
<img> element, 86
JPEG, 79
as links, 99–100, 375
list-style-image property, 286
PNG, 79
images collection (DOM), 410, 419–420
<img> element, 86–91, 581
implicit labels, 387
@import rule, 304–305
!important rule, 305
importing, styles, 304–305
increment (++) operator, 425
indexed color format, 79
indexOf( ) method, 438
infininte loops, 435
inline elements, 48–49
inline frames, 204–205, 207–209
input, forms, 145–150
text, disabling, 472–474
<input> element, 150–152, 296

<input type=”button”> element, attributes, 582
<input type=”checkbox”> element, attributes,
582–583
<input type=”file”> element, attributes, 583
<input type=”hidden”> element, attributes, 584
<input type=”image”> element, attributes, 584
<input type=”password”> element, attributes, 585
<input type=”radio”> element, attributes, 586
726
<hn> elements
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 726
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
<input type=”reset”> element, attributes, 586
<input type=”submit”> element, attributes, 587
<input type=”text”> element, attributes,
587–588
<ins> element, 46, 588
inserting text, 46
internationalization attributes, 14–15
internationalization properties, 634–635
intrinsic events, 435
<isindex> element, 588–589, 706–707
ismap attribute, 90, 581
italic text, 26–27
italics( ) method, 439
J
JavaScript
breaking up code lines, 450
case-sensitivity, 449
comments, 408

conditional statements, 423
data types, 450–451
external, 409
files, external, 455
functions, 407, 422
keywords, 451
libraries, 487–488
animation, 488–490
auto-completing text, 495–496
calendars, 494–495
drag-and-drop, 490–492
sortable tables, 492–493
loops, 423
opening and closing symbols, 450
operators, 422, 424–425
arithmetic, 425
assignment, 425–426
Boolean, 427
comparison, 426
logical, 427
string, 427
scripts
adding to pages, 406–408
folder, 455
special characters, 450
variables, 422
assigning values, 424
declaring, 423
lifetime, 424
rules, 423–424

when not to use, 496–497
write( ) method, 406
join( ) method, 447
JPEG (Joint Photographic Experts Group
Format), 79
compression and, 82
K
<kbd> element, 34–35, 589
keyboard, <kbd> element, 34–35
<keygen> element, attributes, 589
keywords
JavaScript, 451
mailto, 56
L
label attribute, 596, 597
<label> element, 169–171, 589
labels, controls, 169–171
Lang attribute, <comment> element, 573
lang attribute, 14–15, 564
<frame> element, 577
<head> element, 578
<html> element, 579
<isindex> element, 588
<meta> element, 593
<title> element, 605
language attribute, 598, 704
language codes, 665–668
lastIndexOf( ) method, 439
lastModified property (DOM), 413
<layer> element, attributes, 590

leading, 365
left attribute, <layer> element, 590
left navigation, 343
leftmargin attribute, <body> element, 570
<legend> element, 171–173, 385, 590
length property, 438, 458
lengths, CSS properties, 635
less than (<) operator, 426
less than or equal to (<=) operator, 426
<li> element, attributes, 574, 591, 593
libraries, JavaScript, 487–488
animation, 488–490
auto-completing text, 495–496
calendars, 494–495
drag-and-drop, 490–492
sortable tables, 492–493
727
libraries
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 727
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
line breaks, 21–22
line height, readability and, 365–366
linefeed (n), 463
link( ) method, 439
link attribute, <body> element, 570
<link> element
attributes, 591
CSS, 218–219
<head> element, 10

Link Valet tool, 513–514
linkColor property (DOM), 413
links, 53, 698–699
<a> element, 65
checking, 513–514
color, 274
CSS, 274–275
default files, 63
e-mail, 74–75
to e-mail addresses, 56–57
between frames, 198–200
images as, 99–100, 375
to other documents, 54–56
within pages, 71–74
parent directory, 63
from root, 63
same directory, 62
subdirectory, 62–63
text links, 375
links collection (DOM), 411
liquid designs, 331, 333–335
list-style-position property, 285–286
list-style property, 286
list-style-type property, 284–285
<listing> element, 591, 688–689
lists
CSS properties, 623–625
definition, 39–40
list-style-image property, 286
list-style-position property, 285–286

list-style property, 286
list-style-type property, 284–285
marker-offset property, 287
nesting, 40–41
ordered, 37–39
start attribute, 699
type attribute, 700–701
unordered, 36–37
value attribute, 700
LN2 property, 444
LN10 property, 444
location property, 448
log( ) method, 445
LOG2E property, 445
LOG10E property, 445
logical operators, 427
longdesc attribute, 90–91
<frame> element, 197, 577
<iframe> element, 207, 580
<img> element, 581
loop attribute
<bgsound> element, 569
<img> element, 581
<marquee> element, 592
looping statements, 432–435
loops, 423
lossless compression, 81
lossy compression, 81
lowersrc property, 419
lowsrc attribute, <img> element, 581

LZW compression, 81
M
mailto, 56
<map> element, 592
marginheight attribute, 196
<frame> element, 577
<iframe> element, 207, 580
margins
CSS properties, 622
white space and, 362
marginwidth attribute, 196
<frame> element, 577
<iframe> element, 207, 580
marker offset property, 287
markup languages, 2
<marquee> element, attributes, 592
matching strings, 462
math object, 445
max( ) method, 445
maxlength attribute
<input type=”file”> element, 583
<input type=”password”> element, 585
<input type=”text”> element, 587
media attribute, <link> element, 591
<menu> element, 593, 701–702
menus
consistency, 374
content, separation from, 370–372
focus, 370
728

line breaks
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 728
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
grouping items, 373
icons, representing links, 372
loading, 374
navigation, drop-down, 497
readability, 372–373
selectability, 373–374
<meta> element, 502
attributes, 502, 593
author name, 507
character encoding, 507
content attribute, 503, 504, 505–508
cookies, setting, 507
expiring web pages, 505
<head> element, 10
http-equiv attribute, 505–508
name attribute, 503–505
rating web pages, 506–507
redirecting web pages, 506
refreshing web pages, 506
scheme attribute, 508
search engines and, 522–523
meta tags, <head> element and, 502
method attribute, <form> element, 576
methods, 405
abs( ), 445
acos( ), 445
alert( ), 449

anchor( ), 438
arguments, 414
asin( ), 445
atan( ), 445
atan2( ), 445
back( ), 449
big( ), 438
blur( ), 417, 449
bold( ), 438
ceil( ), 445
charAt( ), 438
click( ), 417
close( ), 449
concat( ), 447
confirm( ), 449
cos( ), 445
date( ), 442
DOM, 410, 414
exp( ), 445
fixed( ), 438
floor( ), 445, 485
focus( ), 417, 449, 471–472, 475–476
fontcolor( ), 438
fontsize( ), 438
forward( ), 449
getDate( ), 442
getDay( ), 442
getFullYear( ), 442
getHours( ), 442
getMinutes( ), 442

getMonth( ), 442
getSeconds( ), 442
getTime( ), 442
getTimezoneOffset( ), 442
getUTCDate( ), 443
getUTCDay( ), 443
getUTCFullYear( ), 443
getUTCHours( ), 443
getUTCMilliseconds( ), 443
getUTCMinutes( ), 443
getUTCMonth( ), 443
getUTCSeconds( ), 443
getYear( ), 442
home( ), 449
indexOf( ), 438
italics( ), 439
join( ), 447
lastIndexOf( ), 439
link( ), 439
log( ), 445
max( ), 445
min( ), 445
moveBy( ), 449
moveTo( ), 449
open( ), 449
parameters, 414
parse( ), 442
pow( ), 445
print( ), 449
prompt( ), 449

random( ), 445, 485
replace( ), 462
reset( ), 415
reverse( ), 447
round( ), 445, 485
select( ), 417, 475–476
setDate( ), 443
setFullYear( ), 443
setHours( ), 443
setMinutes( ), 443
setMonth( ), 443
setSeconds( ), 443
setTime( ), 443
729
methods
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 729
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
methods (continued)
setUTCDate( ), 443
setUTCDay( ), 444
setUTCFullYear( ), 444
setUTCHour( ), 444
setUTCMilliseconds( ), 444
setUTCMinutes( ), 444
setUTCMonth( ), 444
setUTCSeconds( ), 444
setYear( ), 443
sin( ), 445
slice( ), 447

small( ), 439
sort( ), 447
sqrt( ), 445
stop( ), 449
strike( ), 439
sub( ), 439
submit( ), 415
substr( ), 439
substring( ), 439, 474–475
sup( ), 439
tan( ), 445
test( ), 464
toGMTString( ), 443
toLocalString( ), 443
toLowerCase( ), 439, 474
toString( ), 443
toUpperCase( ), 439, 474
methods (JavaScript), write( ), 406
MIME media types
application, 674–679
audio, 672–673
image, 671
message, 674
model, 674
multipart, 672
text, 670–671
video, 673
min( ) method, 445
MochiKit, 492–493
modularized style sheets, 304–305

modulus, division remainder (%) operator, 425
monospaced font, 27
moveBy( ) method, 449
moveTo( ) method, 449
<multicol> element, attributes, 593
multiple attribute, <select> element, 598
multiple-line text input controls, 148–150
multiplication (*) operator, 425
N
name attribute, 91, 96, 97
<area> element, 567
<button> element, 571
<embed> element, 575
<frame> element, 195
<img> element, 581
<input type=”button”> element, 582
<input type=”checkbox”> element, 582
<input type=”file”> element, 583
<input type=”hidden”> element, 584
<input type=”image”> element, 584
<input type=”password”> element, 585
<input type=”radio”> element, 586
<input type=”submit”> element, 587
<input type=”text”> element, 587
<keygen> element, 589
<layer> element, 590
<meta> element, 593
<param> element, 567, 596
<select> element, 599
name property, 419, 448

name/value pairs, 141
namespace identifier, 10
navigation, 342–343
bottom, 344
left, 343
menus, 369–374
right, 345
top, 343
top and left, 344
nesting
framesets, 200
lists, 40–41
tables, 356–359
nesting elements, 6
<nextid> element, 594
<nobr> element, 594
<noembed> element, 594
<noframes> element, 186, 197–198, 577, 594
nohref attribute, <area> element, 567
<nolayer> element, 594
non-digit (D), 463
non-white-space character (S), 463
non-word character (W), 463
noresize attribute, 196, 577
normal flow, 306
<noscript> element, 408, 594
noshade attribute, <hr /> element, 579
730
methods (continued)
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 730

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
not equal to (!=) operator, 426
notab attribute
<area> element, 567
<input type=”button”> element, 582
<input type=”checkbox”> element, 583
<input type=”file”> element, 583
<input type=”image”> element, 584
<input type=”password”> element, 585
<input type=”radio”> element, 586
<input type=”reset”> element, 586
<input type=”submit”> element, 587
<input type=”text”> element, 587
nowrap attribute, 703
<div> element, 574
<table> element, 600
<td> element, 602
<th> element, 604
<tr> element, 605
null data types, 451
number data types, 451
numbers, ordered lists, 38–39
O
<object> element, 10, 93–97
objects
built-in, 422
string object, 437–439
custom, 422
W3C DOM, 422
<ol> element, 37–39, 596

onabort attribute, <img> element, 581
onblur attribute
<button> element, 571
<frameset> element, 578
<input type=”file”> element, 583
<input type=”password”> element, 585
<input type=”text”> element, 587
<label> element, 589
<select> element, 599
onblur event, 437
onchange attribute
<input type=”file”> element, 583
<input type=”password”> element, 585
<input type=”text”> element, 587
<select> element, 599
onchange event, 437
onclick attribute, 564
onclick event, 436
ondblclick attribute, 564
ondblclick event, 436
onerror attribute, <img> element, 581
onfocus attribute
<button> element, 571
<input type=”file”> element, 583
<input type=”password”> element, 585
<input type=”text”> element, 587
<label> element, 589
<select> element, 599
onfocus event, 437
onkeydown attribute, 564

onkeydown event, 436
onkeypress attribute, 564
onkeypress event, 436
onkeyup attribute, 564
onkeyup event, 436, 471
onload attribute
<body> element, 570
<frameset> element, 578
<img> element, 581
onload event, 436, 471
onmousedown attribute, 564
onmousedown event, 436
onmousemove attribute, 564
onmousemove event, 436
onmouseout attribute, 564
onmouseout event, 436
onmouseover attribute, 564
onmouseover event, 436
onmouseup attribute, 564
onmouseup event, 436
onreset attribute, <form> element, 576
onreset event, 437
onselect attribute
<input type=”password”> element, 585
<input type=”text”> element, 588
onselect event, 437
onsubmit attribute, <form> element, 576
onsubmit event, 437
onsubmit event handler, 454
onunload attribute

<body> element, 570
<frameset> element, 578
onunload event, 436
open( ) method, 449
opening tags, 4
operators, 422, 424–425
arithmetic, 425
assignment, 425–426
binary, 424
731
operators
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 731
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
operators (continued)
Boolean, 427
comparison, 426
conditional operator, 432
logical, 427
string, 427
unary, 424
<optgroup> element, 161–163, 596
<option> element, 159, 597
ordered lists, 37–39, 491
outline-color property, 295
outline property, 296
outline-style property, 295
outline-width property, 295
outlines, 630
CSS, 294–295

outline-color property, 295
outline property, 296
outline-style property, 295
outline-width property, 295
P
<p> element, 21, 597
padding
CSS properties, 622–623
white space and, 362
page layout
above the fold, 331
aims of site, 324–325
categorization, 327–328
content, defining, 326–327
content pages, 345–346
CSS and, 356
elements, 329–330, 340–342
fixed-width designs, 331, 335–336
grouping, 327–328
home pages, 345
liquid designs, 331, 333–335
new content, 326
sacrificial columns, 354–355
single-column, 348–350
site map, creating, 328–329
structuring pages, 346–347
<table> element and, 334
tables, nested, 356–359
three-column layouts, 353–354
two-column, 350–352

visitors and, 325–326
width, 331
page size, screen resolution and, 330
palette attribute, <embed> element, 575
paragraphs, 21
<param> element, 567, 597
attributes, 97–98, 567, 596
parameters, 414, 441
parent elements, 5
parse( ) method, 442
password input controls, 147–148
path arguments, 61
percentage values, liquid designs, 333
PHP, 531–532
phrase elements, 29–30
PI property, 445
PICS (Platform for Internet Content Selection),
506
pilot testing, 516–517
pixels, 250
columns in framesets, 190
resolution, 79
<plaintext> element, 597, 688–689
pluginspage attribute, <embed> element, 575
PNG (Portable Network Graphics), 79, 83–84
pop-up windows, 486–487
ports, 60
position property, 306–307
positioning, CSS, 625–629
pow( ) method, 445

<pre> element
preformatted text, 22–23
width attribute, 597
preformatted text, 22–23
presentational elements, 26–28
preventing cached web pages, 505
print( ) method, 449
profile attribute, <head> element, 578
program output, 35
prompt( ) method, 449
prompt attribute, <isindex> element, 588
properties, 405
action, 415
alinkColor (DOM), 413
background, 283
background-attachment, 282
background-color, 276
background-image, 277–278
background-position, 281
background-repeat, 278–280
bgcolor (DOM), 413
border, 419
border-collapse, 289–291
box offset properties, 307
732
operators (continued)
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 732
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
caption-side, 292
checked, 416

closed, 448
complete, 419
content, 298
CSS
background, 614–617
borders, 617–619
classification, 632–634
color, 614–617
dimensions, 619–621
fonts, 607–611
internationalization, 634–635
lengths, 635
lists, 623–625
margins, 622
outlines, 630
padding, 622–623
positioning properties, 625–629
tables, 630–632
text, 611–614
cursor, 301–302
defaultStatus, 448
disabled, 416
display, 302
document, 448
DOM and, 410, 413–414
E, 444
empty-cells, 292–294
fgcolor (DOM), 413
float, 312–314
form, 416

frames, 448
height, 419
history, 448
hspace, 419
lastModified (DOM), 413
length, 415, 416, 438
linkColor (DOM), 413
list-style, 286
list-style-position, 285–286
list-style-type, 284–285
LN2, 444
LN10, 444
location, 448
LOG2E, 445
LOG10E, 445
lowersrc, 419
marker offset, 287
method, 415
name, 415, 416, 419, 448
outline, 296
outline-color, 295
outline-style, 295
outline-width, 295
PI, 445
position, 306–307
referrer (DOM), 413
selectedIndex, 416, 466
SQRT1_2, 445
SQRT2, 445
src, 419

status, 448
statusbar, 448
table-layout, 294
target, 415
title (DOM), 413
toolbar, 448
top, 448
type, 416
value, 416
visibility, 302–303
vlinkColor (DOM), 413
vspace, 420
width, 420
window, 448
z-index, 311–312
Prototype, 488
pseudo classes, 274
:active, 296
background-color property, 274
color property, 274
first-letter, 239–240
:focus, 296
text-decoration property, 274
Q
<q> element, 33, 598
queries, 376
Query String, 61
quotation marks, 300
quotes, 32, 33
R

radio buttons, 156–157, 383
validation and, 467–468
random( ) method, 445, 485
random script generator, 485–486
rating label, 506
rating web pages, 506–507
733
rating web pages
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 733
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
read-only controls, 176–177
readonly attribute
<input type=”checkbox”> element, 583
<input type=”file”> element, 583
<input type=”image”> element, 584
<input type=”password”> element, 585
<input type=”radio”> element, 586
<input type=”text”> element, 588
redirecting web pages, 506
referrer property (DOM), 413
refreshing web pages, 506
registration form example, 166–169, 180–182
Regular Expressions, 462
characters, 463
testing characters, 464–465
testing for, 465
rel attribute, 69–70
<a> element, 565
<link> element, 591

relative positioning, 307–308
relative URLs, 55, 59
<base> element, 64–65
importance of, 509
replace( ) method, 462
required information in forms, 393
reset( ) method, 415
resolution, 79
return statements, functions, 429
reusable functions, 454
rev attribute, 70, 565, 591
reverse( ) method, 447
RGB color space, 638
right navigation, 345
robots.txt, 524–525
rollover images, 405
round( ) method, 445, 485
rows attribute, 191–192, 578
rows (tables)
introduction, 109
shading multiple, 378–379
spanning, 129–130
rowspan attribute, 602, 604
rules attribute, 116–117, 600
S
<s> element, 27, 598, 687
sacrificial columns, 354–355
<samp> element, 35, 598
sample layout, 315–320
sample output, 35

sans-serif fonts, 367
scheme attribute, 508, 593
scope attribute, 602, 604
screen resolution
fixed-size fonts and, 369
page size and, 330
site testing, 514
<script> element, 406
attributes, 598
<head> element, 10
ordered list, 491
scriptable objects, 410
Scriptaculous, 488–492
scripting language, default, 508
scripts, 453–455, 485–486
scrollamount attribute, <marquee> element, 592
scrolldelay attribute, <marquee> element, 592
scrolling, scrolling select boxes, 159–160
scrolling attribute
<frame> element, 196, 577
<iframe> element, 207, 580
search engines, 522–525
search utilities, 530–531
select( ) method, 417, 475–476
select boxes, 158–163, 384
attributes, 163
options, 466–467
quick jump, 497
<select> element, 158–159, 598–599
selected attribute, <option> element, 597

selectedIndex property, 466
serif fonts, 367
server-side image maps, 100, 101–102
server-side language, 532
server-side web programming, 531–532
setDate( ) method, 443
setFullYear( ) method, 443
setHours( ) method, 443
setMinutes( ) method, 443
setMonth( ) method, 443
setSeconds( ) method, 443
setTime( ) method, 443
setUTCDate( ) method, 443
setUTCDay( ) method, 444
setUTCFullYear( ) method, 444
setUTCHour( ) method, 444
setUTCMilliseconds( ) method, 444
setUTCMinutes( ) method, 444
setUTCMonth( ) method, 444
734
read-only controls
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 734
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
setUTCSeconds( ) method, 444
setYear( ) method, 443
shape attribute, 70
<a> element, 565
<area> element, 567
Silverlight, 86
sin( ) method, 445

single-column layout, 348–350
single-line text input controls, 146–147
site registration form example, 397–401
site searches, 376–378
site testing, 508–509
accessibility checkers, 514–515
browser versions, 515
color depth, 514
CSS validation, 509–512
directory structure, importance of, 509
HTML validation, 509–512
link checking, 513–514
pilot testing, 516–517
relative URLs, importance of, 509
screen resolution, 514
XHTML validation, 509–512
size attribute
<basefont> element, 568
<font> element, 576
<input type=”file”> element, 583
<input type=”password”> element, 585
<input type=”text”> element, 588
<select> element, 599
slash (/ /) characters, 407
slashes, 462
slice( ) method, 447
small( ) method, 439
<small> element, 28, 599
sort( ) method, 447
sortable tables, MochiKit and, 492–493

spacing, borders, 291
span attribute, <col> element, 572
<span> element, 49–50, 599
special characters, 47, 450, 649–663
special terms, 32
sqrt( ) method, 445
SQRT1_2 property, 445
SQRT2 property, 445
src attribute, 86–87
<bgsound> element, 569
<embed> element, 575
<frame> element, 195, 577
<iframe> element, 206, 580
<img> element, 581
<input type=”image”> element, 584
<layer> element, 590
<script> element, 598
src property, 419
standby attribute, 96
start attribute
<img> element, 581
lists, 699
<ol> element, 596
statistical analysis, 526–527
status property, 448
statusbar property, 448
stop( ) method, 449
Strict XHTML, 8
strike( ) method, 439
<strike> element, 27, 599, 687

strikethrough text, 27
string data types, 451
string object, 437–440
string operator, 427
strings, 414, 462
<strong> element, 30, 599
structure of document, 3
structuring pages, 346–347
sacrificial columns, 354–355
single-column layout, 348–350
three-column layouts, 353–354
two-column layouts, 350–352
style attribute, 13–14, 564
<br /> element, 570
<frame> element, 577
<hr /> element, 579
<isindex> element, 589
<style> element, 599
CSS, 220
<head> element, 10
style sheet for code, 265–270
style sheet languages, default, 508
sub( ) method, 439
<sub> element, 28, 599
submit( ) method, 415
subscript text, 28
substr( ) method, 439
substring( ) method, 439, 474–475
subtraction (-) operator, 425
summary attribute, 117, 600

sup( ) method, 439
<sup> element, 28, 599
superscript text, 28
735
superscript text
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 735
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
SVG (Scalable Vector Graphics), 85
switch statement, 431–432
T
tab (t), 463
tabbing order, 173–174
tabindex attribute, 70, 97
<a> element, 565
<area> element, 567
<button> element, 571
<fieldset> element, 575
<input type=”button”> element, 582
<input type=”checkbox”> element, 583
<input type=”file”> element, 583
<input type=”image”> element, 584
<input type=”password”> element, 585
<input type=”radio”> element, 586
<input type=”reset”> element, 586
<input type=”submit”> element, 587
<input type=”text”> element, 588
<isindex> element, 589
<marquee> element, 592
<select> element, 599

<table> element
attributes, 113–117, 493, 600–601
introduction, 109
page layout and, 334
table-layout property, 294
tables
body, 125–128
cells, 109
columns, 109, 128–132
CSS, 287–294
CSS properties, 630–632
foot, 125–128
forms, 389–391
heads, 125–128
introduction, 109–112
linearization, 132–136
nested, 356–359
nowrap attribute, 703
rows, 109
shading multiple, 378–379
spanning, 129–130
sortable, MochiKit and, 492–493
taborder attribute
<input type=”button”> element, 582
<input type=”checkbox”> element, 583
<input type=”file”> element, 583
<input type=”image”> element, 584
<input type=”password”> element, 585
<input type=”radio”> element, 586
<input type=”reset”> element, 586

<input type=”submit”> element, 587
<input type=”text”> element, 588
tags, 3–5
tan( ) method, 445
target attribute, 70
<a> element, 565
<area> element, 567
<base> element, 568
<form> element, 576
<tbody> element, 126, 601
<td> element
attributes, 119–122, 493, 601–602
test( ) method, 464
testing characters, 464–465
testing for
alphabetic characters, 465
alphanumeric characters, 465
credit card details, 465
currency, 465
decimal numbers, 465
e-mail addresses, 465
white space, 465
testing forms, 397
testing site, 508–509
accessibility checker, 514–515
browser versions, 515
color depth, 514
CSS validation, 509–512
directory structure, importance of, 509
HTML validation, 509–512

link checking, 513–514
pilot testing, 516–517
relative URLs, importance of, 509
screen resolution, 514
XHTML validation, 509–512
text
abbreviations, 31
acronyms, 31
alignment, readability and, 365
auto-completing, 495–496
background images and, 366–367
bold, 26
case conversion, 474
columns, width, 366
CSS properties, 611–614
editing, 45–46
736
SVG (Scalable Vector Graphics)
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 736
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
emphasized, 30
fonts, 367–368
formatting, 23–26
forms, disabling input, 472–474
input, forms, 145–150
italic, 26–27
keyboard, 34–35
line height, readability and, 365–366
markup, 41–45
monospaced font, 27

selecting all content area of form, 475–476
strikethrough, 27
strong, 30
subscript, 28
superscript, 28
underlined, 27
white space and, 362–364
text attribute, 570, 685
text boxes, 384
text fields, required, validation, 459–461
text formatting, 16–18
text links, 375
<textarea> element, attributes, 602–603
<tfoot> element, 126, 603
<th> element, 110
attributes, 119–122, 493, 604
<thead> element, 126
attributes, 603
three-column layouts, 353–354
timetable example, 122–125
title attribute, 13, 55, 70, 564
<br /> element, 570
form controls, 394–395
<frame> element, 577
<hr /> element, 579
<isindex> element, 589
<title> element, 11, 605
title property (DOM), 413
toGMTString( ) method, 443
toLocalString( ) method, 443

toLowerCase( ) method, 439, 474
toolbar property, 448
top attribute, <layer> element, 590
top navigation, 343
top property, 448
topmargin attribute, <body> element, 570
toString( ) method, 443
toUpperCase( ) method, 439, 474
<tr> element, 117–118, 605
Transitional XHTML, 8
Transmit, 521
transparent background, 81
<tt> element, 27, 606
two-column layouts, 350–352
type attribute, 71, 98
<a> element, 565
<button> element, 571
<embed> element, 575
<li> element, 574, 591, 593
<link> element, 591
lists, 700–701
<ol> element, 596
<param> element, 567, 596
<script> element, 598
<ul> element, 606
type selector, 243
U
<u> element, 27, 606, 687–688
UI event attributes, 15–16
<ul> element, 36–37, 606

unary operators, 424
undefined data types, 451
underlined text, 27
units attribute, <embed> element, 575
unordered lists, 36–37
unversal selector, 243
uptime, 520
URLs
absolute, 59, 61–64
credentials, 60
filepath, 60
fragment identifiers, 61
host address, 60
path arguments, 61
ports, 60
Query String, 61
relative, 55, 59, 61–65
scheme, 59
usemap attribute, 90, 97, 581
user events, 435
username variable, length property, 458
V
validate( ) function, 457
validating forms
checkboxes, 468–469
finding characters, 462–464
737
validating forms
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 737

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
validating forms (continued)
preventing submission until checkbox selection,
469–470
radio buttons, 467–468
select box options, 464–465
testing characters, 464–465
text fields, 457–461
when, 456
validation( ) function, 457
valign attribute, 118–119
<caption> element, 571
<col> element, 572
<colgroup> element, 573
<table> element, 601
<tbody> element, 601
<td> element, 602
<tfoot> element, 603
<th> element, 604
<thead> element, 603
<tr> element, 605
value attribute, 97
<button> element, 571
<input type=”button”> element, 582
<input type=”checkbox”> element, 583
<input type=”file”> element, 583
<input type=”hidden”> element, 584
<input type=”image”> element, 584
<input type=”password”> element, 585
<input type=”radio”> element, 586

<input type=”reset”> element, 586
<input type=”submit”> element, 587
<input type=”text”> element, 588
<li> element, 574, 591
lists, 700
<option> element, 597
<param> element, 567, 596
valuetype attribute, 97–98, 596
<var> element, 35, 606
variables (JavaScript), 422–424
vector graphics, 78, 85–86
version attribute, 579, 704
version control, 527–529
vertical tab (v), 463
visibility attribute, <layer> element, 590
visibility property, 302–303
vlink attribute, <body> element, 570
vlinkColor property (DOM), 413
vspace attribute, 90, 96, 695–696
<embed> element, 575
<img> element, 582
<marquee> element, 592
<table> element, 601
vspace property, 420
W
<wbr> element, 606
W3C DOM objects, 422
web hosting, 518
web marketing, 525–526
web pages, 505–507

web site
aims, 324–325
categorization, 327–328
content, defining, 326–327
grouping, 327–328
new content, 326
site map, creating, 328–329
uploading, FTP and, 520–522
version control, 527–529
visitors, 325–326
while loops, 432, 433
white space, 17–18, 362–364, 465
white-space character (s), 463
width attribute, 88–89, 96, 117, 693–694,
694–695
<col> element, 572
<colgroup> element, 573
<embed> element, 575
<hr /> element, 579
<iframe> element, 206, 580
<img> element, 582
<layer> element, 590
<marquee> element, 592
<multicol> element, 593
<pre> element, 597
<table> element, 601
<tbody> element, 601
<td> element, 602
<tfoot> element, 603
<th> element, 604

<thead> element, 603
width property, 420
window events, 435
738
validating forms (continued)
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 738
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
window object, 447–449
window property, 448
windows, pop-up windows, 486–487
wireframe model, element placement and, 338
word (w), 463
wrapping text, 17
write( ) method, 406, 414
writeln( ) method, 414
X
XHTML (Extensible Hypertext Markup
Language), 2
case sensitivity, 8
Frameset, 8
Strict, 8
Transitional, 8
XHTML validation, 509–512
xml attribute, 564
XML Declaration, 8
XML (Extensible Markup Language), 8
xml:lang attribute, 15
<comment> element, 573
<head> element, 578
<html> element, 580

<isindex> element, 589
<meta> element, 593
<title> element, 605
xmlns attribute, <html> element, 580
<xmp> element, 606, 688–689
Y
YUI (Yahoo User Interface), 494–496
Z
z-index attribute, <layer> element, 590
z-index property, 311–312
739
z-index property
Index
59313bindex.qxd:WroxPro 3/23/08 3:08 PM Page 739
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Take your library
wherever you go.
Now you can access more than 200 complete Wrox books
online, wherever you happen to be! Every diagram, description,
screen capture, and code sample is available with your
subscription to the Wrox Reference Library. For answers when
and where you need them, go to wrox.books24x7.com and
subscribe today!
Programmer to Programmer
TM
• ASP.NET
• C#/C++
• Database
• General
• Java

• Mac
• Microsoft Office
• .NET
• Open Source
• PHP/MySQL
• SQL Server
• Visual Basic
• Web
• XML
Find books on
www.wrox.com
59313badvert.qxd:WroxPro 3/23/08 3:54 PM Page 740
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

×