Foundation Website Creation with CSS, XHTML, and Javascript
Total Page:16
File Type:pdf, Size:1020Kb
Foundation Website Creation with CSS, XHTML, and JavaScript Jonathan Lane Meitar Moscovitz Joseph R. Lewis Foundation Website Creation with CSS, XHTML, and JavaScript Copyright © 2008 by Jonathan Lane, Meitar Moscovitz, Joseph R. Lewis All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-0991-1 ISBN-13 (electronic): 978-1-4302-0992-8 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit www.springeronline.com. For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at http://www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress 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 information contained in this work. The source code for this book is freely available to readers at www.friendsofed.com in the Downloads section. Credits Contributor Associate Production Director Steve Smith Kari Brooks-Copony Lead Editor Production Editor Clay Andres Elizabeth Berry Technical Reviewers Compositor Meitar Moscovitz, Joseph R. Lewis Dina Quan Editorial Board Proofreader Clay Andres, Steve Anglin, Dan Shaw Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Indexer Matthew Moodie, Joseph Ottinger, Beth Palmer Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Cover Image Designer Matt Wade, Tom Welsh Corné van Dooren Project Manager Interior and Cover Designer Kylie Johnston Kurt Krames Copy Editor Manufacturing Director Kim Wimpsett Tom Debolski This book is dedicated to the people who currently— and want to—work to make the Web a better, more standards-compliant, and more accessible place. It isn’t always easy, but your work really matters. —Jonathan Lane For Aba, whom most of my work on this book is really for. Hopefully you’ll now feel comfortable using your editor’s Source view. —Meitar Moscovitz To my beautiful wife, whom I love beyond measure. —Joseph R. Lewis CONTENTS AT A GLANCE About the Authors . xv About the Cover Image Designer . xvii Acknowledgments . xix Introduction . xxi Chapter 1 Introducing the Past, Present, and Future of the Web . 1 Chapter 2 Keeping a Project on Track . 13 Chapter 3 Planning and High-Level Design . 35 Chapter 4 Writing Markup with HTML and XHTML . 53 Chapter 5 Exploring Fundamental Concepts of CSS . 101 Chapter 6 Developing CSS in Practice: From Design to Deployment . 143 Chapter 7 Creating Interactivity with JavaScript . 213 Chapter 8 Testing, Launching, and Maintaining . 237 Chapter 9 Web 2.0: Using Ajax and Social Software . 267 Chapter 10 Using Server-Side Technologies . 291 Afterword The Business of the Web . 309 Index . 325 v CONTENTS About the Authors . xv About the Cover Image Designer . xvii Acknowledgments . xix Introduction . xxi Chapter 1 Introducing the Past, Present, and Future of the Web . 1 The standard way of doing things. 2 Every journey starts with a single step: the Web past. 2 Then there were standards: the Web now . 4 A crystal ball: the Web future . 8 Building on standards for the modern Web . 9 What’s inside this book? . 10 Chapter 2 Keeping a Project on Track . 13 Stay away from waterfalls: the traditional approach. 14 The nine knowledge areas. 15 Web project management: the power of iteration. 16 An agile example of planning . 17 Achieving the goal: identifying doneness. 18 Focus on time . 18 Focus on budget . 19 Focus on scope. 21 “But the PMI covers nine areas; you’ve talked about only three!”. 22 Communication is paramount. 22 Quality and testing. 22 Procurement and contracting. 23 Tools available. 23 The alternatives. 24 Basecamp . 25 Trac . 25 Others . 26 Summary: the best advice . 27 Being agile and standard: there’s a good combination . 27 Profiling Professions: Jason Fried . 28 vii CONTENTS Chapter 3 Planning and High-Level Design . 35 The toolbox . 36 Goals and objectives discussion. 36 Brainstorming . 37 User stories and user personas . 39 Feature/unfeature list . 41 Wireframes . 42 Mock-ups . 43 Information architecture. 43 Prototype . 44 Let’s go to an example . 45 Summary: achieving balance. 47 Profiling Professions: Daniel Burka . 48 Chapter 4 Writing Markup with HTML and XHTML . 53 What are web pages, really? . 53 The basics of markup. 54 Where computer markup languages came from. 54 Elements (and tags). 55 Attributes and their values. 58 Empty elements. 59 Document types . 59 Starting with XHTML . 60 Document shell. 60 The head. 61 The body . 62 Marking up content. 62 Headlines . 63 Blocks of text . 63 Grouping content. 66 Identifying content . 66 Links . 68 The href attribute, URLs, and web page addresses . ..