| Title Page | 2 |
|---|
| Copyright Page | 3 |
|---|
| CONTENTS AT A GLANCE | 5 |
|---|
| Table of Contents | 7 |
|---|
| ABOUT THE AUTHORS | 16 |
|---|
| About the Technical Reviewer | 17 |
| ACKNOWLEDGMENTS | 18 |
|---|
| INTRODUCTION | 20 |
|---|
| A little background | 20 |
| Who is this book aimed at? | 21 |
| What you ll achieve | 21 |
| Conventions used in this book | 22 |
| Accessing the code | 23 |
| PART ONE: A SOLID XHTML FOUNDATION | 24 |
|---|
| Chapter 1: Are You a Web Standardista? | 25 |
| A brief history of the World Wide Web | 26 |
| The Web is born | 26 |
| The perfect Web | 26 |
| The chaotic Web | 27 |
| HTML rewind | 27 |
| HTML evolved | 28 |
| The X in XHTML | 29 |
| A web standards approach | 29 |
| What are standards? | 29 |
| So, web standards? | 30 |
| Why use web standards? | 30 |
| Separating content and presentation | 31 |
| Efficiency through reduced markup | 31 |
| Increased accessibility | 32 |
| Cross-browser compatibility | 32 |
| Nonbrowser compatibility | 32 |
| Forward compatibility | 33 |
| The Web Standardistas approach | 33 |
| Wax on . . . wax off | 33 |
| Why use XHTML? | 34 |
| The benefits of CSS | 34 |
| The Web Standardistas toolbox | 34 |
| We re not WYSIWYG | 34 |
| What s your favorite plain text editor? | 35 |
| Mac OS X, Windows, or Linux? | 35 |
| Summary | 36 |
| Homework: Set up your work environment | 36 |
| Chapter 2: Building Basic Web Pages | 38 |
| HTML: Tags in action | 39 |
| What are tags? | 39 |
| Tags come in pairs, usually | 41 |
| It s an element, my dear Watson | 42 |
| Your first web page: Hello World! | 43 |
| To mark up a web page, you just type | 44 |
| The markup makes the web page | 45 |
| Learning from others: How to view source | 46 |
| Every page has a | 46 |
| Every page has a | 46 |
|---|
| Every page has a | 46 |
|---|
| Every page has a | 46 |
|---|
| 47 | 46 |
|---|
| The importance of using the title element | 47 |
| Defining your document type | 49 |
| It all starts with a DOCTYPE | 49 |
| A short Quirks Mode interlude | 49 |
| It s all in a namespace | 50 |
| Just one more thing | 50 |
| You don t have to memorize all this | 50 |
| Hello World!: DOCTYPE edition | 51 |
| Tags have structure too: Nested elements | 51 |
| Making your markup easier to follow | 53 |
| Commenting your markup | 53 |
| White space | 55 |
| Summary | 56 |
| Homework: Create your first space-monkey- themed XHTML page | 56 |
| Chapter 3: Structured Markup | 59 |
| Adding structure and meaning | 60 |
| What is structured markup? | 61 |
| What is semantic markup? | 62 |
| Making markup meaningful | 62 |
| POSH and proud | 63 |
| Signposts for reading | 63 |
| Creating structure with headings and paragraphs | 64 |
| Applying information hierarchy | 65 |
| Case study: The Guardian | 66 |
| An introduction to phrase elements | 69 |
| What is an element? | 69 |
| Adding meaning to fragments of text | 70 |
| Adding emphasis: | 70 |
| Adding emphasis: | 70 |
|---|
| Adding emphasis: | 70 |
|---|
| Adding emphasis: | 70 |
|---|
| 70 | 70 |
|---|
| Other phrase elements | 71 |
| Block-level and inline-level elements | 71 |
| Imagine a box | 72 |
| The difference between block- level and inline-level elements | 72 |
| Valid code is browser- friendly code | 73 |
| The W3C Markup Validation Service | 73 |
| Valid code is not necessarily well- structured code | 78 |
| Getting the search mix right | 78 |
| Summary | 80 |
| Homework: Introducing Miss Baker | 80 |
| Chapter 4: Markup That Adds Meaning | 83 |
| Lists: First- level organizers | 84 |
| Why use lists? | 84 |
| Unordered and ordered lists | 85 |
| Enter the ordered list | 86 |
| Nesting lists | 88 |
| Definition lists | 89 |
| Tables: The good, the bad, and the alternatives | 91 |
| What is tabular data? | 92 |
| | 92 |
| | 92 |
|---|
| | 92 |
|---|
| | 92 |
|---|
| | 92 |
|---|
| | 92 |
|---|
| 93 | 92 |
|---|
| Improving table accessibility | 94 |
| Adding a descriptive summary to a table | 95 |
| Quoting text | 97 |
| What s a | 97 |
| What s a | 97 |
|---|
| 97 | 97 |
|---|
| Citations (or | 97 |
| Citations (or | 97 |
|---|
| 98 | 97 |
|---|
| Quotations (or | 97 |
| Quotations (or | 97 |
|---|
| 99 | 97 |
|---|
| Other tags in the Standardistas toolbox | 100 |
| Abbreviations | 100 |