As both the Web and the browsers used to navigate it mature, work-arounds that compensate for the myriad factors that affect Web page appearance no longer cut it. Users expect Web pages to look beautiful regardless--and with the Fifth Edition of this popular Visual QuickStart Guide, you can make your Web pages comply. By following the generously illustrated, step-by-step instructions that are the hallmark of the Visual QuickStart series, you'll create beautiful code that works consistently across browser versions and platforms (including hand-held devices and cell phones) in no time. This updated edition includes a new section on foreign-language and multilingual Web sites as well as ample coverage on how the use of HTML is changing. What hasn't changed, however, is the book's popular format: Task-oriented, step-by-step instruction that builds on your growing knowledge. Info-packed appendixes, a comprehensive index, and plenty of screen shots and code examples make HTML for the World Wide Web, Fifth Edition, with XHTML and CSS: Visual QuickStart Guide a must-have reference. Whether you're just getting your feet wet (no prior HTML knowledge is required) or design Web sites for a living, you'll turn to this best-selling guide again and again for answers to all of your HTML-related questions. This step-by-step guide on using Hypertext Markup Language to design pages for the Web presumes no prior knowledge of HTML, or even the Internet. It uses clear, concise instructions for creating each element of a Web page, and covers everything from titles and headers to complex tables and "clickable" graphics. 224 pp. Cover......Page 1 Table of Contents......Page 6 Introduction......Page 13 The Internet, the Web, and HTML......Page 14 Open but Not Equal......Page 15 The Browser Wars......Page 16 The Push for Standards......Page 17 The Real World......Page 20 What Should You Use?......Page 21 How This Book Works......Page 23 The HTML VQS Web Site......Page 24 Chapter 1: Web Page Building Blocks......Page 25 Markup: Elements, Attributes, and Values......Page 26 A Web Page’s Text Content......Page 30 Links, Images, and Other Non-Text Content......Page 31 File Names......Page 32 URLs......Page 33 HTML vs XHTML......Page 36 Versions, flavors, and DOCTYPE......Page 38 The Default Display of (X)HTML......Page 40 Adding Style to Your Web Pages......Page 41 The Cascade: When Rules Collide......Page 42 A Property’s Value......Page 44 Chapter 2: Working with Web Page Files......Page 47 Designing Your Site......Page 48 Creating a New Web Page......Page 49 Saving Your Web Page......Page 50 About Microsoft Word and Web Pages......Page 52 Specifying a Default or “Home” Page......Page 53 Editing Web Pages......Page 54 Organizing Files......Page 55 Viewing Your Page in a Browser......Page 56 The Inspiration of Others......Page 57 Chapter 3: Basic (X)HTML Structure......Page 59 Starting Your Web Page......Page 60 Creating the Foundation......Page 62 Declaring the Encoding......Page 63 Creating a Title......Page 64 Creating Section Headers......Page 65 Starting a New Paragraph......Page 66 Naming Elements......Page 67 Breaking up a Page into Divisions......Page 68 Creating Inline Spans......Page 69 Creating a Line Break......Page 70 Adding Comments......Page 71 Labeling Elements in a Web Page......Page 72 Chapter 4: Basic (X)HTML Formatting......Page 73 Making Text Bold or Italic......Page 74 Changing the Size of Text......Page 75 Using a Monospaced Font......Page 76 Using Preformatted Text......Page 77 Quoting Text......Page 78 Creating Superscripts and Subscripts......Page 80 Marking Changed Text......Page 81 Explaining Abbreviations......Page 82 Chapter 5: Creating Web Images......Page 83 About Images for the Web......Page 84 Getting Images......Page 89 The Save for Web Command......Page 90 Making Images Smaller......Page 92 Creating Transparency......Page 93 Saving Images with Transparency......Page 94 Simulating Transparency......Page 95 Using (Mostly) Browser Safe Colors......Page 96 Reducing the Number of Colors......Page 98 Showing Images Progressively......Page 99 Blurring Images to Aid JPEG Compression......Page 100 Creating Animated GIFs......Page 101 Chapter 6: Using Images......Page 103 Inserting Images on a Page......Page 104 Offering Alternate Text......Page 105 Specifying Size for Speedier Viewing......Page 106 Scaling an Image......Page 108 Linking Thumbnails to Images......Page 109 Making Images Float......Page 110 Stopping Elements from Wrapping......Page 112 Adding Space around an Image......Page 113 Aligning Images......Page 114 Adding Horizontal Rules......Page 115 Chapter 7: Links......Page 117 Creating a Link to Another Web Page......Page 118 Creating Anchors......Page 120 Linking to a Specific Anchor......Page 121 Targeting Links to Specific Windows......Page 122 Setting the Default Target......Page 123 Creating Other Kinds of Links......Page 124 Creating Keyboard Shortcuts for Links......Page 126 Setting the Tab Order for Links......Page 127 Using Images to Label Links......Page 128 Dividing an Image into Clickable Regions......Page 129 Creating a Client-Side Image Map......Page 130 Using a Server-Side Image Map......Page 132 Chapter 8: Creating Styles......Page 133 Constructing a Style Rule......Page 134 Constructing Selectors......Page 135 Selecting Elements by Name......Page 136 Selecting Elements by Class or ID......Page 137 Selecting Elements by Context......Page 138 Selecting Link Elements Based on Their State......Page 141 Selecting Part of an Element......Page 142 Selecting Elements Based on Attributes......Page 144 Specifying Groups of Elements......Page 145 Combining Selectors......Page 146 Chapter 9: Applying Styles......Page 147 Creating an External Style Sheet......Page 148 Linking External Style Sheets......Page 149 Offering Alternate Style Sheets......Page 150 Creating an Internal Style Sheet......Page 151 Importing External Style Sheets......Page 152 Applying Styles Locally......Page 153 The Importance of Location......Page 154 Adding Comments to Style Rules......Page 155 Chapter 10: Formatting with Styles......Page 157 Choosing a Font Family......Page 158 Embedding Fonts on a Page......Page 159 Creating Italics......Page 160 Applying Bold Formatting......Page 161 Setting the Font Size......Page 162 Setting the Line Height......Page 164 Setting All Font Values at Once......Page 165 Setting the Text Color......Page 166 Changing the Text’s Background......Page 167 Controlling Spacing......Page 168 Adding Indents......Page 169 Setting White Space Properties......Page 170 Aligning Text......Page 171 Changing the Text Case......Page 172 Using Small Caps......Page 173 Decorating Text......Page 174 Chapter 11: Layout with Styles......Page 175 Structuring Your Pages......Page 176 The Box Model......Page 177 Displaying and Hiding Elements......Page 178 Positioning Elements Absolutely......Page 179 Affixing an Element to the Browser Window......Page 180 Offsetting Elements In the Natural Flow......Page 181 Changing the Background......Page 182 Changing the Foreground Color......Page 184 Changing the Cursor......Page 185 Setting the Border......Page 186 Adding Padding around an Element......Page 188 Setting the Margins around an Element......Page 189 Setting the Height or Width for an Element......Page 190 Positioning Elements in 3D......Page 192 Determining Where Overflow Should Go......Page 193 Making Elements Float......Page 194 Controlling Where Elements Float......Page 195 Aligning Elements Vertically......Page 196 Chapter 12: Style Sheets for Printing......Page 197 Using Media-Specific Style Sheets......Page 198 How Print Style Sheets Differ......Page 199 Controlling Page Breaks......Page 200 Other Print Specific CSS Properties......Page 201 Chapter 13: Lists......Page 203 Creating Ordered and Unordered Lists......Page 204 Choosing Your Markers (Bullets)......Page 206 Choosing Where to Start List Numbering......Page 207 Using Custom Markers......Page 208 Controlling Where Markers Hang......Page 209 Setting All List-Style Properties at Once......Page 210 Creating Definition Lists......Page 211 Styling Nested Lists......Page 212 Chapter 14: Tables......Page 215 Mapping Out Your Page......Page 216 Creating a Simple Table......Page 217 Adding a Border......Page 218 Setting the Width......Page 220 Centering a Table on the Page......Page 222 Wrapping Text around a Table......Page 223 Combining Tables......Page 224 Aligning a Cell’s Contents......Page 226 Changing the Background......Page 228 Controlling the Space......Page 230 Spanning a Cell across Columns......Page 232 Spanning a Cell across Rows......Page 233 Dividing Your Table into Column Groups......Page 234 Dividing the Table into Horizontal Sections......Page 236 Choosing Which Borders to Display......Page 237 Controlling Line Breaks in a Cell......Page 239 Speeding up Table Display......Page 240 Chapter 15: Frames......Page 241 Creating a Simple Frameset......Page 242 Creating Frames in Columns......Page 244 Creating Frames in Rows and Columns......Page 245 Combining Framesets......Page 246 Creating an Inline Frame......Page 248 Adjusting a Frame’s Margins......Page 249 Showing or Hiding Scroll Bars......Page 250 Adjusting the Color of the Borders......Page 251 Adjusting the Frame Borders......Page 252 Keeping Visitors from Resizing Frames......Page 254 Targeting Links to Particular Frames......Page 255 Targeting Links to Special Spots......Page 256 Changing the Default Target......Page 257 Nesting Framesets......Page 258 Offering Alternatives to Frames......Page 259 Embedding Content with Objects......Page 260 Making Frames More Accessible......Page 262 Chapter 16: Forms......Page 263 About CGI Scripts......Page 264 Getting a Script......Page 266 Using the Scripts Included with This Book......Page 267 Preparing a Script......Page 268 Creating a Form......Page 269 Sending Form Data via E-mail......Page 270 Using a Form Hosting Service......Page 271 Creating Text Boxes......Page 272 Creating Password Boxes......Page 273 Creating Radio Buttons......Page 274 Creating Checkboxes......Page 275 Creating Menus......Page 276 Creating Larger Text Areas......Page 278 Allowing Visitors to Upload Files......Page 279 About Hidden Fields......Page 280 Adding Hidden Fields to a Form......Page 281 Creating the Submit Button......Page 282 Resetting the Form......Page 284 Using an Image to Submit Data......Page 286 Organizing the Form Elements......Page 287 Formally Labeling Form Parts......Page 288 Setting the Tab Order in a Form......Page 289 Adding Keyboard Shortcuts......Page 290 Disabling Form Elements......Page 291 Keeping Elements from Being Changed......Page 292 Chapter 17: Multimedia......Page 293 Of Plugins and Players......Page 294 Getting Players for Your Visitors......Page 296 Getting Multimedia Files......Page 297 Embedding QuickTime Movies......Page 298 Scaling a QuickTime Movie......Page 300 Looping a QuickTime Movie......Page 301 Putting QuickTime Sounds on a Page......Page 302 Hiding QuickTime Sounds......Page 303 Embedding Windows Media Player Files......Page 304 Inserting Java Applets......Page 306 Embedding Other Multimedia Files......Page 307 Linking to Multimedia Files......Page 308 Creating an Automatic Slide Show......Page 309 Creating a Marquee......Page 310 Adding Background Sound......Page 311 Chapter 18: Scripts......Page 313 Adding an “Automatic” Script......Page 314 Calling an External Automatic Script......Page 315 Triggering a Script......Page 316 Creating a Button that Executes a Script......Page 318 Adding Alternate Information......Page 319 Hiding Scripts from Older Browsers......Page 320 Hiding Scripts from XML Parsers......Page 321 Setting the Default Scripting Language......Page 322 Chapter 19: JavaScript Essentials......Page 323 Adding the Current Date and Time......Page 324 Changing a Link’s Status Label......Page 325 Changing Multiple Frames with One Link......Page 326 Keeping Frames in Their Framesets......Page 327 Changing an Image When a Visitor Points......Page 328 Loading Images into Cache......Page 330 Controlling a New Window’s Size......Page 331 Chapter 20: Symbols and Non-English Characters......Page 333 About Character Encodings......Page 334 Saving Your Page with the Proper Encoding......Page 336 Editing a Page with the Proper Encoding......Page 337 Declaring Your Page’s Character Encoding......Page 338 Adding Characters from Outside the Encoding......Page 340 Specifying Your Page’s Language......Page 342 Chapter 21: Formatting: The Old Way......Page 343 Choosing Default Characteristics for Text......Page 344 Formatting Bits of Text......Page 346 Another Way to Choose Default Colors......Page 348 Changing the Color of Links......Page 349 Striking Out or Underlining Text......Page 350 Making Text Blink......Page 351 Chapter 22: Layout: The Old Way......Page 353 Using Background Color......Page 354 Using Background Images......Page 355 Centering Elements on a Page......Page 356 Specifying the Margins......Page 357 Keeping Lines Together......Page 358 Creating Discretionary Line Breaks......Page 359 Specifying the Space Between Paragraphs......Page 360 Creating Indents......Page 361 Creating Indents (with Lists)......Page 362 Creating Blocks of Space......Page 363 Using Pixel Shims......Page 364 Creating Columns......Page 365 Positioning Elements with Layers......Page 366 Chapter 23: WML: Web Pages for Mobile Devices......Page 369 Preparing Your Server......Page 370 Starting Your WML Page......Page 371 Creating a Card......Page 372 Creating Basic Content......Page 373 Including an Image......Page 374 Creating a Table......Page 375 Creating a Link......Page 376 Programming Buttons......Page 378 Creating Conditional Actions......Page 380 Scheduling an Action......Page 381 Making a Call......Page 382 Setting and Using Variables......Page 383 Creating Input Boxes......Page 384 Creating Menus......Page 386 Processing Data from Visitors......Page 388 Creating Elements on Multiple Pages......Page 390 Restricting Access to a Deck......Page 391 Testing WML Pages......Page 392 Chapter 24: Testing and Debugging Web Pages......Page 393 Validating Your Code......Page 394 Checking the Easy Stuff: HTML......Page 395 Checking the Easy Stuff: XHTML......Page 396 Checking the Easy Stuff: CSS......Page 397 Testing Your Page......Page 398 When the Browser Displays the Code......Page 400 When Images Don’t Appear......Page 401 Differences from Browser to Browser......Page 402 When Nothing Appears in Netscape 4......Page 403 Still Stuck?......Page 404 Chapter 25: Publishing Your Pages on the Web......Page 405 Finding a Host for Your Site......Page 406 Getting Your Own Domain Name......Page 407 Transferring Files to the Server......Page 408 Transferring Files to AOL......Page 412 Chapter 26: Getting People to Visit......Page 415 About Keywords......Page 416 Explicitly Listing Keywords......Page 417 Providing a Description of Your Page......Page 418 Controlling Other Information......Page 419 Keeping Visitors Away......Page 420 Keeping Pages From Being Archived......Page 421 Creating a Crawler Page......Page 422 Submitting Your Site to a Search Engine......Page 424 Improving Your Ranking by Getting Linked......Page 425 Writing Pages That Are Easy to Index......Page 426 Other Techniques for Publicizing Your Site......Page 427 Appendix A: (X)HTML Elements and Attributes......Page 429 Appendix B: CSS Properties and Values......Page 439 Appendix C: Intrinsic Events......Page 447 Appendix D: (X)HTML Symbols and Characters......Page 449 Appendix E: Hexadecimals......Page 459 Appendix F: (X)HTML Tools......Page 461 (X)HTML Editors......Page 462 Graphics Tools......Page 464 A......Page 465 C......Page 466 F......Page 468 I......Page 470 K......Page 471 M......Page 472 O......Page 473 P......Page 474 S......Page 475 T......Page 477 W......Page 478 X......Page 479 Colophon......Page 480 Need to learn HTML fast? This best-selling reference's visual format and step-by-step, task-based instructions will have you up and running with HTML in no time. In this completely updated edition of our best-selling guide to HTML, Web expert and best-selling author Elizabeth Castro uses crystal-clear instructions and friendly prose to introduce you to all of today's HTML and XHTML essentials. You'll learn how to design, structure, and format your Web site. You'll create and use images, links, styles, lists, tables, frames, and forms, and you'll add sound and movies to your site. Finally, you will test and debug your site, and publish it to the Web. Along the way, you'll find extensive coverage of CSS techniques, current browsers (Opera, Safari, Firefox), creating pages for the mobile Web, and more. Visual QuickStart Guide--the quick and easy way to learn! Easy visual approach uses pictures to guide you through HTML and show you what to do. Concise steps and explanations get you up and running in no time. Page for page, the best content and value around. Companion Web site at www.cookwood.com/html offers examples, a lively question-and-answer area, updates, and more.