0% found this document useful (0 votes)
9 views

Sams teach yourself HTML and XHTML in 24 hours 6th Edition Dick Oliver pdf download

The document is a promotional text for the ebook 'Sams Teach Yourself HTML and XHTML in 24 Hours, 6th Edition' by Dick Oliver, which is available for instant download in various formats. It includes links to other related titles and outlines the contents of the book, which covers HTML and XHTML basics, web page design, graphics, and dynamic web pages. The book aims to provide a comprehensive guide for readers to create and manage their own web pages effectively.

Uploaded by

binahnin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Sams teach yourself HTML and XHTML in 24 hours 6th Edition Dick Oliver pdf download

The document is a promotional text for the ebook 'Sams Teach Yourself HTML and XHTML in 24 Hours, 6th Edition' by Dick Oliver, which is available for instant download in various formats. It includes links to other related titles and outlines the contents of the book, which covers HTML and XHTML basics, web page design, graphics, and dynamic web pages. The book aims to provide a comprehensive guide for readers to create and manage their own web pages effectively.

Uploaded by

binahnin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Sams teach yourself HTML and XHTML in 24 hours

6th Edition Dick Oliver pdf download

https://ebookname.com/product/sams-teach-yourself-html-and-xhtml-
in-24-hours-6th-edition-dick-oliver/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Sams Teach Yourself XML in 24 Hours 2nd Edition Sams


Teach Yourself in 24 Hours Michael Morrison

https://ebookname.com/product/sams-teach-yourself-xml-
in-24-hours-2nd-edition-sams-teach-yourself-in-24-hours-michael-
morrison/

Sams Teach Yourself SAP in 24 Hours 4th Edition George


Anderson

https://ebookname.com/product/sams-teach-yourself-sap-
in-24-hours-4th-edition-george-anderson/

Sams teach yourself CGI in 24 hours 2nd Edition Rafe


Colburn

https://ebookname.com/product/sams-teach-yourself-cgi-
in-24-hours-2nd-edition-rafe-colburn/

THE DEVELOPING CHILD IN THE 21ST CENTURY A GLOBAL


PERSPECTIVE ON CHILD DEVELOPMENT 1st Edition Sandra
Smidt

https://ebookname.com/product/the-developing-child-in-the-21st-
century-a-global-perspective-on-child-development-1st-edition-
sandra-smidt/
The Kimball Group Reader Relentlessly Practical Tools
for Data Warehousing and Business Intelligence 1st
Edition Ralph Kimball

https://ebookname.com/product/the-kimball-group-reader-
relentlessly-practical-tools-for-data-warehousing-and-business-
intelligence-1st-edition-ralph-kimball/

American Corrections 9th Edition Todd R.(Todd R. Clear)


Clear

https://ebookname.com/product/american-corrections-9th-edition-
todd-r-todd-r-clear-clear/

Topology for Computing First Edition Thus Afra J.


Zomorodian

https://ebookname.com/product/topology-for-computing-first-
edition-thus-afra-j-zomorodian/

Opening for White According to Anand 1 e4 Volume 11


Repertoire Books 1-st Edition Alexander Khalifman

https://ebookname.com/product/opening-for-white-according-to-
anand-1-e4-volume-11-repertoire-books-1-st-edition-alexander-
khalifman/

Streptococcus Pneumoniae Molecular Mechanisms of Host


Pathogen Interactions 1st Edition Jeremy Brown Ma Mb
Bs Mrcp Md

https://ebookname.com/product/streptococcus-pneumoniae-molecular-
mechanisms-of-host-pathogen-interactions-1st-edition-jeremy-
brown-ma-mb-bs-mrcp-md/
Malaria Control During Mass Population Movements and
Natural Disasters 1st Edition Peter B. Boland Holly A.
Williams Peter B. Bloland

https://ebookname.com/product/malaria-control-during-mass-
population-movements-and-natural-disasters-1st-edition-peter-b-
boland-holly-a-williams-peter-b-bloland/
Teach Yourself

HTML and XHTML

Dick Oliver
Michael Morrison
in 24
Hours
SIXTH EDITION

800 East 96th St., Indianapolis, Indiana, 46240 USA


ACQUISITIONS EDITOR
Sams Teach Yourself HTML and XHTML Betsy Brown
in 24 Hours, Sixth Edition DEVELOPMENT EDITOR
Copyright  2003 by Sams Publishing Damon Jordan
All rights reserved. No part of this book shall be reproduced, stored in a MANAGING EDITOR
retrieval system, or transmitted by any means, electronic, mechanical, photo- Charlotte Clapp
copying, recording, or otherwise, without written permission from the pub-
lisher. No patent liability is assumed with respect to the use of the information INDEXER
contained herein. Although every precaution has been taken in the preparation Mandie Frank
of this book, the publisher and author assume no responsibility for errors or PROOFREADER
omissions. Neither is any liability assumed for damages resulting from the use
Mike Henry
of the information contained herein.
TECHNICAL EDITOR
International Standard Book Number: 0-672-32520-9
Robyn Ness
Library of Congress Catalog Card Number: 2002114452 DESIGNER
Printed in the United States of America Gary Adair

