by Vivian Neou
Table of Contents i
List of Tables xxv
Acknowledgments xxix
Introduction xxxi
- Why You Need This Book xxxii
- What Is HTML? xxxii
- The HTML Number Jumble xxxiii
- Scripting, Java Applets, and ActiveX xxxiv
- Cascading Style Sheets xxxiv
- Dynamic HTML xxxv
- What This Book Can Do for You xxxv
- Conventions Used in This Book xxxvi
- Contents of the CD xxxvi
- What You Should Know xxxviii
Chapter 1: The World Wide Web and HTML
- What's In This Chapter 1
- HTML and the Internet 2
- Terminology Tour 4
- HTML Evolution in a Capsule 5
- The HTML Version Games Begin 6
- Deprecated Elements 7
- Vendor-specific Elements and Attributes 8
- Cascading Style Sheets 9
- Java and ActiveX 9
- Scripting 11
- Dynamic HTML 11
- Browsers 12
- HTML and Browsers 14
- Getting Browsers 18
- Screenshots in This Book 19
Chapter 2: HTML Quick Start
- What's in This Chapter 21
- Creating an HTML Document 21
- HTML Document Organzation 22
- Document Type: DOCTYPE 23
- Document Structure: HTML, HEAD, and BODY 23
- Document Title: TITLE 24
- Document Body: BODY 24
- Headings: H1 through H2 25
- Paragraphs: <P> 25
- Logical and Physical Style Elements 25
- Horizontal Lines: HR 26
- Preformatted Text: PRE 26
- Center: CENTER 27
- Lists 28
- Images: IMG 29
- Line Breaks: BR 30
- Addresses: ADDRESS 30
- Comments: <! --> 30
- The Quick-Start Document 30
- Quick Review 31
Chapter 3: Document Framework
- What's in This Chapter 33
- Document Type: DOCTYPE 33
- Document Structure 35
- Document Heading: HEAD 37
- Document Title: TITLE 38
- Document Body: BODY 41
- Background Color: BGCOLOR (deprecated) 42
- Default Text Colors: TEXT, LINK, ALINK, VLINK (deprecated) 43
- Background Images: BACKGROUND (deprecated), BGPROPERTIES (IE) 43
- Choosing a Background Image 44
Chapter 4: Basic Body Elements
- What's in This Chapter 47
- Common Attributes 47
- Presentation through Style Sheets: STYLE 48
- Headings: H1 through H2 48
- ALIGN Attribute (deprecated) 49
- STYLE Property: text-align 50
- Paragraphs: P 52
- ALIGN Attribute (deprecated) 53
- STYLE Property: font-family 55
- Logical and Physical Style Elements 55
- BIG and SMALL 59
- Logical versus Physical Styles 60
- Subscript and Superscript: SUB, SUP 61
- Font Settings: FONT (deprecated) 62
- SIZE Attribute 62
- Color Attribute 63
- FACE Attribute 64
- Netscape Attributes: POINT-SIZE, WEIGHT 64
- WebTV Attributes: EFFECT, TRANSPARENCY 66
- Default Font Size: BASEFONT (deprecated) 67
- Special Characters 68
- Horizontal Lines: HR 70
- HR Attributes (deprecated): SIZE, WIDTH, ALIGN, NOSHADE 70
- Preformatted Text: PRE 71
- Quotations: BLOCKQUOTE and Q 72
- Line Breaks: BR 73
- CLEAR Attribute 74
- No Break: NOBR 75
- Word Break: WBR 76
- Addresses: ADDRESS 77
- Center: CENTER (deprecated) 78
- DIV and SPAN 78
- Comments: <! --> 80
- Common Attributes Revisited 81
- ID Attribute 81
- CLASS Attribute 82
- TITLE Attribute 82
- The Good, the Bad, and the Ugly 82
Chapter 5: Lists
- What's in This Chapter 85
- Creating a List 86
- Specifying Items in Lists: LI 87
- Unnumbered Lists: UL 87
- TYPE Attribute (deprecated) 88
- Numbered Lists: OL 89
- OL Attributes: TYPE and START (deprecated) 89
- LI Attributes: TYPE and VALUE (deprecated) 91
- STYLE: list-style-type 93
- Directory List: DIR (deprecated) 95
- Menu List: MENU (deprecated) 95
- Definition Lists: DL 96
- COMPACT Attribute (deprecated) 97
- Multiple-Paragraph List Items 98
- Nested Lists 100
- The Good, the Bad, and the Ugly 102
Chapter 6: URLs, Links, and META
- What's in This Chapter 103
- Uniform Resource Locators 104
- URLs without a Filename 104
- Anchor Element: A 105
- TITLE Attribute 106
- TARGET Attribute 107
- JavaScript: onClick and Window Properties 107
- JavaScript: Focus 109
- JavaScript: onMouseOver 110
- Relative Links 111
- Specific Locations in Other Documents 112
- Specific Locations within the Current Document 113
- References within a Document 114
- Special Characters in URLs 114
- Other Ways to Use Links 115
- FTP 116
- File 117
- Mailto 118
- Telnet 121
- Gopher 121
- News 122
- Link Trivia 123
- Document Relations: LINK 124
- Meta Information: META 125
- Forcing Document Reload: HTTP-EQUIV="EXPIRES" 127
- Automatic Document Refresh: 127
- HTTP-EQUIV="REFRESH" 127
- BASE Element 128
- The Good, the Bad, and the Ugly 129
Chapter 7: Tables
- What's In This Chapter 131
- Tables: TABLE 131
- Table Attributes 132
- Captions: CAPTION 140
- VALIGN 141
- Rows and Cells: TR, TD, TH 142
- Cell Attributes 143
- Row Groupings: THEAD, TFOOT, TBODY 145
- Column Groups: COLGROUP and COL 146
- COLGROUP 146
- COL 147
- Attribute Precedence 148
- Designing with Tables 149
- Page Layout with Tables 150
- Bar Graph Example 151
- Making Lists with Tables 153
- Groupings and More 154
- Fonts in Tables 157
- Tables in Browsers without Table Support 158
- The Good, The Bad, and The Ugly 159
Chapter 8: Frames
- FRAMESET 162
- Frames: FRAME 167
- Frame Navigation: TARGET and BASE 171
- BASE 172
- TARGET Attribute 173
- Predefined Targets 173
- Frame Navigation Guidelines 174
- Updating Multiple Frames: onClick 175
- Content for Browsers without Frame Support: NOFRAMES 176
- Frame Tips 178
- IFRAME 178
Chapter 9: Color and Images
- What's in This Chapter 185
- Color Values 186
- RGB Color Values 186
- Color Depth and Dithering 187
- Browser-Safe Color Palette 188
- Check Your Color Depth 189
- Text Color Guidelines 190
- Images in HTML Documents 190
- Graphics Formats 190
- Choosing an Image Format 191
- Graphics Interchange Format (GIF) 192
- Interlaced GIFs 193
- JPEG 193
- GIF vs. JPEG 194
- Other Image Formats 194
- Progressive JPEG 194
- PNG 195
- Image Tips and Tricks 195
- Transparent Backgrounds 196
- Reducing Image Size 198
- Thumbnails 198
- Gamma 199
- Image Element: IMG 200
- Aligning Images: ALIGN Attribute 201
- Additional Extensions to ALIGN 202
- Images and Text-Only Browsers: ALT Attribute 204
- BORDER (deprecated) 204
- WIDTH and HEIGHT 205
- HSPACE and VSPACE 206
- Low-Resolution Image: LOWSRC 208
- Image Maps, Images with Clickable Spots 209
- Choosing Images for Image Maps 210
- Server-Side Image Map Formats 210
- Server-Side Clickable Images: ISMAP 212
- Client-Side Image Maps 212
- Client-Side Image Map Format: AREA and MAP 213
- Client-Side Clickable Images: USEMAP 214
- Supporting All Users 215
- The Good, the Bad, and the Ugly 216
Chapter 10: Animations, Sound, and Video
- What's In This Chapter 217
- Animation 218
- Server Push Animations 218
- Client Pull: META Refresh 219
- GIF89a Animations 221
- Creating a GIF Animation 222
- Installing GIF Construction Set 222
- Starting a Image 223
- Header Block 223
- Loop Block 224
- Image Import 224
- Tips and Techniques 227
- Interactive Animation 227
- Java Applet Animation 228
- 1 Cool Button Tool Pros and Cons 233
- Macromedia Flash 233
- Sound 234
- Sound Issues 236
- Internet Explorer Sound Support: BGSOUND 237
- Macromedia's Shockwave 238
- Embedded Objects: EMBED 239
- Alternate Objects: NOEMBED 240
- Background Sound Example 241
- Video 242
- QuickTime 243
- MPEG 243
- Streaming Video 244
- Incorporating Video 244
- IMG DYNSRC Attribute 245
- Viewing and Serving Video 246
- The Good, the Bad, and the Ugly 246
Chapter 11: Forms
- What's in This Chapter 249
- Introduction 249
- Forms: FORM 250
- METHOD Attribute 250
- ACTION Attribute 251
- ENCTYPE Attribute 253
- Form Input: INPUT 254
- TYPE Attribute 256
- CHECKBOX Type 256
- RADIO Type 258
- HIDDEN Type 259
- TEXT Type 260
- PASSWORD Type 260
- SUBMIT and RESET Types 261
- IMAGE Type 262
- BUTTON Input Type 263
- FILE Input Type 266
- TEXTAREA Input Type 267
- Textarea: TEXTAREA 268
- TEXTAREA Attribute: WRAP 268
- Pulldown Menu: SELECT, OPTION, and OPTGROUP 269
- SELECT 269
- SIZE Attribute 271
- MULTIPLE Attribute 271
- OPTION Element 272
- Menu Groupings: OPTGROUP 273
- Navigation with SELECT 275
- BUTTON Element 275
- Label, Fieldset, and Legend 277
- ISINDEX (deprecated) 279
- PROMPT Attribute 279
- ISINDEX Examples 279
- ISINDEX ACTION Attribute 282
- ISINDEX Data Flow 282
- ISINDEX versus FORM 283
- The Good, the Bad, and the Ugly 284
Chapter 12: Cookies and Server-Side Page Creation
- What's in This Chapter 287
- Cookies 288
- Restrictions 289
- Baking Cookies 290
- Browser Gotchas and Cookies 291
- Checking Your Cookies 292
- CGI Scripts 293
- Creating CGI Scripts 295
- Headers 295
- Redirect Script 296
- Environment Variables 296
- Environment Variable Script 300
- Time Stamp CGI Script 301
- Dynamic Document Refresh 302
- Setting a Cookie with a CGI 303
- POST versus GET 305
- GET Method: METHOD="GET" 306
- POST Method: METHOD="POST" 306
- Form Data Format 306
- File Upload 308
- Serving Documents Based on Browser Type 308
- Security 309
- Using Premade CGI Scripts 310
- Sources for CGI Programs and Scripts 310
- Server-Side Includes 311
- Configuration: config 311
- Document Inclusion: include 314
- Command Execution: exec 315
- Other Directives: echo, fsize, flastmod 315
- SSI Pros and Cons 316
- Other Server-Side Options 317
- Active Server Pages (ASP) 317
- LiveWire 318
- HTMLScript and PHP 318
- Secure Servers 319
- Wrapup 319
Chapter 13: Embedded Objects: Java and ActiveX
- Java Applets 321
- ActiveX 323
- VRML: Virtual Reality Markup Language 324
- Including External Objects 324
- Embed Element 325
- Applet Element 325
- PARAM Element 328
- Object Element 328
- What's Next 330
Chapter 14: Cascading Style Sheets
- What's in This Chapter 331
- What Is a Cascading Style Sheet? 332
- Style Sheet Rules 333
- Selectors 334
- Contextual Selectors 334
- Classes 335
- ID 336
- Pseudo-Classes and Pseudo-Elements 338
- Pseudo-Classes 338
- Pseudo-Elements 339
- Using Pseudo-Elements and Pseudo-Classes 339
- Comments 339
- Incorporating Style Sheets 340
- STYLE Attribute 340
- STYLE Tag 340
- LINK and @import 341
- The Cascade 342
- Important 342
- Inheritance 343
- Cascade Rules 343
- Units 344
- Absolute 345
- Relative 346
- Choosing a Unit of Measurement 347
- The Browser Connection 349
- CSS Properties 351
- Font Properties 352
- font-family 352
- font-style 354
- font-variant 354
- font-weight 355
- font-size 357
- font 358
- Color and Background Properties 360
- color 361
- background-color 362
- background-image 363
- background-repeat 364
- background-attachment 365
- background-position 365
- background 366
- Text Properties 366
- word-spacing 367
- letter-spacing 367
- text-decoration 368
- vertical-align 369
- text-transform 371
- text-align 372
- text-indent 373
- line-height 373
- Classification and List Properties 374
- white-space 375
- list-style-type 376
- list-style-image 378
- list-style-position 378
- list-style 379
- Drawbacks to Style Sheet Usage 379
- Style Sheets versus HTML Presentational Elements 379
- Style Sheet Tools 380
- Onward 380
Chapter 15: Positioning with Style Sheets
- What's In This Chapter 381
- Background 382
- Box Properties 382
- margin-top 383
- margin-right 384
- margin-bottom 384
- margin-left 385
- margin 385
- padding-top 386
- padding-right 387
- padding-bottom 387
- padding-left 387
- padding 388
- border-top-width 389
- border-right-width 390
- border-bottom-width 391
- border-left-width 392
- border-width 392
- border-color 394
- border-style 395
- border-top 398
- border-right 399
- border-bottom 399
- border-left 399
- border 400
- Display Properties 400
- width 400
- height 401
- Positioning Properties 401
- position 402
- float 404
- clear 408
- top, left, right (CSS2), bottom (CSS2) 409
- z-index 409
- overflow 413
- clip 414
- display 414
- visibility 416
- Cautionary Notes 417
Chapter 16: Scripting Overview
- JavaScript versus VBScript 420
- JavaScript Versions and ECMAScript 421
- Incorporating Scripts in HTML Documents 422
- Browsers That Do Not Support Scripts 426
- NOSCRIPT Tag 428
- Script Placement 429
- Embedding Script Directives in HTML Tags 431
- External Scripts 431
- Case-sensitivity 432
- JavaScript Variables 432
- Converting Strings to Numbers 433
- Variable Names 435
- Special Characters in Strings 436
- Operators 437
- Assignment Operators 437
- Arithmetic Operators 437
- Concatenation Operator 438
- Logical Operators 439
- Comparison Operators 439
- Operator Precedence 440
- Creating New Objects 441
- Miscellaneous Operators: typeof and void 441
- Comments 442
- Statements 443
- break 443
- continue 444
- delete 445
- do...while 445
- export 446
- for 447
- for...in 447
- function 448
- if...else 449
- import 449
- labeled 450
- return 451
- switch/case 451
- this 452
- var 453
- while 453
- with 454
- Conditional Expressions 454
- Global Functions 455
- escape 455
- isNaN 456
- Number 456
- String 457
- unescape 458
- What's Next 458
Chapter 17: Objects
- Built-in Objects 461
- Date Object 462
- Methods 463
- Math Object 471
- Properties 472
- Methods 473
- String Object 475
- String Methods 476
- Client-side Objects 481
- Window Object 483
- Properties 485
- Window Methods 487
- Location Object 489
- Document Object 490
- Properties 491
- Form Object 493
- Properties 495
- Methods 496
- Frame Object 497
- Image Object 498
- Navigator Object 500
- Methods 502
- MimeType Object 504
- Plugin Object 505
- Methods 505
- Event Handlers 507
- What's Next 509
Chapter 18: JavaScript Examples
- View Source Button 512
- Browser Detection 513
- Checking for Features 513
- The Language Attribute 514
- Checking for Browser Type 516
- Browser Support for Specific Features 520
- Menu Bar Highlights 520
- Animation 524
- Customizing the Script 527
- Color the House Script 527
- The Nightmare: A Tale of Two Positions 531
- Simple Database Lookup 535
- Customizing the Database 541
- JavaScript Forms Calculator 541
- Printing the Form 542
- Order-Total Calculator 543
- Required Field Checker 547
- Adapting the Form 549
- Customized Web Pages with Cookies 549
- Retrieving Cookies 551
- Removing a Cookie 552
- The Good, the Bad, and the Ugly 553
Chapter 19: On the Internet
- What's In This Chapter 555
- Criteria for Choosing a Provider 555
- Publicizing Your Web Pages 557
- Personal and Hobby Home Pages 558
- Search Engines 558
- Indexing Tips 559
- Indices of Meta Web Search Engines 561
- Hiding Your Site 561
- Checking Your Site Status 562
- Making an Even Bigger Splash 562
- Getting Mentioned in the News 563
- Places to Go for More Help 563
- The Latest Book News 565
Appendix A: ISO Latin 1 Entities in HTML
Appendix B: Hexadecimal ASCII Character Set
Appendix C: Useful URLs
- General HTML and WWW Information 573
- HTML Bibliographies 574
- Browser Information 574
- HTML Elements 574
- CGI and Cookie Information 575
- HTML Validation 575
- Multimedia 576
- JavaScript and Java 577
Glossary 579
Index 597
Vivian Neou, vivian@catalog.com
Copyright © 1999 Vivian Neou