ptg7913109
ptg7913109
800 East 96th Street, Indianapolis, Indiana, 46240 USA
Morten Rand-Hendriksen
Sams Teach Yourself
24
in
Hours
Microsoft
®
Expression
™
Web 4
Second Edition
Updated for Service Pack 2—
HTML5, CSS3, jQuery
ptg7913109
Sams Teach Yourself Microsoft® Expression™ Web 4 in 24 Hours,
Second Edition
Copyright © 2012 by Pearson Education, Inc.
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or
transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without
written permission from the publisher. No patent liability is assumed with respect to the use of
the information contained herein. Although every precaution has been taken in the preparation of
this book, the publisher and author assume no responsibility for errors or omissions. Nor is any
liability assumed for damages resulting from the use of the information contained herein.
ISBN-13: 978-0-672-33590-7
ISBN-10: 0-672-33590-5
Library of Congress Cataloging-in-Publication Data
Rand-Hendriksen, Morten.
Sams teach yourself Microsoft Expression web 4 in 24 hours / Morten Rand-Hendriksen.
p. cm.
“Updated for Service Pack 2, HTML5, CSS3, jQuery.”
ISBN 978-0-672-33590-7
1. Microsoft Expression Web. 2. Web site development. 3. Web sites—Design—Computer pro-
grams. 4. Web sites—Authoring programs. I. Title.
TK5105.8885.M525R36 2012
006.7’8—dc23
2012003376
Printed in the United States of America
First Printing April 2012
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been
appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use
of a term in this book should not be regarded as affecting the validity of any trademark or service
mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no
warranty or fitness is implied. The information provided is on an “as is” basis. The author and the
publisher shall have neither liability nor responsibility to any person or entity with respect to any
loss or damages arising from the information contained in this book or from the use of programs
accompanying it.
Bulk Sales
Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk pur-
chases or special sales. For more information, please contact
U.S. Corporate and Government Sales
1-800-382-3419
corpsales@pearsontechgroup.com
For sales outside of the U.S., please contact
International Sales
international@pearsoned.com
Editor-in-Chief
Greg Wiegand
Executive Editor
Loretta Yates
Development
Editor
Todd Brakke
Managing Editor
Kristy Hart
Project Editor
Betsy Harris
Copy Editor
Bart Reed
Indexer
Lisa Stumpf
Proofreader
Kathy Ruiz
Technical Editor
Kathleen Anderson
Publishing
Coordinator
Cindy Teeters
Book Designer
Gary Adair
Senior Compositor
Gloria Schurick
ptg7913109
Contents at a Glance
Introduction.............................................................................xiii
HOUR 1 Getting to Know Microsoft Expression Web 4 Service Pack 2................1
2 Beginning at the End: A Walkthrough of the Finished Project ............23
3 A Website Is Really Just Text: Build One in 5 Minutes.......................39
4 Building a Home Page: A Look Behind the Curtain..........................53
5 Getting Connected with (Hyper)Links: The Cornerstone of the
World Wide Web ........................................................................65
6 Getting Visual, Part 1: Adding Images and Graphics........................81
7 Getting Visual, Part 2: Advanced Image Editing, Thumbnails,
and Hotspots .............................................................................95
8 Cracking the Code: Working in Code View....................................109
9 Getting Boxed In, Part 1: Using Tables for Tabular Content .............127
10 Bringing Style to Substance with Cascading Style Sheets .................143
11 Getting Boxed In, Part 2: Knee Deep in CSS ..................................163
12 Styling with Code: Fully Immersed in CSS.....................................183
13 Getting Visual, Part 3: Images as Design Elements with CSS ............203
14 Harnessing the Power of CSS Layouts...........................................221
15 Buttons, Buttons, Buttons...........................................................243
16 Using Code Snippets .................................................................257
17 Building a Functional Menu.......................................................275
18 Dynamic Web Templates ...........................................................297
19 Getting Interactive with Forms....................................................317
20 Working with Flash and Other Embeddable Content ......................337
21 Beyond the Basics, Part 1: PHP in Expression Web 4 .......................353
22 Test Twice, Publish Once: Professional Cross-Browser
Testing with SuperPreview ..........................................................373
23 Beyond the Basics, Part 2: Get Noticed with the New
Search Engine Optimization (SEO) Checker...................................401
24 Publishing Your Website ............................................................411
Index .....................................................................................431
ptg7913109
Table of Contents
Introduction xiii
HOUR 1: Getting to Know Microsoft Expression Web 4 Service Pack 2 1
Introducing Expression Web 4 ................................................................1
Getting and Installing Expression Web 4 ..................................................3
Getting and Installing Service Pack 2........................................................4
Getting Acquainted with the Workspace....................................................5
Changing and Customizing the Workspace..............................................13
HOUR 2: Beginning at the End: A Walkthrough of the Finished Project 23
Working with a Completed Website ........................................................24
Previewing the Site in Your Browser ........................................................27
Exploring the Website in Expression Web 4 ..............................................32
Keeping Your Pages Functional ..............................................................34
HOUR 3: A Website Is Really Just Text: Build One in 5 Minutes 39
Creating a New Website ........................................................................39
Creating Your First Web Page ................................................................42
Testing Your Web Page in Multiple Browsers ............................................47
SuperPreview: A Sneak Preview ..............................................................49
HOUR 4: Building a Home Page: A Look Behind the Curtain 53
Opening and Editing an Existing File Using Code View ..............................53
Importing Styled Text from a Document ..................................................57
Advanced Tag Editing ..........................................................................59
HOUR 5: Getting Connected with (Hyper)Links: The Cornerstone of the
World Wide Web 65
Import a New Page and Create an Internal Hyperlink ..............................66
Creating External Links and New Windows..............................................72
Creating Internal Links Within Documents Using Bookmarks ....................74
Creating an Email Hyperlink ................................................................76