First Printing: May 2003 LAYOUT TECHNICIANS


Stacey Richwine-DeRome
06 05 04 03 6 5 4 3 Susan Geiselman
Michelle Mitchell
Trademarks
All terms mentioned in this book that are known to be trademarks or service
marks have been appropriately capitalized. Sams cannot attest to the accuracy
of this information. Use of a term in this book should not be regarded as affect-
ing the validity of any trademark or service mark.

Warning and Disclaimer


Every effort has been made to make this book as complete and as accurate as
possible, but no warranty or fitness is implied. The information provided is on
an “as is” basis. The author and the publisher shall have neither liability or
responsibility to any person or entity with respect to any loss or damages aris-
ing from the information contained in this book.

Bulk Sales
Sams offers excellent discounts on this book when ordered in quantity for bulk
purchases or special sales. For more information, please contact:

U.S. Corporate and Government Sales


1-800-382-3419
corpsales@pearsontechgroup.com

For sales outside of the U.S., please contact:

International Sales
+1-317-428-3341
international@pearsontechgroup.com
Contents at a Glance
Introduction 1

Part I Your First Web Page 7


Hour 1 Understanding HTML and XHTML 9
2 Create a Web Page Right Now 25
3 Linking to Other Web Pages 39
4 Publishing your HMTL Pages 51

Part II Web Page Text 73


Hour 5 Basic Text Alignment and Formatting 75
6 Advanced Text Formatting 91
7 Creating Text Links 105

Part III Web Page Graphics 117


Hour 8 Creating Your Own Web Page Graphics 119
9 Putting Graphics on a Web Page 141
10 Custom Backgrounds and Colors 153
11 Graphical Links and Imagemaps 162

Part IV Web Page Design 179


Hour 12 Page Design and Layout 181
13 Advanced Layout with Tables 195
14 Formatting Pages with Style Sheets 209
15 Making the Most of Style Sheets 227
16 Multi-Page Layout with Frames 243

Part V Dynamic Web Pages 259


Hour 17 Web Page Scripting for Non-Programmers 261
18 Setting Pages in Motion with Dynamic HTML 275
19 Gathering Information with HTML Forms 295
20 Embedding Multimedia in Web Pages 315
Part VI Building a Web Site 329
Hour 21 Organizing and Managing a Web Site 331
22 Helping People Find Your Web Pages 345
23 Using XML to Describe Data 363
24 Planning for the Future of HTML 377

Part VII Appendixes 389


Appendix A Readers’ Most Frequently Asked Questions 391
B HTML Learning Resources on the Internet 397
C Complete HTML 4 and XHTML 1 Quick Reference 403
D Migrating from HTML to XHTML 447
Index 451
Table of Contents
Introduction 1

PART I Your First Web Page 7


HOUR 1 Understanding HTML and XHTML 9
What Is a Web Page? ............................................................................................11
How Web Pages Work ..........................................................................................13
The Pieces and Parts of a Web Page ....................................................................15
The Many Faces of HTML ..................................................................................16
The Scoop on HTML, XML, and XHTML ........................................................19
Summary ..............................................................................................................21
Q&A ......................................................................................................................21
Workshop ..............................................................................................................22
Quiz ................................................................................................................22
Answers ..........................................................................................................23
Exercises ..........................................................................................................23

HOUR 2 Create a Web Page Right Now 25


Getting Started with a Simple Web Page ............................................................27
HTML Tags Every Web Page Must Have ............................................................29
Organizing a Page with Paragraphs and Line Breaks ..........................................30
Calling Out Text with Headings ..........................................................................33
Peeking at Other People’s Pages ..........................................................................35
Summary ..............................................................................................................35
Q&A ......................................................................................................................36
Workshop ..............................................................................................................37
Quiz ................................................................................................................37
Answers ..........................................................................................................38
Exercises ..........................................................................................................38

HOUR 3 Linking to Other Web Pages 39


Linking to Another Web Page ..............................................................................40
Linking Between Your Own Pages ......................................................................42
Addressing Web Pages ..........................................................................................44
Opening a Link in a New Browser Window ........................................................46
Summary ..............................................................................................................46
Q&A ......................................................................................................................47
Workshop ..............................................................................................................48
Quiz ................................................................................................................48
Answers ..........................................................................................................49
Exercises ..........................................................................................................49
vi Sams Teach Yourself HTML and XHTML in 24 Hours

HOUR 4 Publishing Your HTML Pages 51


