A high-level view of the book is shown under "Contents at a Glance." Select a chapter title to jump down to the chapter's topics listed in the TOC, or jump to the Table of Contents directly.
Contents at a Glance
- Acknowledgments
- Introduction
- Chapter 01 Web Page Building Blocks
- Chapter 02 Working with Web Page Files
- Chapter 03 Basic HTML Structure
- Chapter 04 Text
- Chapter 05 Images
- Chapter 06 Links
- Chapter 07 CSS Building Blocks
- Chapter 08 Working with Style Sheets
- Chapter 09 Defining Selectors
- Chapter 10 Formatting Text with Styles
- Chapter 11 Layout with Styles
- Chapter 12 Style Sheets for Mobile to Desktop
- Chapter 13 Working with Web Fonts
- Chapter 14 Enhancements with CSS3
- Chapter 15 Lists
- Chapter 16 Forms
- Chapter 17 Video, Audio, and Other Multimedia
- Chapter 18 Tables
- Chapter 19 Working with Scripts
- Chapter 20 Testing & Debugging Web Pages
- Chapter 21 Publishing Your Pages on the Web
- Index
Table of Contents
Acknowledgments
Introduction
- HTML and CSS in Brief
- Progressive Enhancement: A Best Practice
- Is This Book for You?
- How This Book Works
- Companion Web Site
Chapter 1 Web Page Building Blocks
- A Basic HTML Page
- Semantic HTML: Markup with Meaning
- Markup: Elements, Attributes, and Values
- A Web Page's Text Content
- Links, Images, and Other Non-Text Content
- File Names
- URLs
- Key Takeaways
Chapter 2 Working with Web Page Files
- Planning Your Site
- Creating a New Web Page
- Saving Your Web Page
- Specifying a Default Page or Homepage
- Editing Web Pages
- Organizing Files
- Viewing Your Page in a Browser
- The Inspiration of Others
Chapter 3 Basic HTML Structure
- Starting Your Web Page
- Creating a Title
- Creating Headings
- Understanding HTML5's Document Outline
- Grouping Headings
- Common Page Constructs
- Creating a Header
- Marking Navigation
- Creating an Article
- Defining a Section
- Specifying an Aside
- Creating a Footer
- Creating Generic Containers
- Improving Accessibility with ARIA
- Naming Elements with a Class or ID
- Adding the Title Attribute to Elements
- Adding Comments
Chapter 4 Text
- Starting a New Paragraph
- Adding Author Contact Information
- Creating a Figure
- Specifying Time
- Marking Important and Emphasized Text
- Indicating a Citation or Reference
- Quoting Text
- Highlighting Text
- Explaining Abbreviations
- Defining a Term
- Creating Superscripts and Subscripts
- Noting Edits and Inaccurate Text
- Marking Up Code
- Using Preformatted Text
- Specifying Fine Print
- Creating a Line Break
- Creating Spans
- Other Elements
Chapter 5 Images
- About Images for the Web
- Getting Images
- Choosing an Image Editor
- Saving Your Images
- Inserting Images on a Page
- Offering Alternate Text
- Specifying Image Size
- Scaling Images with the Browser
- Scaling Images with an Image Editor
- Adding Icons for Your Web Site
Chapter 6 Links
- The Anatomy of a Link
- Creating a Link to Another Web Page
- Creating Anchors
- Linking to a Specific Anchor
- Creating Other Kinds of Links
Chapter 7 CSS Building Blocks
- Constructing a Style Rule
- Adding Comments to Style Rules
- The Cascade: When Rules Collide
- A Property's Value
Chapter 8 Working with Style Sheets
- Creating an External Style Sheet
- Linking to External Style Sheets
- Creating an Embedded Style Sheet
- Applying Inline Styles
- The Importance of Location
- Using Media-Specific Style Sheets
- Offering Alternate Style Sheets
- The Inspiration of Others: CSS
Chapter 9 Defining Selectors
- Constructing Selectors
- Selecting Elements by Name
- Selecting Elements by Class or ID
- Selecting Elements by Context
- Selecting Part of an Element
- Selecting Links Based on Their State
- Selecting Elements Based on Attributes
- Specifying Groups of Elements
- Combining Selectors
- Selectors Recap
Chapter 10 Formatting Text with Styles
- Choosing a Font Family
- Specifying Alternate Fonts
- Creating Italics
- Applying Bold Formatting
- Setting the Font Size
- Setting the Line Height
- Setting All Font Values at Once
- Setting the Color
- Changing the Text’s Background
- Controlling Spacing
- Adding Indents
- Setting White Space Properties
- Aligning Text
- Changing the Text Case
- Using Small Caps
- Decorating Text
Chapter 11 Layout with Styles
- Considerations When Beginning a Layout
- Structuring Your Pages
- Styling HTML5 Elements in Older Browsers
- Resetting or Normalizing Default Styles
- The Box Model
- Changing the Background
- Setting the Height or Width for an Element
- Setting the Margins around an Element
- Adding Padding around an Element
- Making Elements Float
- Controlling Where Elements Float
- Setting the Border
- Offsetting Elements in the Natural Flow
- Positioning Elements Absolutely
- Positioning Elements in 3D
- Determining How to Treat Overflow
- Aligning Elements Vertically
- Changing the Cursor
- Displaying and Hiding Elements
Chapter 12 Style Sheets for Mobile to Desktop
- Mobile Strategies and Considerations
- Understanding and Implementing Media Queries
- Building a Page that Adapts with Media Queries
Chapter 13 Working with Web Fonts
- What Is a Web Font?
- Where to Find Web Fonts
- Downloading Your First Web Font
- Working with @font-face
- Styling Web Fonts and Managing File Size
Chapter 14 Enhancements with CSS3
- Understanding Vendor Prefixes
- A Quick Look at Browser Compatibility
- Using Polyfills for Progressive Enhancement
- Rounding the Corners of Elements
- Adding Drop Shadows to Text
- Adding Drop Shadows to Other Elements
- Applying Multiple Backgrounds
- Using Gradient Backgrounds
- Setting the Opacity of Elements
Chapter 15 Lists
- Creating Ordered and Unordered Lists
- Choosing Your Markers
- Choosing Where to Start List Numbering
- Using Custom Markers
- Controlling Where Markers Hang
- Setting All List-Style Properties at Once
- Styling Nested Lists
- Creating Description Lists
Chapter 16 Forms
- Creating Forms
- Processing Forms
- Sending Form Data via Email
- Organizing the Form Elements
- Creating Text Boxes
- Creating Password Boxes
- Creating Email, Telephone, and URL Boxes
- Labeling Form Parts
- Creating Radio Buttons
- Creating Select Boxes
- Creating Checkboxes
- Creating Text Areas
- Allowing Visitors to Upload Files
- Creating Hidden Fields
- Creating a Submit Button
- Using an Image to Submit a Form
- Disabling Form Elements
- New HTML5 Features and Browser Support
Chapter 17 Video, Audio, and Other Multimedia
- Third-Party Plugins and Going Native
- Video File Formats
- Adding a Single Video to Your Web Page
- Exploring Video Attributes
- Adding Controls and Autoplay to Your Video
- Looping a Video and Specifying a Poster Image
- Preventing a Video from Preloading
- Using Video with Multiple Sources
- Multiple Media Sources and the Source Element
- Adding Video with Hyperlink Fallbacks
- Adding Video with Flash Fallbacks
- Providing Accessibility
- Adding Audio File Formats
- Adding a Single Audio File to Your Web Page
- Adding a Single Audio File with Controls to Your Web Page
- Exploring Audio Attributes
- Adding Controls and Autoplay to Audio in a Loop
- Preloading an Audio File
- Providing Multiple Audio Sources
- Adding Audio with Hyperlink Fallbacks
- Adding Audio with Flash Fallbacks
- Adding Audio with Flash and a Hyperlink Fallback
- Getting Multimedia Files
- Considering Digital Rights Management (DRM)
- Embedding Flash Animation
- Embedding YouTube Video
- Using Video with Canvas
- Coupling Video with SVG
- Further Resources
Chapter 18 Tables
- Structuring Tables
- Spanning Columns and Rows
Chapter 19 Working with Scripts
- Loading an External Script
- Adding an Embedded Script
- JavaScript Events
Chapter 20 Testing & Debugging Web Pages
- Trying Some Debugging Techniques
- Checking the Easy Stuff: General
- Checking the Easy Stuff: HTML
- Checking the Easy Stuff: CSS
- Validating Your Code
- Testing Your Page
- When Images Don’t Appear
- Still Stuck?
Chapter 21 Publishing Your Pages on the Web
- Getting Your Own Domain Name
- Finding a Host for Your Site
- Transferring Files to the Server