Html And Css Visual Quickstart Guide Pdf Download

  1. Html And Css Codes Pdf
  2. Visual Quickstart Guide Photoshop
  3. Html Css Tutorial Pdf

Visual QuickStart Guide Elizabeth Castro, Bruce Hyslop. Link points to a PDF rather than to another HTML page so they won't be surprised (users. It's a good idea to compress large files and groups of files that you want visitors to download. Benefits of your Css3 Visual Quickstart Guide 5th Edition Free Download guide will probably be to the purchasers who buy it. And then watch your market come to you! Pdf download css3 visual quickstart guide 5th edition free pdf css3 visual quickstart guide 5th edition download free css3 visual quickstart guide 5th edition.

  1. HTML and CSS: Visual QuickStart Guide 8th Edition Pdf Download For Free Book - By Elizabeth Castro, Bruce Hyslop HTML and CSS: Visual QuickStart Guide Need to learn HTML and CSS fast? This best-selling reference's visual format and step-by-step - Read Online Books at SmteBooks.Eu.
  2. HTML and CSS: Visual QuickStart Guide IMPORTANT All of the work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
  3. HTML and CSS: Visual QuickStart Guide, 8th Edition By Elizabeth Castro, Bruce Hyslop Published Aug 9, 2013 by Peachpit Press.
V I S UA L Q U I C K S tA r t G U I D E
HTML5 and CSS3 Seventh Edition ElizabEth Castro