Setting Up Web Space on the Internet ..................................................................52
Transferring Pages to a Web Server ....................................................................54
Using Microsoft Internet Explorer ..................................................................55
Using Netscape Composer ..............................................................................57
Using Microsoft FrontPage ............................................................................58
Using FTP Software ........................................................................................59
Using the Windows Web Publishing Wizard ..................................................63
Making a File Available for Downloading ..........................................................65
Other HTML Publishing Options ........................................................................65
Putting Web Pages on an Intranet ..................................................................66
Putting Web Pages on Disk ............................................................................66
Testing Your Web Pages ........................................................................................67
Summary ..............................................................................................................68
Q&A ......................................................................................................................69
Workshop ..............................................................................................................70
Quiz ................................................................................................................70
Answers ..........................................................................................................70
Exercises ..........................................................................................................71

PART II Web Page Text 73


HOUR 5 Basic Text Alignment and Formatting 75
Aligning Text on a Page ......................................................................................76
Aligning a Paragraph ......................................................................................76
Aligning an Entire Section of a Page ..............................................................77
The Three Types of HTML Lists ..........................................................................79
Placing Lists Within Lists ....................................................................................81
Summary ..............................................................................................................86
Q&A ......................................................................................................................87
Workshop ..............................................................................................................87
Quiz ................................................................................................................88
Answers ..........................................................................................................88
Exercises ..........................................................................................................89

HOUR 6 Advanced Text Formatting 91


Boldface, Italics, and Special Formatting ............................................................92
Tweaking the Font Size and Color ......................................................................96
Selecting a Font Typeface ....................................................................................97
Working with Special Characters ........................................................................99
Summary ............................................................................................................101
Q&A ....................................................................................................................102
Contents vii

Workshop ............................................................................................................103
Quiz ..............................................................................................................103
Answers ........................................................................................................104
Exercises ........................................................................................................104

HOUR 7 Creating Text Links 105


Linking Within a Page Using Anchors ..............................................................105
Identifying Locations in a Page with Anchors ..............................................106
Linking to Anchor Locations ........................................................................106
Linking to a Specific Part of Another Page ........................................................109
Linking Your Email Address into a Page ............................................................111
Summary ............................................................................................................113
Q&A ....................................................................................................................113
Workshop ............................................................................................................114
Quiz ..............................................................................................................114
Answers ........................................................................................................114
Exercises ........................................................................................................115

PART III Web Page Graphics 117


HOUR 8 Creating Your Own Web Page Graphics 119
Choosing Graphics Software ..............................................................................120
The Least You Need to Know About Graphics ..................................................121
Preparing Photographic Images ..........................................................................122
Cropping an Image ........................................................................................123
Resizing an Image ........................................................................................124
Tweaking Image Colors ................................................................................125
Controlling JPEG Compression ....................................................................125
Creating Banners and Buttons ............................................................................126
Reducing the Number of Colors in an Image ....................................................129
Interlaced GIFs and Progressive JPEGs ............................................................131
Creating Animated Web Graphics ......................................................................132
Assembling Images into an Animation ..............................................................133
Generating Transitions and Text Effects ............................................................135
Summary ............................................................................................................137
Q&A ....................................................................................................................137
Workshop ............................................................................................................138
Quiz ..............................................................................................................138
Answers ........................................................................................................138
Exercises ........................................................................................................138

HOUR 9 Putting Graphics on a Web Page 141


Placing an Image on a Web Page ......................................................................142
Describing an Image with Text ..........................................................................144
viii Sams Teach Yourself HTML and XHTML in 24 Hours

Turning Images into Links ..................................................................................145


Aligning Images ..................................................................................................146
Horizontal Image Alignment ........................................................................146
Vertical Image Alignment ..................................................................................147
Summary ............................................................................................................150
Q&A ....................................................................................................................150
Workshop ............................................................................................................151
Quiz ..............................................................................................................152
Answers ........................................................................................................152
Exercises ........................................................................................................152

HOUR 10 Custom Backgrounds and Colors 153


Exploring Background and Text Colors ............................................................154
Specifying Custom Colors ..................................................................................156
Using Background Image Tiles ..........................................................................157
Working with Transparent Images ......................................................................159
Creating Your Own Backgrounds ......................................................................161
Summary ............................................................................................................163
Q&A ....................................................................................................................163
Workshop ............................................................................................................164
Quiz ..............................................................................................................164
Answers ........................................................................................................165
Exercises ........................................................................................................165

HOUR 11 Graphical Links and Imagemaps 167


Why Imagemaps Aren’t Always Necessary ......................................................168
Mapping Regions Within an Image ....................................................................170
Creating Client-Side Imagemaps ........................................................................172
Summary ............................................................................................................175
Q&A ....................................................................................................................175
Workshop ............................................................................................................176
Quiz ..............................................................................................................176
Answers ........................................................................................................176
Exercises ........................................................................................................177

