This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
• The fundamentals of effective page design • How to build your pages using HTML • Tips for customizing pages with CSS • Steps for optimizing graphics and adding video to your site • How to simplify page building with Microsoft Expression Web • Instructions on using pro Web building tools like Dreamweaver and Flash
• Grab ’em with graphics — discover where to get graphics and how to optimize them for the Web
• How to connect your pages to social sites like Twitter® and Facebook®
• Express yourself — design, create, and publish a site using Microsoft Expression Web
™
4th Edition
s e g a P b e W g n i t a e r C N E A L L- I N - O
91
BOOKS IN
• Dream big — build a site with Dreamweaver for Windows® or Mac®
Go to Dummies.com® for videos, step-by-step examples, how-to articles, or to shop!
• Establish a Web Presence • Web Design • HTML/XHTML • Style with CSS • JavaScript® and Ajax • Graphics • Microsoft® Expression® Web • Adobe® Dreamweaver® • Adobe® Flash®
$34.99 US / $41.99 CN / £24.99 UK
Richard Wagner is Lead Product Architect, Web/Mobile at MAARK and author of several Web and mobile-related books, including Safari and WebKit Development for iPhone OS 3.0, XSLT For Dummies, Web Design Before & After Makeovers, and more.
Establish a Web Presence
• Advice on the best tools for building your pages
Creating Web Pages
Open the book and find:
• Follow the script — find out how you can add interactive features to your pages with JavaScript and Ajax
• Get interactive in a Flash — make your site more appealing with Flash movies and interactivity
HTML/XHTML
Style with CSS
JavaScript® and Ajax
• All those initials — learn as much HTML, XHTML, and CSS as you need
g Easier! Making Everythin
4th Edition
ALL- IN - ONE
• Design for your visitors — apply good Web design principles, make navigation easy, and consider your mobile visitors
Graphics
• You have a presence — explore your options for establishing an online presence with a blog or full-scale Web site
Microsoft® Expression® Web
If you’re not a professional Web designer, and don’t want to be, you probably just want to get the job done and make it look good. There’s nothing wrong with that, and this book is here to help! Self-contained minibooks cover all the essential techniques and technologies, so you can get what you need to plan, design, code, and maintain your site.
Adobe® Flash®
Here’s just what you need to know to create a cool Web site — and no more!
Adobe® Dreamweaver®
Web / Page Design
ISBN 978-0-470-64032-6
Wagner
Richard Wagner
Spine: 1.30”
Get More and Do More at Dummies.com ® Start with FREE Cheat Sheets Cheat Sheets include • Checklists • Charts • Common Instructions • And Other Good Stuff!
To access the Cheat Sheet created specifically for this book, go to
www.dummies.com/cheatsheet/creatingwebpagesaio
s p p A e l i Mob
Get Smart at Dummies.com Dummies.com makes your life easier with 1,000s of answers on everything from removing wallpaper to using the latest version of Windows. Check out our • Videos • Illustrated Articles • Step-by-Step Instructions Plus, each month you can win valuable prizes by entering our Dummies.com sweepstakes. * Want a weekly dose of Dummies? Sign up for Newsletters on • Digital Photography • Microsoft Windows & Office • Personal Finance & Investing • Health & Wellness • Computing, iPods & Cell Phones • eBay • Internet • Food, Home & Garden
Find out “HOW” at Dummies.com *Sweepstakes not currently available in all countries; visit Dummies.com for official rules.
There’s a Dummies App for This and That With more than 200 million books in print and over 1,600 unique titles, Dummies is a global leader in how-to information. Now you can get the same great Dummies information in an App. With topics such as Wine, Spanish, Digital Photography, Certification, and more, you’ll have instant access to the topics you need to know in a format you can trust. To get information on all our Dummies apps, visit the following: www.Dummies.com/go/mobile from your computer. www.Dummies.com/go/iphone/apps from your phone.
About the Author Richard Wagner is Lead Product Architect, Web/Mobile at MAARK and author of several Web and mobile-related books, including Safari and WebKit Development for iPhone OS 3.0, XSLT For Dummies, Web Design Before & After Makeovers, and more. Richard has also authored several books outside of the field of technology, including The Myth of Happiness and The Expeditionary Man.
Dedication To Kimberly and the boys
Publisher’s Acknowledgments We’re proud of this book; please send us your comments at http://dummies.custhelp.com. For other comments, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. Some of the people who helped bring this book to market include the following: Acquisitions and Editorial
Layout and Graphics: Vida Noffsinger, Lavonne Roberts
Copy Editor: Barry Childs-Helton
Proofreader: Laura Bowman
Technical Editor: Claudia Snell
Indexer: BIM Indexing & Proofreading Services
Editorial Manager: Leah Cameron Editorial Assistant: Amanda Graham Sr. Editorial Assistant: Cherie Case Cartoons: Rich Tennant (www.the5thwave.com)
Publishing and Editorial for Technology Dummies Richard Swadley, Vice President and Executive Group Publisher Andy Cummings, Vice President and Publisher Mary Bednarek, Executive Acquisitions Director Mary C. Corder, Editorial Director Publishing for Consumer Dummies Diane Graves Steele, Vice President and Publisher Composition Services Debbie Stailey, Director of Composition Services
Contents at a Glance Introduction ................................................................ 1 Book I: Establish a Web Presence ................................. 7 Chapter 1: Getting Up and Running ................................................................................. 9 Chapter 2: WordPress ..................................................................................................... 19 Chapter 3: Squarespace .................................................................................................. 37 Chapter 4: Connecting Your Site to the Social Web .................................................... 57 Chapter 5: Analyzing Your Web-Site Traffic with Google Analytics .......................... 71
Book II: Web Design .................................................. 83 Chapter 1: Best Practices in Web Design ...................................................................... 85 Chapter 2: Organizing and Navigating Your Web Site............................................... 103 Chapter 3: Designing for Mobile Visitors .................................................................... 107
Book III: HTML/XHTML ............................................ 115 Chapter 1: Exploring HTML and XHTML Documents ................................................ 117 Chapter 2: Working with Text and Links .................................................................... 129 Chapter 3: Presenting Information with Lists and Tables ........................................ 145 Chapter 4: Adding Images ............................................................................................. 157 Chapter 5: Divvying Up the Page with divs ................................................................ 167 Chapter 6: Creating Forms ............................................................................................ 183 Chapter 7: HTML5 Video and Audio ............................................................................ 195
Book IV: Style with CSS ........................................... 201 Chapter 1: Styling Your Web Pages with Cascading Style Sheets ........................... 203 Chapter 2: Selectively Speaking: Working with Selectors......................................... 213 Chapter 3: Formatting Text .......................................................................................... 221 Chapter 4: The Gang of Four: Formatting Box Properties ........................................ 231 Chapter 5: Positioning with CSS ................................................................................... 243
Book V: JavaScript and Ajax ..................................... 253 Chapter 1: Understanding How Scripting Works ....................................................... 255 Chapter 2: Programming in JavaScript ....................................................................... 261 Chapter 3: JavaScript Libraries and Frameworks ...................................................... 281 Chapter 4: Understanding the Document Object Model .......................................... 289 Chapter 5: Adding Event Handlers to Your Web Page .............................................. 307
Chapter 6: Useful Things to Know When Scripting ................................................... 313 Chapter 7: Introducing Ajax.......................................................................................... 335
Book VI: Graphics .................................................... 345 Chapter 1: Understanding Web Graphics ................................................................... 347 Chapter 2: Optimizing Your Graphics ......................................................................... 353 Chapter 3: Image Rollovers........................................................................................... 361
Book VII: Microsoft Expression Web........................... 369 Chapter 1: Getting to Know Microsoft Expression Web ........................................... 371 Chapter 2: Express Yourself: Creating Your First Site with Expression Web ........ 385 Chapter 3: Working with Text, Graphics, and Links .................................................. 397 Chapter 4: Laying Out Your Page with Expression Web ........................................... 411 Chapter 5: “Been There, Formatted That” with Dynamic Web Templates............. 423
Book VIII: Adobe Dreamweaver ................................. 431 Chapter 1: Getting to Know Dreamweaver ................................................................. 433 Chapter 2: Nuts and Bolts: Creating Your First Dreamweaver Web Site ................ 449 Chapter 3: Formatting and Layout Basics .................................................................. 459 Chapter 4: Enhanced Page Elements: Flash Controls and Spry Widgets ................ 475 Chapter 5: Forms Follow Function............................................................................... 489 Chapter 6: Working with CSS ........................................................................................ 501 Chapter 7: When DWT Calls: Using Templates for a Consistent Look .................... 511 Chapter 8: Think Outside the Page: Managing Your Web Site ................................. 519
Book IX: Adobe Flash ............................................... 529 Chapter 1: Getting to Know Adobe Flash .................................................................... 531 Chapter 2: Working with the Stage and Layers .......................................................... 541 Chapter 3: Working with Symbols ............................................................................... 549 Chapter 4: Making Movies ............................................................................................ 559 Chapter 5: Publishing Your Movie ............................................................................... 571
Index ...................................................................... 579
Table of Contents Introduction ................................................................. 1 About This Book .............................................................................................. 1 Foolish Assumptions ....................................................................................... 2 Conventions Used in This Book ..................................................................... 2 What You Don’t Have to Read........................................................................ 3 How This Book Is Organized .......................................................................... 3 Book I: Establish a Web Presence ........................................................ 3 Book II: Web Design ............................................................................... 3 Book III: HTML/XHTML ......................................................................... 3 Book IV: Style with CSS ......................................................................... 4 Book V: JavaScript and Ajax ................................................................ 4 Book VI: Graphics .................................................................................. 4 Book VII: Microsoft Expression Web ................................................... 4 Book VIII: Adobe Dreamweaver ........................................................... 4 Book IX: Adobe Flash............................................................................. 4 Icons Used in This Book ................................................................................. 5 Where to Go from Here ................................................................................... 5
Book I: Establish a Web Presence .................................. 7 Chapter 1: Getting Up and Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 Knowing the Lingo and the Basics ................................................................ 9 Navigating the Web................................................................................ 9 Creating and publishing a Web site ................................................... 11 Exploring Your Web-Site Choices ................................................................ 13 Convenience of online blogging tools ............................................... 13 Most flexibility: Building your own site ............................................ 13 Compromise: Using an online site builder........................................ 15 Surf and Study: Discovering What Works and What Doesn’t................... 16
Chapter 2: WordPress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 Understanding Blogging ............................................................................... 19 Creating a Blog with WordPress .................................................................. 20 Creating a Post ............................................................................................... 23 Managing Your Blog Posts............................................................................ 28 Designing Your Blog Look ............................................................................ 29 Making Posts Outside of WordPress ........................................................... 32 Posting by e-mail .................................................................................. 32 Creating audio blog entries ................................................................ 34 Working with Comments .............................................................................. 34
xii
Creating Web Pages All-in-One For Dummies, 4th Edition
Chapter 3: Squarespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Signing Up for Squarespace.......................................................................... 38 Creating a Basic Web Site ............................................................................. 39 Getting started with your site ............................................................ 39 Creating a home page .......................................................................... 41 Renaming a page .................................................................................. 43 Modifying a page’s content................................................................. 44 Adding a footer..................................................................................... 46 Changing the Look of Your Site ................................................................... 46 Adding and Removing Sections ................................................................... 48 Removing a section.............................................................................. 48 Inserting a section ............................................................................... 49 Adding an Image to Your Page ..................................................................... 53 Viewing Your Web Site.................................................................................. 55
Chapter 4: Connecting Your Site to the Social Web . . . . . . . . . . . . . . .57 Connecting to Facebook ............................................................................... 57 Adding a Like button ........................................................................... 58 Adding a Like box ................................................................................ 60 Connecting to Twitter ................................................................................... 64 Connecting to Google Friends ...................................................................... 67
Chapter 5: Analyzing Your Web-Site Traffic with Google Analytics. . . 71 Adding Google Analytics Code to Your Web Site ...................................... 71 Working with the Admin Console ................................................................ 76
Book II: Web Design ................................................... 83 Chapter 1: Best Practices in Web Design . . . . . . . . . . . . . . . . . . . . . . . .85 Applying Three Proven Design Principles to Your Site ............................ 85 Simplicity: Less is more ...................................................................... 85 Keeping things clean with white space ............................................. 91 Being consistent across the site ........................................................ 91 Understanding the Rule of Thirds ............................................................... 92 Tweaking your page design with the rule of thirds ......................... 93 Balancing the rule of thirds with the background ........................... 97 Positioning the background image .................................................... 98 Finessing graphics ............................................................................... 98 Avoiding Eight Common Web-Design Problems ........................................ 99 Clutter eats your site alive.................................................................. 99 Overwhelming your visitors at the start........................................... 99 Confusion comes with complexity .................................................... 99 Mixing and matching design ideas never works ............................ 100 Extreme symmetry is a yawner ........................................................ 101 Forgetting about the visitor.............................................................. 102 Negligence is like moldy bread ........................................................ 102 Insecurity makes people nervous .................................................... 102
Table of Contents
xiii
Chapter 2: Organizing and Navigating Your Web Site . . . . . . . . . . . .103 Creating a Site Hierarchy ............................................................................ 103 Navigating Your Site with a Navigation Menu.......................................... 105
Chapter 3: Designing for Mobile Visitors. . . . . . . . . . . . . . . . . . . . . . . .107 Previewing Your Mobile Site ...................................................................... 107 Four Levels of Mobile Web-Enabling ......................................................... 108 Basic compatibility ............................................................................ 108 Mobile-friendly site design ............................................................... 109 Mobile styling ..................................................................................... 110 Creating a companion site ................................................................ 113
Book III: HTML/XHTML ............................................. 115 Chapter 1: Exploring HTML and XHTML Documents . . . . . . . . . . . . . .117 Under the Hood: Understanding HTML .................................................... 117 Opening and closing tags .................................................................. 118 Case doesn’t matter — sort of ......................................................... 119 The devil is in the attributes ............................................................ 119 Blanks are blanked............................................................................. 120 XHTML: An Extreme HTML Makeover ...................................................... 120 Surveying the Document Structure of a Page .......................................... 122 The DOCTYPE element ..................................................................... 122 The html element ............................................................................... 125 The head element .............................................................................. 125 The title element ................................................................................ 125 The meta element .............................................................................. 126 The body element .............................................................................. 127
Chapter 2: Working with Text and Links . . . . . . . . . . . . . . . . . . . . . . . .129 Giving Your Document Structure .............................................................. 129 Making a paragraph ........................................................................... 129 Adding a line break ............................................................................ 130 Making a heading ............................................................................... 131 Adding a horizontal line .................................................................... 132 Grouping inline text ........................................................................... 133 Emphasizing Your Text with Bold and Italics .......................................... 133 Bolding text......................................................................................... 133 Italicizing text ..................................................................................... 133 Fontastic! Specifying the Typeface, Size, and Color ................................ 134 Setting the typeface ........................................................................... 134 Sizing the text ..................................................................................... 135 Giving your text some color ............................................................. 138 Creating Links .............................................................................................. 138 Dissecting a URL ................................................................................ 139 Distinguishing between absolute and relative URLs ..................... 139
xiv
Creating Web Pages All-in-One For Dummies, 4th Edition
Making a link ....................................................................................... 140 Linking to a location inside a page .................................................. 141 Linking to an e-mail address ............................................................. 142 Linking to a picture, PDF document, or file .................................... 142 Opening the link in a new browser window ................................... 143
Chapter 3: Presenting Information with Lists and Tables. . . . . . . . . .145 Creating a Bulleted List............................................................................... 145 Making a normal unordered list ....................................................... 145 Using alternative bullets ................................................................... 146 Using images for bullets .................................................................... 147 Creating a Numbered List ........................................................................... 148 Working with Nested Lists ......................................................................... 149 Working with Tables ................................................................................... 149 Adding a border to the table ............................................................ 152 Sizing your table................................................................................. 153 Sizing the columns of a table ............................................................ 155 Spacing your table ............................................................................. 156
Chapter 4: Adding Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157 Adding an Image .......................................................................................... 157 Positioning an Image on the Page.............................................................. 159 Adding Padding Around Your Image......................................................... 161 Specifying the Dimensions of the Image ................................................... 163 Linking Your Image...................................................................................... 163
Chapter 5: Divvying Up the Page with divs . . . . . . . . . . . . . . . . . . . . . .167 Introducing the div Element....................................................................... 168 Positioning and Sizing a div Element on a Page ...................................... 170 Floating a div element on the page left or right ............................. 170 Centering a div element on the page ............................................... 174 Positioning the div element in an absolute position ..................... 174 Formatting a div Element ........................................................................... 175 Adding a border ................................................................................. 175 Adding a background ........................................................................ 176 Creating a scrollable div ................................................................... 177 Structuring a Basic Two-Column Page Layout ......................................... 178
Chapter 6: Creating Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 How Forms Work ......................................................................................... 183 Creating a Form ........................................................................................... 184 Adding Form Elements ................................................................................ 185 Powering your form with buttons.................................................... 186 Working with form labels .................................................................. 187 Adding a text box ............................................................................... 188 Adding a check box ........................................................................... 189 Adding a set of radio buttons ........................................................... 189
Table of Contents
xv
Adding a multi-line text box ............................................................. 190 Adding a drop-down list or multi-select list ................................... 191 Adding a hidden field ........................................................................ 192
Chapter 7: HTML5 Video and Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 Gauging Browser Support .......................................................................... 195 Using the