Peachpit Press
bruCE hyslop
HTML5 and CSS3, Seventh Edition: Visual QuickStart Guide Elizabeth Castro and Bruce Hyslop Peachpit Press 1249 Eighth Street Berkeley, CA 94710 510/524-2178 510/524-2221 (fax) Find us on the Web at www.peachpit.com. To report errors, please send a note to [email protected] Peachpit Press is a division of Pearson Education. Copyright © 2012 by Elizabeth Castro and Bruce Hyslop Editor: Clifford Colby Development editor: Robyn G. Thomas Production editor: Cory Borman Compositor: David Van Ness Copyeditor: Scout Festa Proofreader: Nolan Hester Technical editors: Michael Bester and Chris Casciano Indexer: Valerie Haynes Perry Cover design: RHDG/Riezebos Holzbaur Design Group, Peachpit Press Interior design: Peachpit Press Logo design: MINE™ www.minesf.com
Notice of Rights All rights reserved. No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. For information on getting permission for reprints and excerpts, contact [email protected] bart.gov screen shots courtesy of San Francisco Bay Area Rapid Transit District (BART). css3generator.com screen shots courtesy of Randy Jensen. dribbble.com screen shots courtesy of Dan Cederholm. fontsquirrel.com screen shots courtesy of Ethan Dunham. foodsense.is screen shots courtesy of Julie Lamba. modernizr.com screen shots courtesy of Faruk Ates. namecheap.com screen shots courtesy of Namecheap.
Notice of Liability The information in this book is distributed on an “As Is” basis without warranty. While every precaution has been taken in the preparation of the book, neither the authors nor Peachpit shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software and hardware products described in it.
Trademarks Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Peachpit was aware of a trademark claim, the designations appear as requested by the owner of the trademark. All other product names and services identified throughout this book are used in editorial fashion only and for the benefit of such companies with no intention of infringement of the trademark. No such use, or the use of any trade name, is intended to convey endorsement or other affiliation with this book. ISBN-13: 978-0-321-71961-4 ISBN-10: 0-321-71961-1 9 8 7 6 5 4 3 2 1 Printed and bound in the United States of America
To family.
Acknowledgments Writing the acknowledgments is one of the most daunting challenges of working on a book, because you want to be sure to convey your appreciation of everyone properly. This book is the result of the support, tireless work, and good spirits of a lot of people. I hope to do them all justice, and I hope that you’ll indulge me for a bit while I thank them. A most sincere thank you goes out to: Nancy Aldrich-Ruenzel and Nancy Davis, for entrusting me with this edition of a book that has been important to Peachpit for many years. Cliff Colby, for recommending me and making this possible; for his confidence in me and his patience, flexibility, and guidance; and for countless conversations and lots of laughs. Robyn Thomas, for her tremendous effort in keeping us all on track, wrangling countless documents, making thoughtful edits and suggestions, and providing regular words of encouragement, which were always a boost. Michael Bester, for all the spot-on feedback and suggestions, catching technical errors and omissions, and helping us get the right message across to readers. It was a real pleasure working with him on another book. Chris Casciano, in the same vein, for all your technical expertise, suggestions, and crucial feedback. I really appreciated your joining us in the final weeks; we were lucky to have you.
iv
Acknowledgments
Cory Borman, for expertly overseeing the production of the book and creating diagrams in a pinch, and for his good humor. Scout Festa, for carefully correcting grammar and punctuation, tightening up language, ensuring the accuracy of figure and chapter references, and, overall, providing an all-important level of polish. David Van Ness, for his great care laying out the pages and for his proficiency and attention to detail. Nolan Hester, for lending his expertise to the effort of reviewing the laid-out pages. Valerie Haynes Perry, for handling the critical task of creating an effective index on which readers will rely time and again. The numerous marketing, sales, and other folks at Peachpit for working behind the scenes to make the book successful. My family and friends, for checking in on my progress and providing occasional, welcome breaks from writing. Thanks to those friends in particular who probably tired of hearing me say often that I couldn’t get together, but who kept asking anyway. Robert Reinhardt, as always, for getting me started in writing books and for his guidance as I was embarking on this one. The Web community, for your innovations and for sharing your knowledge so that others may benefit (I’ve cited many of you throughout the book). To you readers, for your interest in learning about HTML and CSS and for selecting this book; I know you have a lot of others from which to choose. I hope the book serves you well.
Thank you so much to the following contributing authors. Readers have a more valuable book because of your efforts, for which I’m grateful. I’d also like to extend my apologies to Erik Vorhes that we weren’t able to fit Appendixes A and B in the book. Readers who see them on the book’s site will surely appreciate your work. In alphabetical order by last name, the contributing authors are: Scott Boms (Chapter 14) Scott is an award-winning designer, writer, and speaker who has partnered with organizations such as PayPal, HSBC, Hyundai, DHL, XM Radio, Toronto Life magazine, and Masterfile during his more than 15 years of working on the Web. When he’s away from the computer, you might find him shooting Polaroids; playing drums with his band, George; or enjoying time with his wonderful wife and two children. He’s @scottboms on Twitter. Ian Devlin (Chapter 17) Ian Devlin is an Irish Web developer, blogger, and author who enjoys coding and writing about emerging Web technologies such as HTML5 and CSS3. In addition to front-end development, Ian also builds solutions with back-end technologies such as .NET and PHP. He has recently written a book, HTML5 Multimedia: Develop and Design (Peachpit Press, 2011).
Seth Lemoine (Chapters 5 and 16) Seth Lemoine is a software developer and teacher in Atlanta. For over ten years, he’s worked on challenging projects to see what’s possible, with technologies from HTML, JavaScript, and CSS to Objective-C and Ruby. Whether it’s finding innovative ways to teach HTML5 and CSS to his students or perfecting a Schezuan recipe in his outdoor wok, being creative is his passion. Erik Vorhes (Appendixes A and B, available on the book’s Web site) Erik Vorhes creates things for the Web with VSA Partners and is managing editor for Typedia (http://typedia.com/). He lives and works in Chicago. Brian Warren (Chapter 13) Brian Warren is a senior designer at Happy Cog in Philadelphia. When he’s not writing or designing, he spends his time playing with his beautiful family, listening to music, and brewing beer. He blogs, intermittently, at http://begoodnotbad.com.
And, finally, I’d like to extend a special thank you to Elizabeth Castro. She created the first edition of this book more than 15 years ago and nurtured her audience with each edition that followed. Her style of teaching has resonated with literally hundreds of thousands of readers over the years. I’m extremely grateful for the opportunity to be part of this book, and I was very mindful of doing right by both it and readers while working on this edition. —Bruce
Acknowledgments
v
Contents at a Glance acknowledgments . . . . . . . . . . . . . . . . . . . . iv introduction . . . . . . . . . . . . . . . . . . . . . . . . xv Chapter 1
Web page building blocks . . . . . . . . . . . . . . . 1
Chapter 2
Working with Web page Files . . . . . . . . . . . . 25
Chapter 3
basic htMl structure . . . . . . . . . . . . . . . . . 41
Chapter 4
text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Chapter 5
images . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Chapter 6
links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Chapter 7
Css building blocks . . . . . . . . . . . . . . . . . . 179
Chapter 8
Working with style sheets . . . . . . . . . . . . . . 197
Chapter 9
Defining selectors . . . . . . . . . . . . . . . . . . . 213
Chapter 10
Formatting text with styles . . . . . . . . . . . . . 241
Chapter 11
layout with styles . . . . . . . . . . . . . . . . . . . . 275
Chapter 12
style sheets for Mobile to Desktop . . . . . . . . 327
Chapter 13
Working with Web Fonts . . . . . . . . . . . . . . . 353
Chapter 14
Enhancements with Css3 . . . . . . . . . . . . . . . 371
Chapter 15
lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Chapter 16
Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Chapter 17
Video, audio, and other Multimedia . . . . . . . 449
Chapter 18
tables . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Chapter 19
Working with scripts . . . . . . . . . . . . . . . . . . 497
Chapter 20
testing & Debugging Web pages . . . . . . . . . 505
Chapter 21
publishing your pages on the Web . . . . . . . . . 521 index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
vi
Contents at a Glance
Table of Contents Acknowledgments . . . . . . . . . . . . . . . . . . . . . iv Introduction . . . . . . . . . . . . . . . . . . . . . . . . xv HTML and CSS in Brief . . . . . . . . . . . . Progressive Enhancement: A Best Practice Is This Book for You? . . . . . . . . . . . . . How This Book Works. . . . . . . . . . . . . Companion Web Site . . . . . . . . . . . . .
Chapter 1
. . . . .
. . . . .
. . . . .
. . . . .
. xvi xviii . xx . xxii xxiv
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
.3 .6 .13 16 .17 19 20 24
Working with Web Page Files . . . . . . . . . . . . . 25 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
. . . . .
Web Page Building Blocks . . . . . . . . . . . . . . . . 1 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
. . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
26 28 30 33 35 36 37 39
Basic HTML Structure . . . . . . . . . . . . . . . . . . 41 Starting Your Web Page . . . . . . . . . . . Creating a Title. . . . . . . . . . . . . . . . . Creating Headings . . . . . . . . . . . . . . Understanding HTML5’s Document Outline Grouping Headings . . . . . . . . . . . . . . Common Page Constructs . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
43 46 48 50 58 60
Table of Contents vii
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
. . . . . . . . . . .
. . . . . . . . . . .
Table of Contents
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
61 64 68 72 75 80 84 88 92 95 96
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
.100 . 102 . 104 .106 . 110 . 112 . 113 . 116 . 118 . 120 . 121 . 124 . 128 . 130 . 132 . 133 . 134 . 136
Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 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
viii
. . . . . . . . . . .
Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 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
. . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. 148 . 152 . 153 . 154 . 156 . 157 . 158 .160
Scaling Images with an Image Editor . . . . . . . . . . . 161 Adding Icons for Your Web Site . . . . . . . . . . . . . . 162
Chapter 6
Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 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
. . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
.166 . 167 . 172 . 174 . 175
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. 181 . 182 . 184 . 188
Working with Style Sheets . . . . . . . . . . . . . . . 197 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
. . . . .
CSS Building Blocks . . . . . . . . . . . . . . . . . . . 179 Constructing a Style Rule. . . . . . Adding Comments to Style Rules . The Cascade: When Rules Collide. A Property’s Value. . . . . . . . . .
Chapter 8
. . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. 198 200 202 204 206 208 .210 . 212
Defining Selectors . . . . . . . . . . . . . . . . . . . . 213 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 . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. 214 .216 . 218 . 221 227 230 232 236 238 240
Table of Contents ix
Chapter 10
Formatting Text with Styles . . . . . . . . . . . . . . 241 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
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
Table of Contents
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
243 244 246 248 250 255 256 258 260 264 265 266 268 270 . 271 272
Layout with Styles . . . . . . . . . . . . . . . . . . . 275 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 . . . . . . .
x
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
276 279 286 290 292 294 298 302 304 306 308 . 311 . 314 . 316 . 318 320 322 323 324
Chapter 12
Style Sheets for Mobile to Desktop . . . . . . . . 327 Mobile Strategies and Considerations . . . . . . . . . 328 Understanding and Implementing Media Queries. . . 333 Building a Page that Adapts with Media Queries . . . 340
Chapter 13
Working with Web Fonts . . . . . . . . . . . . . . . 353 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
. . . . .
. . . . .
. . . . .
. . . . .
354 356 358 360 365
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
373 375 376 378 382 384 388 390 394
Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 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
. . . . .
Enhancements with CSS3 . . . . . . . . . . . . . . . 371 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
. . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
398 . 401 403 404 406 407 408 . 412
Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 Creating Forms . . . . . . . . . Processing Forms . . . . . . . . Sending Form Data via Email. . Organizing the Form Elements. Creating Text Boxes . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. 419 . 421 424 426 428
Table of Contents xi
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
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. 431 432 434 436 438 440 . 441 442 443 444 446 .447 448
Video, Audio, and Other Multimedia . . . . . . . 449 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 . . . . . . . . . . . . .
xii Table of Contents
. . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. 451 452 453 454 455 457 458 459 460 . 461 463 467 468 469
. . . . . . . . . . .
. . . . . . . . . . .
470 . 471 472 .473 .474 .475 .476 .478 480 . 481 482
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Embedding YouTube Video Using Video with Canvas Coupling Video with SVG Further Resources
484 485 486 487
Tables
489
Structuring Tables Spanning Columns and Rows
490 494
Working with Scripts
497
Loading an External Script Adding an Embedded Script JavaScript Events
499 502 503
Testing & Debugging Web Pages
505
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?
506 508 510 512 514 516 519 520
Publishing Your Pages on the Web
521
Getting Your Own Domain Name Finding a Host for Your Site Transferring Files to the Server
522 523 525
Index
529
Bonus chapters mentioned in this eBook are available after the index. Appendix A
A1
Appendix B
B1
Table of Contents xiii
This page intentionally left blank
Introduction Whether you are just beginning your venture into building Web sites or have built some before but want to ensure that your knowledge is current, you’ve come along at a very exciting time in the industry. How we code and style pages, the browsers in which we view the pages, and the devices on which we view the browsers have all advanced substantially the past few years. Once limited to browsing the Web from our desktop computers or laptops, we can now take the Web with us on any number of devices: phones, tablets, and, yes, laptops and desktops, and more. Which is as it should be, because the Web’s promise has always been the dissolution of boundaries—the power to share and access information freely from any metropolis, rural community,
or anywhere in between, from any Webenabled device. In short, the Web’s promise lies in its universality. And the Web’s reach continues to expand as technology finds its ways to communities that were once shut out. Adding to the Web’s greatness is that anyone is free to create and launch a site. This book shows you how. It is ideal for the beginner with no knowledge of HTML or CSS who wants to begin to create Web pages. You’ll find clear, easy-to-follow instructions that take you through the process of creating pages step by step. Lastly, the book is a helpful guide to keep handy. You can look up topics in the table of contents or index and consult just those subjects about which you need more information.
Introduction
xv
HTML and CSS in Brief At the root of the Web’s success is a simple, text-based markup language that is easy to learn and that any device with a basic Web browser can read: HTML. Every Web page requires at least some HTML; it wouldn’t be a Web page without it. As you will learn in greater detail as you move through this book, HTML is used to define your content’s meaning, and CSS is used to define how your content and Web page will look. Both HTML pages and CSS files (style sheets) are text files, making them easy to edit. You can see snippets of HTML and CSS in “How This Book Works,” near the end of this introduction. You’ll dive into learning a basic HTML page right off the bat in Chapter 1, and you’ll begin to learn how to style your pages with CSS in Chapter 7. See “What this book will teach you” for an overview of all the chapters and a summary of the topics covered.
What is HTML5? It helps to know some basics about the origins of HTML in order to understand HTML5. HTML began in the early 1990s as a short document that detailed a handful of elements used to build Web pages. Many of those elements were for describing Web page content such as headings, paragraphs, and lists. HTML’s version number has increased as the language has evolved with the introduction of other elements and adjustments to its rules. The most current version is HTML5. HTML5 is a natural evolution of earlier versions of HTML and strives to reflect the needs of both current and future Web sites. It inherits the vast majority of features from its predecessors, meaning that if you coded HTML before HTML5 came on the
xvi
Introduction
scene, you already know a lot of HTML5. This also means that much of HTML5 works in both old and new browsers; being backward compatible is a key design principle of HTML5 (see www.w3.org/TR/ html-design-principles/). HTML5 also adds a bevy of new features. Many are straightforward, such as additional elements (article, section, figure, and many more) that are used to describe content. Others are quite complex and aid in creating powerful Web applications. You’ll need to have a firm grasp of creating Web pages before you can graduate to the more complicated features that HTML5 provides. HTML5 also introduces native audio and video playback to your Web pages, which the book also covers.
What is CSS3? The first version of CSS didn’t exist until after HTML had been around for a few years, becoming official in 1996. Like HTML5 and its relationship to earlier versions of HTML, CSS3 is a natural extension of the versions of CSS that preceded it. CSS3 is more powerful than earlier versions of CSS and introduces numerous visual effects, such as drop shadows, text shadows, rounded corners, and gradients. (See “What this book will teach you” for details of what’s covered.)
Web standards and specifications You might be wondering who created HTML and CSS in the first place, and who continues to evolve them. The World Wide Web Consortium (W3C)—directed by the inventor of the Web and HTML, Tim Berners-Lee—is the organization responsible for shepherding the development of Web standards. Specifications (or specs, for short) are documents that define the parameters
of languages like HTML and CSS. In other words, specs standardize the rules. Follow the W3C’s activity at www.w3.org A. For a variety of reasons, another organization—the Web Hypertext Application Technology Working Group (WHATWG, found at www.whatwg.org)—is developing the HTML5 specification. The W3C incorporates WHATWG’s work into its official version of the in-progress spec.
A The W3C site is the industry’s primary source of Web-standards specifications.
With standards in place, we can build our pages from the agreed-upon set of rules, and browsers—like Chrome, Firefox, Internet Explorer (IE), Opera, and Safari—can be built to display our pages with those rules in mind. (On the whole, browsers implement the standards well. Older versions of IE, especially IE6, have some issues. Specifications go through several stages of development before they are considered final, at which point they are dubbed a Recommendation (www.w3.org/2005/10/ Process-20051014/tr). Parts of the HTML5 and CSS3 specs are still being finalized, but that doesn’t mean you can’t use them. It just takes time (literally years) for the standardization process to run its course. Browsers begin to implement a spec’s features long before it becomes a Recommendation, because that informs the spec development process itself. So browsers already include a wide variety of features in HTML5 and CSS3, even though they aren’t Recommendations yet. On the whole, the features covered in this book are well entrenched in their respective specs, so the risk of their changing prior to becoming a Recommendation is minimal. Developers have been using many HTML5 and CSS3 features for some time. So can you.
Introduction
xvii
Progressive Enhancement: A Best Practice I began the introduction by speaking of the universality of the Web—the notion that information on the Web should be accessible to all. Progressive enhancement helps you build sites with universality in mind. It is not a language, rather it’s an approach to building sites that Steve Champeon created in 2003 (http://en.wikipedia.org/wiki/ Progressive_enhancement). The idea is simple but powerful: Start your site with HTML content and behavior that is accessible to all visitors A. To the same page, add your design with CSS B and add additional behavior with JavaScript, typically loading them from external files (you’ll learn how to do this). The result is that devices and browsers capable of accessing basic pages will get the simplified, default experience; devices and browsers capable of viewing morerobust sites will see the enhanced version. The experience on your site doesn’t have to be the same for everyone, as long as your content is accessible. In essence, the idea behind progressive enhancement is that everyone wins.
xviii Introduction
A A basic HTML page with no custom CSS
applied to it. This page may not look great, but the information is accessible—and that’s what’s important. Even browsers from near the inception of the Web more than 20 years ago can display this page; so too can the oldest of mobile phones with Web browsers. And screen readers, software that reads Web pages aloud to visually impaired visitors, will be able to navigate it easily.
This book teaches you how to build progressively enhanced sites even if it doesn’t always explicitly call that out while doing so. It’s a natural result of the best practices imparted throughout the book.
B The same page as viewed in a browser
that supports CSS. It’s the same information, just presented differently. Users with more capable devices and browsers get an enhanced experience when visiting the page.
However, Chapters 12 and 14 do address progressive enhancement head on. Take an early peek at those if you’re interested in seeing how the principle of progressive enhancement helps you build a site that adapts its layout based on a device’s screen size and browser capabilities, or how older browsers will display simplified designs while modern browsers will display ones enhanced with CSS3 effects. Progressive enhancement is a key best practice that is at the heart of building sites for everyone.
Introduction
xix
Is This Book for You? This book assumes no prior knowledge of building Web sites. So in that sense, it is for the absolute beginner. You will learn both HTML and CSS from the ground up. In the course of doing so, you will also learn about features that are new in HTML5 and CSS3, with an emphasis on the ones that designers and developers are using today in their daily work. But even if you are familiar with HTML and CSS, you still stand to learn from this book, especially if you want to get up to speed on much of the latest in HTML5, CSS3, and best practices.
n
n
n
The chapters are organized like so: n
n
Chapters 1 through 6 and 15 through 18 cover the principles of creating HTML pages and the range of HTML elements at your disposal, clearly demonstrating when and how to use each one. Chapters 7 through 14 dive into CSS, all the way from creating your first style rule to applying enhanced visual effects with CSS3.
xx Introduction
Chapter 20 tells you how to test and debug your pages before putting them on the Web. Chapter 21 explains how to secure your own domain name and then publish your site on the Web for all to see.
Expanding on that, some of the topics include: n
n
n
What this book will teach you We’ve added approximately 125 pages to this book since the previous edition in order to bring you as much material as possible. (The very first edition of the book, published in 1996, had 176 pages total.) We’ve also made substantial updates to (or done complete rewrites of) nearly every previous page. In short, this Seventh Edition represents a major revision.
Chapter 19 shows you how to add prewritten JavaScript to your pages.
n
n
n
n
n
Creating, saving, and editing HTML and CSS files. What it means to write semantic HTML and why it is important. How to separate your page’s content (that is, your HTML) from its presentation (that is, your CSS)—a key aspect of progressive enhancement. Structuring your content in a meaningful way by using HTML elements that have been around for years and ones that are new in HTML5. Improving your site’s accessibility with ARIA landmark roles and other good coding practices. Adding images to your pages and optimizing them for the Web. Linking from one Web page to another page, or from one part of a page to another part. Styling text (size, color, bold, italics, and more); adding background colors and images; and implementing a fluid, multi-column layout that can shrink and expand to accommodate different screen sizes.
n
n
n
n
n
n
n
Leveraging new selectors in CSS3 that allow you to target your styles in a wider range of ways than was previously possible. Learning your options for addressing visitors on mobile devices. Building a single site for all users— whether they are using a mobile phone, tablet, laptop, desktop computer, or other Web-enabled device—based on many of the principles of responsive web design, some of which leverage CSS3 media queries.
What this book won’t teach you Alas, even after adding so many pages since the previous edition, there is so much to talk about when it comes to HTML and CSS that we had to leave out some topics. With a couple of exceptions, we stuck to omitting items that you would have fewer occasions to use, are still subject to change, lack widespread browser support, require JavaScript knowledge, or are advanced subjects. Some of the topics not covered include:
Adding custom Web fonts to your pages with @font-face.
n
Using CSS3 effects such as opacity, background alpha transparency, gradients, rounded corners, drop shadows, shadows inside elements, text shadows, and multiple background images.
n
n
Building forms to solicit input from your visitors, including using some of the new form input types in HTML5. Including media in your pages with the HTML5 audio and video elements.
n
And more. These topics are complemented by many dozens of code samples that show you how to implement the features based on best practices in the industry.
n
n
n
The HTML5 details, summary, menu, command, and keygen elements. The HTML5 canvas element, which allows you to draw graphics (and even create games) with JavaScript. The HTML5 APIs and other advanced features that require JavaScript knowledge or are otherwise not directly related to the new semantic HTML5 elements. CSS sprites. This technique involves combining more than one image into a single image, which is very helpful in minimizing the number of assets your pages need to load. See www.bruceontheloose.com/sprites/ for more information. CSS image replacement. These techniques are often paired with CSS sprites. See www.bruceontheloose .com/ir/ for more information. CSS3 transforms, animations, and transitions. CSS3’s new layout modules.
Introduction
xxi
How This Book Works
because there’s no telling what browsers your visitors will use.
Nearly every section of the book contains practical code examples that demonstrate real-world use (A and B). Typically, they are coupled with screen shots that show the results of the code when you view the Web page in a browser C.
The code and screen shots are accompanied by descriptions of the HTML elements or CSS properties in question, both to give the samples context and to increase your understanding of them.
Most of the screen shots are of the latest version of Firefox that was available at the time. However, this doesn’t imply a recommendation of Firefox over any other browser. The code samples will look very similar in any of the latest versions of Chrome, Internet Explorer, Opera, or Safari. As you will learn in Chapter 20, you should test your pages in a wide range of browsers before putting them on the Web,
In many cases, you may find that the descriptions and code samples are enough for you to start using the HTML and CSS features. But if you need explicit guidance on how to use them, step-by-step instructions are always provided. Finally, most sections contain tips that relay additional usage information, best practices, references to related parts of the book, links to relevant resources, and more.
A You’ll find a snippet of HTML code on many pages, with the pertinent sections highlighted. An ellipsis (...) represents additional code or content that was omitted for brevity. Often, the omitted portion is shown in a different code figure. ... ...

Html And Css Codes Pdf


2010 | 456 Pages | ISBN: 0321719638 | PDF | 36 MB

Html And Css Visual Quickstart Guide Pdf Download

With CSS3: Visual QuickStart Guide, readers can start with a tour of the stylesheet language, or skip ahead to any chapter of the book to look up specific tasks covering just what they need to know. This task-based, visual reference guide uses step-by-step instructions, and plenty of screenshots to teach beginning and intermediate users CSS. Best-selling author Jason Cranford Teague takes readers through today's CSS essentials and provides extensive coverage of CSS3 and CSS 2.1 techniques. The book outlines what can be done with CSS3 now and how the latest browsers have implemented many of the new features. Both beginning users, who want a thorough introduction to CSS, and more advanced users, who are looking for a convenient reference, will find what they need here in straightforward language and through readily accessible examples.
Download:
http://longfiles.com/ptmuxcirfw0v/1394025970_0321719638_CSS3.pdf.html
http://onmirror.com/hyqm2ti1se8o/1394025970_0321719638_CSS3.pdf.html

Visual Quickstart Guide Photoshop

Download

Html Css Tutorial Pdf