PART IV Web Page Design 179


HOUR 12 Page Design and Layout 181
The Essentials of Web Page Design ..................................................................182
Fine-Tuning Image Spacing and Borders ..........................................................183
The Old Background Banner Trick ....................................................................187
Specifying Image Width and Height ..................................................................190
Summary ............................................................................................................191
Contents ix

Q&A ....................................................................................................................192
Workshop ............................................................................................................192
Quiz ..............................................................................................................192
Answers ........................................................................................................193
Exercises ........................................................................................................193

HOUR 13 Advanced Layout with Tables 195


Creating a Simple Table ......................................................................................196
Controlling the Size of Tables ............................................................................198
Alignment and Spanning Within Tables ............................................................199
Table Backgrounds and Spacing ........................................................................201
Creative Page Layout with Tables ......................................................................202
Summary ............................................................................................................204
Q&A ....................................................................................................................205
Workshop ............................................................................................................206
Quiz ..............................................................................................................207
Answers ........................................................................................................207
Exercises ........................................................................................................208

HOUR 14 Formatting Pages with Style Sheets 209


A Basic Style Sheet ............................................................................................210
Understanding CSS ............................................................................................215
A CSS Style Primer ............................................................................................216
Layout Properties ..........................................................................................216
Formatting Properties ....................................................................................218
Using Style Classes ............................................................................................221
Specifying Inline Styles ......................................................................................222
Summary ............................................................................................................223
Q&A ....................................................................................................................224
Workshop ............................................................................................................224
Quiz ..............................................................................................................224
Answers ........................................................................................................225
Exercises ........................................................................................................225

HOUR 15 Making the Most of Style Sheets 227


The Whole Scoop on Positioning ......................................................................228
Controlling the Way Things Stack Up ................................................................232
Working with Margins ........................................................................................234
A Little Padding for Safety ................................................................................236
Keeping Everything Aligned ..............................................................................237
Managing the Flow of Text ................................................................................238
Summary ............................................................................................................239
Q&A ....................................................................................................................240
x Sams Teach Yourself HTML and XHTML in 24 Hours

Workshop ............................................................................................................241
Quiz ..............................................................................................................241
Answers ........................................................................................................241
Exercises ........................................................................................................241

HOUR 16 Multi-Page Layout with Frames 243


What Are Frames? ..............................................................................................244
Building a Frameset ............................................................................................245
Creating a Frameset Document ....................................................................245
Adding the Frames ........................................................................................248
Linking Between Frames and Windows ............................................................248
Nested Frames ....................................................................................................250
Controlling Frame Margins, Borders, and Scrolling ..........................................251
Summary ............................................................................................................255
Q&A ....................................................................................................................256
Workshop ............................................................................................................257
Quiz ..............................................................................................................257
Answers ........................................................................................................257
Exercises ........................................................................................................258

PART V Dynamic Web Pages 259


HOUR 17 Web Page Scripting for Non-Programmers 261
Jazzing Things Up with Interactive Highlighting ..............................................262
Preloading Images for Speed ..............................................................................266
Creating an Animated Banner Ad ......................................................................267
The Wide World of JavaScript ............................................................................271
Summary ............................................................................................................271
Q&A ....................................................................................................................271
Workshop ............................................................................................................272
Quiz ..............................................................................................................272
Answers ........................................................................................................273
Exercises ........................................................................................................273

HOUR 18 Setting Pages in Motion with Dynamic HTML 275


Learning How to Fly ..........................................................................................276
Dividing a Web Page into Layers ......................................................................279
Offering Alternate Content in Plain HTML ......................................................280
Being Compatible with Incompatible Browsers ................................................282
Moving a Layer Around with JavaScript ............................................................285
Interactive Layer Animation ..............................................................................287
Summary ............................................................................................................290
Q&A ....................................................................................................................291
Contents xi

Workshop ............................................................................................................292
Quiz ..............................................................................................................292
Answers ........................................................................................................292
Exercises ........................................................................................................293

HOUR 19 Gathering Information with HTML Forms 295


How HTML Forms Work ..................................................................................296
Creating a Form ..................................................................................................297
Accepting Text Input ..........................................................................................300
Identifying Each Piece of Form Data ................................................................301
Including Hidden Data in Forms ........................................................................302
Exploring Form Input Controls ..........................................................................302
Check Boxes ..................................................................................................302
Radio Buttons ................................................................................................303
Selection Lists ..............................................................................................304
Text Areas ......................................................................................................305
Submit! ................................................................................................................305
Creating an Online Order Form ..........................................................................307
Summary ............................................................................................................311
Q&A ....................................................................................................................313
Workshop ............................................................................................................313
Quiz ..............................................................................................................314
Answers ........................................................................................................314
Exercises ........................................................................................................314

