Book description
This beginning guide reviews HTML and also introduces you to using XHTML for the structure of a web page and cascading style sheets (CSS) for controlling how a document should appear on a web page. You?ll learn how to take advantage of the latest features of browsers while making sure that your pages still work in older, but popular, browsers. By incorporating usability and accessibility, you?ll be able to write professional-looking and well-coded web pages that use the latest technologies.
Table of contents
- Copyright
- About the Author
- About the Technical Editor
- Credits
- Introduction
-
1. Creating Structured Documents
- 1.1. A Web of Structured Documents
- 1.2. Introducing XHTML
- 1.3. Core Elements and Attributes
- 1.4. Attribute Groups
- 1.5. Basic Text Formatting
- 1.6. Presentational Elements
-
1.7. Phrase Elements
- 1.7.1. The <em> Element Adds Emphasis
- 1.7.2. The <strong> Element Adds Strong Emphasis
- 1.7.3. The <abbr> Element Is for Abbreviations
- 1.7.4. The <acronym> Element Is for Acronym Use
- 1.7.5. The <dfn> Element Is for Special Terms
- 1.7.6. The <blockquote> Element Is for Quoting Text
- 1.7.7. The <q> Element Is for Short Quotations
- 1.7.8. The <cite> Element Is for Citations
- 1.7.9. The <code> Element Is for Code
- 1.7.10. The <kbd> Element Is for Text Typed on a Keyboard
- 1.7.11. The <var> Element Is for Programming Variables
- 1.7.12. The <samp> Element Is for a Program Output
- 1.7.13. The <address> Element Is for Addresses
- 1.8. Lists
- 1.9. Editing Text
- 1.10. Using Character Entities for Special Characters
- 1.11. Comments
- 1.12. The <font> Element (deprecated)
- 1.13. Understanding Block and Inline Elements
- 1.14. Grouping Elements with <div> and <span>
- 1.15. Summary
- 1.16. Exercises
-
2. Links and Navigation
- 2.1. Basic Links
- 2.2. Understanding Directories and Directory Structures
-
2.3. Creating Links with the <a> Element
- 2.3.1. Creating a Source Anchor with the href Attribute
-
2.3.2. Creating a Destination Anchor Using the name and id Attributes (linking to a specific part of a page)
-
2.3.2.1. The <a> Element's Other Attributes
- 2.3.2.1.1. The accesskey Attribute
- 2.3.2.1.2. The charset Attribute
- 2.3.2.1.3. The coords Attribute
- 2.3.2.1.4. The hreflang Attribute
- 2.3.2.1.5. The rel Attribute
- 2.3.2.1.6. The rev Attribute
- 2.3.2.1.7. The shape Attribute
- 2.3.2.1.8. The tabindex Attribute
- 2.3.2.1.9. The target Attribute
- 2.3.2.1.10. The title Attribute
- 2.3.2.1.11. The type Attribute
-
2.3.2.1. The <a> Element's Other Attributes
- 2.4. Advanced E-mail Links
- 2.5. Summary
- 2.6. Exercises
-
3. Images and Objects
-
3.1. Adding Images to Your Site
- 3.1.1. Types of Image Formats
- 3.1.2. Bitmap Images
- 3.1.3. Vector Images
-
3.1.4. Adding Images Using the <img> Element
- 3.1.4.1. The src Attribute
- 3.1.4.2. The alt Attribute
- 3.1.4.3. The align Attribute (deprecated)
- 3.1.4.4. The border Attribute (deprecated)
- 3.1.4.5. The height and width Attributes
- 3.1.4.6. The hspace and vspace Attributes (deprecated)
- 3.1.4.7. The ismap and usemap Attributes
- 3.1.4.8. The longdesc Attribute
- 3.1.4.9. The name Attribute (deprecated)
-
3.2. Adding Other Objects with the <object> Element
-
3.2.1. The <object> Element's Attributes
- 3.2.1.1. The archive Attribute
- 3.2.1.2. The border Attribute (deprecated)
- 3.2.1.3. The classid Attribute
- 3.2.1.4. The codebase Attribute
- 3.2.1.5. The codetype Attribute
- 3.2.1.6. The declare Attribute
- 3.2.1.7. The data Attribute
- 3.2.1.8. The height and width Attributes
- 3.2.1.9. The hspace and vspace attributes (deprecated)
- 3.2.1.10. The name Attribute (deprecated)
- 3.2.1.11. The standby Attribute
- 3.2.1.12. The tabindex Attribute
- 3.2.1.13. The usemap Attribute
- 3.2.2. The <param> Element
- 3.2.3. Adding a Flash Movie To A Page
-
3.2.1. The <object> Element's Attributes
- 3.3. Using Images as Links
- 3.4. Image Maps
- 3.5. Summary
- 3.6. Exercises
-
3.1. Adding Images to Your Site
-
4. Tables
- 4.1. Introducing Tables
-
4.2. Basic Table Elements and Attributes
-
4.2.1. The <table> Element Creates a Table
- 4.2.1.1. The align Attribute (deprecated)
- 4.2.1.2. The bgcolor Attribute (deprecated)
- 4.2.1.3. The border Attribute (deprecated)
- 4.2.1.4. The cellpadding Attribute (deprecated)
- 4.2.1.5. The cellspacing Attribute (deprecated)
- 4.2.1.6. The dir Attribute
- 4.2.1.7. The frame Attribute (deprecated)
- 4.2.1.8. The rules Attribute (deprecated)
- 4.2.1.9. The summary Attribute
- 4.2.1.10. The width Attribute (deprecated)
- 4.2.2. The <tr> Element Contains Table Rows
-
4.2.3. The <td> and <th> Elements Represent Table Cells
- 4.2.3.1. The abbr Attribute
- 4.2.3.2. The align Attribute (deprecated)
- 4.2.3.3. The axis Attribute
- 4.2.3.4. The bgcolor Attribute (deprecated)
- 4.2.3.5. The char Attribute
- 4.2.3.6. The charoff Attribute
- 4.2.3.7. The colspan Attribute
- 4.2.3.8. The headers Attribute
- 4.2.3.9. The height Attribute (deprecated)
- 4.2.3.10. The nowrap Attribute (deprecated)
- 4.2.3.11. The rowspan Attribute
- 4.2.3.12. The scope Attribute
- 4.2.3.13. The valign Attribute (deprecated)
- 4.2.3.14. The width Attribute (deprecated)
-
4.2.1. The <table> Element Creates a Table
-
4.3. Advanced Tables
- 4.3.1. Splitting Up Tables Using a Head, Body, and Foot
- 4.3.2. Adding a <caption> to a Table
- 4.3.3. Spanning Columns Using the colspan Attribute
- 4.3.4. Spanning Rows Using the rowspan Attribute
- 4.3.5. Grouping Columns Using the <colgroup> Element
- 4.3.6. Columns Sharing Styles Using the <col> Element
- 4.4. Accessibility Issues with Tables
- 4.5. Summary
- 4.6. Exercises
-
5. Forms
- 5.1. Introducing Forms
-
5.2. Creating a Form with the <form> Element
- 5.2.1. The action Attribute
- 5.2.2. The method Attribute
- 5.2.3. The id Attribute
- 5.2.4. The name Attribute (deprecated)
- 5.2.5. The onsubmit Attribute
- 5.2.6. The onreset Attribute
- 5.2.7. The enctype Attribute
- 5.2.8. The accept-charset Attribute
- 5.2.9. The accept Attribute
- 5.2.10. The target Attribute
- 5.2.11. White Space and the <form> Element
- 5.3. Form Controls
- 5.4. Creating Labels for Controls and the <label> Element
- 5.5. Structuring Your Forms with <fieldset> and <legend> Elements
- 5.6. Focus
- 5.7. Disabled and Read-Only Controls
- 5.8. Sending Form Data to the Server
- 5.9. Summary
- 5.10. Exercises
-
6. Frames
- 6.1. Introducing the Frameset
- 6.2. When to Use Frames
- 6.3. The <frameset> Element
- 6.4. The <frame> Element
- 6.5. The <noframes> Element
- 6.6. Creating Links Between Frames
- 6.7. Nested Framesets
- 6.8. Floating or Inline Frames with <iframe>
- 6.9. Summary
- 6.10. Exercises
-
7. Cascading Style Sheets
- 7.1. Introducing CSS
- 7.2. Where You Can Add CSS Rules
- 7.3. CSS Properties
- 7.4. Controlling Fonts
-
7.5. Text Formatting
- 7.5.1. The color Property
- 7.5.2. The text-align Property
- 7.5.3. The vertical-align Property
- 7.5.4. The text-decoration Property
- 7.5.5. The text-indent Property
- 7.5.6. The text-shadow Property
- 7.5.7. The text-transform Property
- 7.5.8. The letter-spacing Property
- 7.5.9. The word-spacing Property
- 7.5.10. The white-space Property
- 7.5.11. The direction Property
- 7.5.12. The unicode-bidi Property
- 7.6. Text Pseudo-Classes
-
7.7. Selectors
- 7.7.1. Universal Selector
- 7.7.2. The Type Selector
- 7.7.3. The Class Selector
- 7.7.4. The ID Selector
- 7.7.5. The Child Selector
- 7.7.6. The Descendent Selector
- 7.7.7. The Adjacent Sibling Selector
- 7.7.8. Using Child and Adjacent Sibling Selectors to Reduce Dependence on Classes in Markup
- 7.7.9. Attribute Selectors
- 7.8. Lengths
- 7.9. Percentages
- 7.10. Introducing the Box Model
- 7.11. Summary
- 7.12. Exercises
-
8. More Cascading Style Sheets
- 8.1. Links
-
8.2. Backgrounds
- 8.2.1. The background-color Property
- 8.2.2. The background-image Property
- 8.2.3. The background-repeat Property
- 8.2.4. The background-position Property (for fixing position of backgrounds)
- 8.2.5. The background-attachment Property (for watermarks)
- 8.2.6. The background Property (the well-supported shorthand)
- 8.3. Lists
- 8.4. Tables
- 8.5. Outlines
- 8.6. The :focus and :active Pseudo-Classes
- 8.7. Generated Content
- 8.8. Miscellaneous Properties
- 8.9. Additional Rules
- 8.10. Positioning with CSS
- 8.11. Summary
- 8.12. Exercises
- 9. Page Layout
-
10. Design Issues
-
10.1. Text
- 10.1.1. White Space Helps Make More Attractive Pages
- 10.1.2. Carefully Aligned Text Is More Readable
- 10.1.3. Adjusting Line Height Makes Text More Readable
- 10.1.4. Wide Columns of Text Are Harder to Read
- 10.1.5. Background Images Can Make Text Hard to Read
- 10.1.6. Choose Fonts Carefully
- 10.1.7. Fixed-Size Fonts Are Affected by Screen Resolution
-
10.2. Navigation
-
10.2.1. Menus
- 10.2.1.1. Menus Must Focus on What Visitors Want to Achieve
- 10.2.1.2. Menus Must Be Clearly Separated from Content
- 10.2.1.3. If You Use Icons to Represent a Link, Make Sure Everyone Will Understand Them
- 10.2.1.4. Menus Must Be Quick and Easy to Read
- 10.2.1.5. Grouping of Menu Items Must Be Logical
- 10.2.1.6. Menus Items Must Be Easy to Select
- 10.2.1.7. Menus Must Load Quickly
- 10.2.1.8. Menus Must Be Consistent Across a Site
- 10.2.2. Links
- 10.2.3. Site Search Features
-
10.2.1. Menus
- 10.3. Shading Multiple Rows of a Table
-
10.4. Forms
- 10.4.1. Before Designing the Form
-
10.4.2. Designing the Form
- 10.4.2.1. Selecting the Type of Form Control
- 10.4.2.2. Grouping Controls
-
10.4.2.3. Layout of Forms
- 10.4.2.3.1. Labeling Controls
- 10.4.2.3.2. Using Tables for Layout
- 10.4.2.3.3. Keeping Relevant Information Next to or Above Form Controls
- 10.4.2.3.4. Required Information
- 10.4.2.3.5. Careful Placement of Buttons
- 10.4.2.3.6. Using the title Attribute on Form Controls
- 10.4.2.3.7. Tab Index
- 10.4.2.3.8. Don't Rely on Color to Convey Information
- 10.4.2.3.9. Using CSS with Form Elements
- 10.4.2.3.10. Testing the Form
- 10.5. Summary
- 10.6. Exercises
-
10.1. Text
-
11. Learning JavaScript
- 11.1. What Is Programming About?
- 11.2. How to Add a Script to Your Pages
- 11.3. The Document Object Model
- 11.4. Starting to Program with JavaScript
- 11.5. Variables
- 11.6. Operators
- 11.7. Functions
- 11.8. Conditional Statements
- 11.9. Looping
- 11.10. Events
- 11.11. Built-in Objects
- 11.12. Writing JavaScript
- 11.13. Summary
- 11.14. Exercises
-
12. Working with JavaScript
- 12.1. Practical Tips for Writing Scripts
-
12.2. Form Validation
- 12.2.1. When to Validate
-
12.2.2. How to Validate
- 12.2.2.1. Checking Text Fields
- 12.2.2.2. Required Text Fields
- 12.2.2.3. Finding Characters Using replace()
- 12.2.2.4. Testing Characters Using Test and Regular Expressions
- 12.2.2.5. Select Box Options
- 12.2.2.6. Radio Buttons
- 12.2.2.7. Checkboxes
- 12.2.2.8. Preventing a Form Submission Until a Checkbox Has Been Selected
- 12.3. Form Enhancements
- 12.4. Image Rollovers
- 12.5. Random Script Generator
- 12.6. Pop-Up Windows
- 12.7. JavaScript Libraries
- 12.8. When Not to Use JavaScript
- 12.9. Summary
- 12.10. Exercises
-
13. Putting Your Site on the Web
-
13.1. Meta Tags
- 13.1.1. name and content Attributes
-
13.1.2. http-equiv and content
- 13.1.2.1. Expiring Pages
- 13.1.2.2. Preventing a Browser from Caching a Page
- 13.1.2.3. Refreshing and Redirecting Pages
- 13.1.2.4. Specifying Ratings
- 13.1.2.5. Setting Cookies
- 13.1.2.6. Specifying the Author Name
- 13.1.2.7. Setting the Character Encoding
- 13.1.2.8. Setting a Default Style Sheet Language
- 13.1.2.9. Setting a Default Scripting Language
- 13.1.3. The scheme Attribute
-
13.2. Testing Your Site
- 13.2.1. The Importance of Directory Structure and Relative URLs
- 13.2.2. Validating HTML, XHTML, and CSS
- 13.2.3. Link Checking
- 13.2.4. Checking Different Screen Resolutions and Color Depths
- 13.2.5. Accessibility Checkers
- 13.2.6. Development Server or Live Server
- 13.2.7. Checking in Different Versions of Browsers
- 13.2.8. Pilot Testing
- 13.2.9. Proofreading
- 13.3. Taking the Leap to Live
- 13.4. What Next?
- 13.5. Introducing Other Technologies
- 13.6. Summary
-
13.1. Meta Tags
- A. Answers to Exercises
-
B. XHTML Element Reference
- B.1. Core Attributes
- B.2. <a> (all)
- B.3. <abbr> (IE4+, N6+, FF1+)
- B.4. <acronym> (IE4+, N6+, FF1+)
- B.5. <address> (all)
- B.6. <applet> Deprecated (all)
- B.7. <param> (all)
- B.8. <area> (all)
- B.9. <b> (all)
- B.10. <base>
- B.11. <basefont> Deprecated (all)
- B.12. <bdo> (IE5+, N6+, FF1+)
- B.13. <bgsound> (IE only — IE3+)
- B.14. <big> (IE4+, N4+, FF1)
- B.15. <blink> (Netscape/Firefox only — N3+, FF1+)
- B.16. <blockquote> (all)
- B.17. <body> (all)
- B.18. <br /> (all)
- B.19. <button> (IE4+, N3+, FF1+)
- B.20. <caption> (all)
- B.21. <center> Deprecated (all)
- B.22. <cite> (all)
- B.23. <code> (all)
- B.24. <col> (IE3+, N4+, FF1+)
- B.25. <colgroup> (IE3+, N4+, FF1+)
- B.26. <comment> (IE4+ only)
- B.27. <dd> (all)
- B.28. <del> (IE4+, N6+, FF1+)
- B.29. <dfn> (all)
- B.30. <dir> Deprecated (all)
- B.31. <div> (all)
- B.32. <dl> (all)
- B.33. <dt> (all)
- B.34. <em> (all)
- B.35. <embed> (all)
- B.36. <fieldset> (IE4+, N6+, FF1+)
- B.37. <font> Deprecated (all)
- B.38. <form> (all)
- B.39. <frame> (all)
- B.40. <noframes> (all)
- B.41. <frameset> (all)
- B.42. <head> (all)
- B.43. <hn> (all)
- B.44. <hr /> (all)
- B.45. <html> (all)
- B.46. <i> (all)
- B.47. <iframe> (IE3+, N6+, FF1+)
- B.48. <img> (all)
- B.49. <input type="button"> (all)
- B.50. <input type="checkbox"> (all)
- B.51. <input type="file"> (all)
- B.52. <input type="hidden"> (all)
- B.53. <input type="image"> (all)
- B.54. <input type="password"> (all)
- B.55. <input type="radio"> (all)
- B.56. <input type="reset"> (all)
- B.57. <input type="submit"> (all)
- B.58. <input type="text"> (all)
- B.59. <ins> (IE4+, N6+, FF1+)
- B.60. <isindex> Deprecated (all)
- B.61. <kbd> (all)
- B.62. <keygen> (Netscape only, N3+)
- B.63. <label> (IE4+, N6+, FF1+)
- B.64. <layer> (Netscape only, N4+)
- B.65. <legend> (IE4+, N6+, FF1+)
- B.66. <li> (all)
- B.67. <link> (all)
- B.68. <listing> Deprecated (IE3+)
- B.69. <map> (all)
- B.70. <marquee> (IE only, IE3+)
- B.71. <menu> Deprecated (all)
- B.72. <meta> (all)
- B.73. <multicol> (N3, N4 only)
- B.74. <nextid> (not supported in browsers)
- B.75. <nobr> (all)
- B.76. <noembed> (N2, N3, N4)
- B.77. <noframes> (all)
- B.78. <nolayer> (N4+ only)
- B.79. <noscript> (all)
- B.80. <object> (IE3+, N6+, FF1+)
- B.81. <ol> (all)
- B.82. <optgroup> (IE6+, N6+, FF1+)
- B.83. <option> (all)
- B.84. <p> (all)
- B.85. <param>
- B.86. <plaintext> Deprecated (IE3+, N2, N3, N4)
- B.87. <pre> (all)
- B.88. <q> (IE4+, N6+, FF1+)
- B.89. <s> Deprecated (all)
- B.90. <samp> (all)
- B.91. <script> (all)
- B.92. <select> (all)
- B.93. <small> (all)
- B.94. <span> (all)
- B.95. <strike> Deprecated (all)
- B.96. <strong> (all)
- B.97. <style> (IE3+, N4+, FF1+)
- B.98. <sub> (all)
- B.99. <sup> (all)
- B.100. <table> (all)
- B.101. <tbody> (IE3+, N6+, FF1+)
- B.102. <td> (all)
- B.103. <textarea> (all)
- B.104. <tfoot> (IE3+, N6+, FF1+)
- B.105. <thead> (IE3+, N6+, FF1+)
- B.106. <th> (all)
- B.107. <title> (all)
- B.108. <tr> (all)
- B.109. <tt> (all)
- B.110. <u> (all)
- B.111. <ul> (all)
- B.112. <var> (IE3+, N6+, FF1+)
- B.113. <wbr> (IE3, N2, N3, N4)
- B.114. <xmp> Deprecated (all)
-
C. CSS Properties
- C.1. Font Properties
- C.2. Text Properties
- C.3. Color and Background Properties
-
C.4. Border properties
- C.4.1. border (border-bottom, border-left, border-top, border-right)
- C.4.2. border-style (border-bottom-style, border-left-style, border-top-style, border-right-style)
- C.4.3. border-width (border-bottom-width, border-left-width, border-top-width, border-right-width)
- C.4.4. border-color (border-bottom-color, border-left-color, border-top-color, border-right-color)
- C.5. Dimensions
- C.6. Margin Properties
- C.7. Padding Properties
- C.8. List Properties
- C.9. Positioning Properties
- C.10. Outline Properties
- C.11. Table Properties
- C.12. Classification Properties
- C.13. Internationalization Properties
- C.14. Lengths
- D. Color Names and Values
- E. Character Encodings
- F. Special Characters
- G. Language Codes
- H. MIME Media Types
- I. Deprecated and Browser-Specific Markup
Product information
- Title: Beginning Web Programming with HTML, XHTML, and CSS, Second Edition
- Author(s):
- Release date: April 2008
- Publisher(s): Wrox
- ISBN: 9780470259313
You might also like
book
Beginning HTML, XHTML, CSS, and JavaScript®
An indispensable introductory guide to creating web pages using the most up-to-date standards This beginner guide …
book
CSS3 For Web Designers, Second Edition
foreword by JEFFREY ZELDMAN From advanced selectors to generated content to web fonts, and from gradients, …
book
HTML & XHTML: The Definitive Guide, 6th Edition
"...lucid, in-depth descriptions of the behavior of every HTML tag on every major browser and platform, …
book
CSS3 for Web Designers
From advanced selectors to generated content to the triumphant return of web fonts, and from gradients, …