HOUR 20 Embedding Multimedia in Web Pages 315


Placing Multimedia on a Web Page ....................................................................317
Multimedia the Old-Fashioned Way ..................................................................317
Embedding Sound in a Web Page ......................................................................318
Embedding Video in a Web Page ......................................................................321
Multimedia the New Way ..................................................................................322
Summary ............................................................................................................325
Q&A ....................................................................................................................326
Workshop ............................................................................................................326
Quiz ..............................................................................................................327
Answers ........................................................................................................327
Exercises ........................................................................................................327

PART VI Building a Web Site 329


HOUR 21 Organizing and Managing a Web Site 331
When One Page Is Enough ................................................................................332
Organizing a Simple Site ....................................................................................334
xii Sams Teach Yourself HTML and XHTML in 24 Hours

Organizing a Larger Site ....................................................................................336


Including Comments in a Page ..........................................................................339
Summary ............................................................................................................341
Q&A ....................................................................................................................341
Workshop ............................................................................................................342
Quiz ..............................................................................................................342
Answers ........................................................................................................342
Exercises ........................................................................................................342
HOUR 22 Helping People Find Your Web Pages 345
Publicizing Your Web Site ..................................................................................346
Listing Your Pages with the Major Search Sites ................................................347
Providing Hints for Search Engines ..................................................................349
Loading Another Page Automatically ................................................................356
Documenting the Full Address of a Page ..........................................................358
Summary ............................................................................................................360
Q&A ....................................................................................................................360
Workshop ............................................................................................................361
Quiz ..............................................................................................................361
Answers ........................................................................................................362
Exercises ........................................................................................................362

HOUR 23 Using XML to Describe Data 363


Introducing XML ................................................................................................363
XML Meets HTML ............................................................................................365
XML and Web Browsers ....................................................................................366
Inside the XML Language ..................................................................................367
Dissecting an Element ..................................................................................368
Five Rules of XML ......................................................................................369
Creating an XML Document ..............................................................................370
Styling an XML Document ................................................................................373
Summary ............................................................................................................375
Q&A ....................................................................................................................375
Workshop ............................................................................................................376
Quiz ..............................................................................................................376
Answers ........................................................................................................376
Exercises ........................................................................................................376

HOUR 24 Planning for the Future of HTML 377


HTML Beyond the Web ....................................................................................378
From Calculators to Wireless Communicators ..................................................379
HTML as the New User Interface ......................................................................379
The Digital Media Revolution ............................................................................380
Contents xiii

XHTML, the New HTML ..................................................................................381


HTML Applications of the Future ......................................................................384
Preparing Yourself for Tomorrow ......................................................................385
Summary ............................................................................................................387
Q&A ....................................................................................................................387
Workshop ............................................................................................................388
Quiz ..............................................................................................................388
Exercises ........................................................................................................388

PART VII Appendixes 389


APPENDIX A Readers’ Most Frequently Asked Questions 391
The 24 Top Questions from Readers of Sams Teach Yourself HTML
in 24 Hours ......................................................................................................392

APPENDIX B HTML Learning Resources on the Internet 397


General HTML and XHTML Information ........................................................397
Web Page Design ................................................................................................398
Software ..............................................................................................................398
Graphics ..............................................................................................................399
Multimedia and Virtual Reality ..........................................................................399
Advanced Developer Resources ........................................................................400
HTML Validators ................................................................................................401
Directories with HTML Information ..................................................................401
Web Site Services ..............................................................................................401
Free Web Site Hosting ........................................................................................402

APPENDIX C Complete HTML 4 and XHTML 1 Quick Reference 403


Structure ..............................................................................................................405
<bdo>...</bdo> ......................................................................................405
<body>...</body> ....................................................................................406
Comments <!-- ... --> ........................................................................407
<div>...</div> ........................................................................................407
<!doctype...> ..........................................................................................407
<h1>...</h1> Through <h6>...</h6> ................................................408
<head>...</head> ....................................................................................408
<hr /> ......................................................................................................408
<html>...</html> ....................................................................................409
<meta /> ....................................................................................................409
<span>...</span> ....................................................................................410
<title>...</title> ..............................................................................410
Text Phrases and Paragraphs ..............................................................................410
<abbr>...</abbr> ....................................................................................410
<acronym>...</acronym> ........................................................................411
xiv Sams Teach Yourself HTML and XHTML in 24 Hours

<address>...</address> ........................................................................411
<blockquote>...</blockquote> ..........................................................411
<br /> ........................................................................................................412
<cite>...</cite> ....................................................................................412
<code>...</code> ....................................................................................412
<del>...</del> ........................................................................................412
<dfn>...</dfn> ........................................................................................413
<h1>...</h1>—<h6>...</h6> ................................................................413
<ins>...</ins> ........................................................................................413
<kbd>...</kbd> ........................................................................................414
<p>...</p> ................................................................................................414
<pre>...</pre> ........................................................................................414
<q>...</q> ................................................................................................415
<samp>...</samp> ....................................................................................415
<strong>...</strong> ............................................................................415
<sub>...</sub> ........................................................................................415
<sup>...</sup> ........................................................................................416
<var>...</var> ........................................................................................416
Text Formatting Elements ..................................................................................416
<b>...</b> ..............................................................................................416
<basefont /> ............................................................................................416
<big>...</big> ......................................................................................417
<center>...</center> ..........................................................................417
<font>...</font> ................................................................................417
<i>...</i> ..............................................................................................418
<s>...</s> ..............................................................................................418
<small>...</small> ............................................................................418
<strike>...</strike> ..........................................................................418
<tt>...</tt> ..........................................................................................419
<u>...</u> ..............................................................................................419
Lists ....................................................................................................................419
<dd>...</dd> ..........................................................................................419
<dir>...</dir> ......................................................................................419
<dl>...</dl> ..........................................................................................420
<dt>...</dt> ..........................................................................................420
<li>...</li> ..........................................................................................420
<menu>...</menu> ....................................................................................421
<ol>...</ol> ............................................................................................421
<ul>...</ul> ..........................................................................................422
Links ..................................................................................................................422
<a>...</a> ..............................................................................................422
<base /> ..................................................................................................423
<link /> ..................................................................................................423
Contents xv

Tables ..................................................................................................................424
<caption>...</caption> ......................................................................424
<col /> ....................................................................................................424
<colgroup>...</colgroup> ................................................................425
<table>...</table> ............................................................................425
<tbody>...</tbody> ............................................................................426
<td>...</td> ..........................................................................................427
<tfoot>...</tfoot> ............................................................................428
<th>...</th> ..........................................................................................428
<thead>...</thead> ............................................................................429
<tr>...</tr> ..........................................................................................430
Frames ................................................................................................................430
<frame /> ................................................................................................430
<frameset>...</frameset> ................................................................431
<iframe>...</iframe> ........................................................................431
<noframes>...</noframes> ................................................................432
Embedded Content ..............................................................................................433
<applet>...</applet> ........................................................................433
<area /> ..................................................................................................434
<img /> ....................................................................................................434
<map>...</map> ......................................................................................435
<object>...</object> ........................................................................435
<param /> ................................................................................................436
Style ....................................................................................................................437
<style>...</style> ............................................................................437
Forms ..................................................................................................................437
<button>...</button> ........................................................................437
<fieldset>...</fieldset> ................................................................438
<form>...</form> ..................................................................................438
<input /> ................................................................................................439
<isindex /> ............................................................................................440
<label>...</label> ..............................................................................440
<legend>...</legend> ..........................................................................441
<optgroup>...</optgroup> ..................................................................441
<option>...</option> ........................................................................441
<select>...</select> ........................................................................442
<textarea>...</textarea> ................................................................442
Scripts ................................................................................................................443
<script>...</script> ..........................................................................443
<noscript>...</noscript> ................................................................444
Common Attributes and Events ..........................................................................444
APPENDIX D Migrating from HTML to XHTML 447
Differences Between XHTML 1 and HTML 4 ..................................................447
XHTML and Document Validity ........................................................................448
Declaring XHTML Namespaces ........................................................................449
Converting HTML Documents to XHTML ......................................................450

Index 451
About the Authors
DICK OLIVER (dicko@netletter.com) is the tall, dark, handsome author of lots of great
books and software, including Web Page Wizardry, Netscape Unleashed, Create Your
Own Web Page Graphics, and Tricks of the Graphics Gurus. He is also the president of
Cedar Software and the warped mind behind the Nonlinear Nonsense Netletter at
http://netletter.com (and many other Web sites). When he isn’t banging on a keyboard,
he’s usually snowboarding, sledding, skiing, or warming up by the woodstove in his cozy
Northern Vermont home (where they celebrate a day of summer each year, too). He likes
writing HTML, eating killer-spicy Indian food, and waltzing wildly around the office
with his daughters--not necessarily in that order. He also thinks it’s pretty cool that
authors get to write their own “About the Authors” sections.
MICHAEL MORRISON is a writer, developer, toy inventor, and author of a variety of nerdy
books and interactive Web-based courses. In addition to his primary profession as a
writer and geek for hire, Michael is the creative lead at Stalefish Labs (http://www.
stalefishlabs.com), an entertainment company he co-founded with his wife, Masheed.
The first commercial debut for Stalefish Labs is a “lounge game” titled Tall Tales: The
Game of Legends, Humdingers, and Creative One-Upmanship. Michael encourages you
to visit the Tall Tales game Web site at http://www.talltalesgame.com/ and buy dozens of
games for your friends and family. When not glued to his computer, playing hockey,
skateboarding, or watching movies with his wife, Michael enjoys hanging out by his koi
pond. You can visit Michael on the Web at http://www.michaelmorrison.com/.
Dedication
This book is dedicated to my mother, Darlene Hewins, who had to teach herself HTML before the book
was written, and told me in no uncertain terms that I’d better do a lot better job than those other books.

—Dick Oliver

To my wife, Masheed, who is always on board for my far-out schemes and pet projects, and highly
supportive of my night job too.

—Michael Morrison

Acknowledgments
This book would certainly not exist today were it not for the author’s loving family, who
brought enough fresh carrot juice, tender popcorn, and buttery kisses to sustain him
through the long hours of its creation.
Special thanks must also go to the folks at the Buffalo Mountain Food Cooperative in
Hardwick, Vermont, for providing the carrots, popcorn, and butter.
—Dick Oliver
I’d like to thank Dick for allowing me to be a part of this project, and for all of my
buddies at Sams who are always such a pleasure to work with.
—Michael Morrison
We Want to Hear from You!
As the reader of this book, you are our most important critic and commentator. We value
your opinion and want to know what we’re doing right, what we could do better, what
areas you’d like to see us publish in, and any other words of wisdom you’re willing to
pass our way.
You can email or write me directly to let me know what you did or didn’t like about this
book—as well as what we can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this
book, and that due to the high volume of mail I receive, I might not be able to reply to
every message.
When you write, please be sure to include this book’s title and author as well as your
name and phone or email address. I will carefully review your comments and share them
with the author and editors who worked on the book.
Email: webdev@samspublishing.com
Mail: Mark Taber
Associate Publisher
Sams Publishing
800 East 96th Street
Indianapolis, IN 46240 USA

Reader Services
For more information about this book or others from Sams Publishing, visit our Web site
at www.samspublishing.com. Type the ISBN (excluding hyphens) or the title of the book in
the Search box to find the book you’re looking for.
Put Your HTML Page Online Today
In the next 24 hours, more than 100,000 new Web pages will be posted in publicly acces-
sible areas of the Internet. At least as many pages will be placed on private intranets
where they will be viewed by businesspeople connected to local networks. Every one of
those pages—like over 100 million pages already online—will use Hypertext Markup
Language, or HTML.
If you read on, your Web pages will be among those that appear on the Internet in the
next 24 hours. This will also be the day that you acquire one of the most valuable skills
in the world today: mastery of HTML.
Can you really learn to create top-quality Web pages yourself, without any specialized
software, in less time than it takes to schedule and wait for an appointment with a highly
paid HTML wizard? Can this thin, easy-to-read book really enable you to teach yourself
state-of-the-art Web page publishing?
Yes. In fact, within two hours of starting this book, someone with no previous HTML
experience at all can have a Web page ready to place on the Internet’s World Wide Web.
How can you learn the language of the Web so fast? By example. This book breaks
HTML down into simple steps that anyone can learn quickly, and shows you exactly how
to tackle each step. Every HTML example is pictured directly above the Web page it will
produce. You see it done, you read a brief, plain-English explanation of how it works,
and you immediately do the same thing with your own page. Ten minutes later, you’re on
to the next step.
The next day, you’re marveling at your own impressive pages on the Internet.

Beyond HTML
This book isn’t just about HTML because HTML isn’t the only thing you need to know
to create Web pages today. My goal is to give you all the skills you need to create a stun-
ning, state-of-the-art Web site in just 24 short, easy lessons. I’ve received literally thou-
sands of email messages from readers telling me that the earlier editions of this book
achieved that goal better than any other book available.
Go ahead and scan the bookstore shelves. You’ll discover that the book you’re holding
now is the only one on the market that covers all the following key skills and technolo-
gies in plain English that even beginners will understand.
2 Sams Teach Yourself HTML and XHTML in 24 Hours

• XHTML (Extended Hypertext Markup Language) and XML (eXtensible Markup


Language) are the new standards for Web page creation. Every example in this
book (and on the accompanying Web site) is fully XHTML and XML compatible,
so you won’t have to relearn anything as XHTML and XML replace old-fashioned
HTML.

Do you have existing Web pages that you need to bring up to date so
they’re compatible with the new standards? If so, Hour 24, “Planning for the
Future of HTML,” and Appendix D, “Migrating from HTML to XHTML,” give
you complete, easy-to-follow instructions for converting HTML pages into
XHTML.

• At the same time, all the examples you learn here have been tested for compatibil-
ity with the latest version of every major Web browser. That includes Microsoft
Internet Explorer, Netscape Navigator, and Opera. You’ll learn from the start to be
compatible with the past, yet ready for the future.
• Hours 8 through 11 teach you to design and create your own Web page graphics
(including animations) using industry-standard software you can download and try
for free. Creating graphics is the single most important part of producing a great-
looking site—and one that most HTML books leave out.
• Along with HTML, you’ll learn how to use Cascading Style Sheets (CSS),
JavaScript, and Dynamic HTML (DHTML) in Hours 12 through 20. Your Web
pages will be interactive and enchanting, not static and unresponsive.
• The technical stuff is not enough, so I also include the advice you need when set-
ting up a Web site to achieve your real-world goals. Key details—designing an
effective page layout, posting your page to the Internet with FTP software, organiz-
ing and managing multiple pages, and getting your pages to appear high on the
query lists at all the major Internet search sites—are all covered in enough depth to
get you beyond the snags that often trip people up.
• You may be aware that graphical Web site editors such as Microsoft FrontPage and
Macromedia DreamWeaver make Web design accessible to people that don’t know
anything about HTML—but these tools also make it more necessary than ever to
understand HTML yourself so you can create pages that do exactly what you want
and are easy to read and maintain. Throughout the book, I include notes telling you
when the What-You-See-Is-What-You-Get editors are helpful and when you’re bet-
ter off coding the HTML yourself.
Introduction 3

All these essentials (which some authors treat like extras, or don’t discuss at all) are what
made the first five editions of this book non-stop bestsellers. For this edition, I’ve contin-
ued to incorporate the email feedback of thousands of readers to make every lesson easy,
fast, and foolproof. I’ve also revised and updated the hands-on examples for you to expe-
rience online and modify to suit your own purposes—nearly 300 example pages in all.
The color quick-reference sheets and updated reference appendixes are sure to keep this
volume at your side long after you’ve become an experienced Webmaster.

How to Use This Book


There are several ways to go through this book, and the best way for you depends on
your situation. Here are five recommended options. Pick the one that matches your
needs.
1. “I need to get some text on the Internet today. Then I can worry about making it
look pretty later.”
• Read Hour 1, “Understanding HTML and XHTML.”
• Read Hour 2, “Create a Web Page Right Now.”
• Read Hour 4, “Publishing Your HTML Pages.”
• Put your first page on the Internet!
(Total work time: 2–4 hours)
• Read the rest of the book and update your pages as you learn more HTML.
2. “I need a basic Web page with text and graphics on the Internet as soon as possi-
ble. Then I can work on improving it and adding more pages.”
• Read Hour 1, “Understanding HTML and XHTML.”
• Read Hour 2, “Create a Web Page Right Now.”
• Read Hour 8, “Creating Your Own Web Page Graphics.”
• Read Hour 9, “Putting Graphics on a Web Page.”
• Read Hour 4, “Publishing Your HTML Pages.”
• Put your first page on the Internet!
(Total work time: 4–8 hours)
• Read the rest of the book and update your pages as you learn more HTML.
4 Sams Teach Yourself HTML and XHTML in 24 Hours

3. “I need a professional-looking business Web site with an order form right away.
Then I can continue to improve and develop my site over time.”
• Read all four hours in Part I, “Your First Web Page.”
• Read Hour 17, “Web Page Scripting for Non-Programmers.”
• Read Hour 19, “Creating HTML Forms.”
• Read Hour 8, “Creating Your Own Web Page Graphics.”
• Read Hour 9, “Putting Graphics on a Web Page.”
• Read Hour 10, “Custom Backgrounds and Colors.”
• Put your pages and order form on the Internet!
(Total work time: 8–12 hours)
• Read the rest of the book, and update your pages as you learn more HTML.
4. “I need to develop a creative and attractive ‘identity’ Web site on a tight schedule.
Then I need to develop many pages for our corporate intranet as well.”
• Read all four hours in Part I, “Your First Web Page.”
• Read all four hours in Part II, “Web Page Text.”
• Read all four hours in Part III, “Web Page Graphics.”
• Read all four hours in Part IV, “Web Page Design.”
• Put your pages on the Internet and your intranet!
(Total work time: 10–16 hours)
• Read the rest of the book and update your pages as you learn more HTML.
5. “I need to build a cutting-edge interactive Web site or HTML-based multimedia
presentation—fast!”
• Read this whole book.
• Put your pages on the Internet and/or CD-ROM!
(Total work time: 16–24 hours)
• Review and use the techniques you’ve learned to continue improving and
developing your site.
It may take a day or two for an Internet service provider to set up a host computer for
your pages, as discussed in Hour 4. If you want to get your pages online immediately,
read Hour 4 now so you can have a place on the Internet all ready for your first page.
No matter which of these approaches you take, you’ll benefit from the unique presenta-
tion elements that make this book the fastest possible way to learn HTML.
Exploring the Variety of Random
Documents with Different Content
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like