Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Want to turn C’s
into A’s? Obviously, right?
But the right way to go about it isn’t always so obvious. Go digital to
get the grades. MindTap’s customizable study tools and eTextbook
give you everything you need all in one place.
Engage with your course content, enjoy the flexibility of
studying anytime and anywhere, stay connected to assignment due
dates and instructor notifications with the MindTap Mobile app...
and most of all…EARN BETTER GRADES.
TO GET STARTED VISIT
WWW.CENGAGE.COM/STUDENTS/MINDTAP
New PersPectives oN
HTML5 and CSS3
7th Edition
Comprehensive
Patrick Carey
A u s t r a l i a • B r a z i l • M e x i c o • S i n g a p o r e • U n i t e d K i n g d o m • U n i t e d S t a t e s
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
New Perspectives on HTML5 and CSS3, 7th Edition,
Comprehensive
Patrick Carey
Senior Product Director: Kathleen McMahon
Associate Product Manager: Kate Mason
Associate Content Development Manager: Alyssa
Pratt
© 2017 Cengage Learning
ALL RIGHTS RESERVED. No part of this work covered by the copyright
herein may be reproduced, transmitted, stored or used in any form or by
any means graphic, electronic, or mechanical, including but not limited to
photocopying, recording, scanning, digitizing, taping, Web distribution,
information networks, or information storage and retrieval systems, except
as permitted under Section 107 or 108 of the 1976 United States Copyright
Act, without the prior written permission of the publisher.
Development Editor: Pam Conrad
Product Assistant: Abby Pufpaff
Senior Content Project Manager:
Jennifer K. Feltri-George
Art Director: Diana Graham
Manufacturing Planner: Fola Orekoya
Cover image(s): Shutterstock/AGCuesta
Compositor: GEX Publishing Services
Notice to the Reader
Publisher does not warrant or guarantee any of the
products described herein or perform any
independent analysis in connection with any of the
product information contained herein. Publisher does
not assume, and expressly disclaims, any obligation
to obtain and include information other than that
provided to it by the manufacturer. The reader is
expressly warned to consider and adopt all safety
precautions that might be indicated by the activities
described herein and to avoid all potential hazards.
By following the instructions contained herein, the
reader willingly assumes all risks in connection with
such instructions. The publisher makes no
representations or warranties of any kind, including
but not limited to, the warranties of fitness for
particular purpose or merchantability, nor are any
such representations implied with respect to the
material set forth herein, and the publisher takes no
responsibility with respect to such material. The
publisher shall not be liable for any special,
consequential, or exemplary damages resulting, in
whole or part, from the readers’ use of, or reliance
upon, this material.
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support, 1-800-354-9706
For permission to use material from this text or product, submit all
requests online at www.cengage.com/permissions
Further permissions questions can be emailed to
permissionrequest@cengage.com
Library of Congress Control Number: 2016954611
ISBN: 978-1-305-50393-9
Cengage Learning
20 Channel Center Street
Boston, MA 02210
USA
Cengage Learning is a leading provider of customized learning solutions
with office locations around the globe, including Singapore, the United
Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at:
www.cengage.com/global
Cengage Learning products are represented in Canada by
Nelson Education, Ltd.
For your course and learning solutions, visit www.cengage.com
Purchase any of our products at your local college store or at our
preferred online store www.cengagebrain.com
Some of the product names and company names used in this book have
been used for identification purposes only and may be trademarks or regis-
tered trademarks of their respective manufacturers and sellers.
Disclaimer: Any fictional data related to persons or companies or URLs used
throughout this book is intended for instructional purposes only. At the
time this book was printed, any such data was fictional and not belonging
to any real persons or companies.
Microsoft and the Windows logo are registered trademarks of Microsoft
Corporation in the United States and/or other countries. Cengage Learning
is an independent entity from Microsoft Corporation, and not affiliated with
Microsoft in any manner.
Printed in the United States of America
Print Number: 01
Print Year: 2016
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
“I love this text because
it provides detailed
instructions and real-
world application
examples. It is ideal for
classroom and online
instruction. At the end
of the term my students
comment on how much
they’ve learned and
put to use outside the
classroom.”
—Bernice Howard
St. Johns River Community
College
Preface
The New Perspectives Series’ critical-thinking, problem-solving approach is the ideal way
to prepare students to transcend point-and-click skills and take advantage of all that
HTML5 and CSS3 has to offer.
In developing the New Perspectives Series, our goal was to create books that give students
the software concepts and practical skills they need to succeed beyond the classroom. We’ve
updated our proven case-based pedagogy with more practical content to make learning
skills more meaningful to students. With the New Perspectives Series, students understand
why they are learning what they are learning, and are fully prepared to apply their skills to
real-life situations.
About This Book
This book provides thorough coverage of HTML5 and CSS3, and includes the following:
• Up-to-date coverage of using HTML5 to create structured websites
• Instruction on the most current CSS3 styles to create visually-interesting pages and
captivating graphical designs
• Working with browser developer tools to aid in the creation and maintenance of
fully-functioning websites
New for this edition!
• Coverage of responsive design techniques to create website designs that can scale to
mobile, tablet, and desktop devices.
• Hands-on study of new HTML elements and CSS styles including layouts using
flexboxes and grid frameworks.
• Exploration of CSS3 styles for graphic design, including image borders, drop shadows,
gradient fills, 2D and 3D transformations, and graphic filters.
• Exploration of responsive design for web tables.
• Coverage of CSS styles for animation and transitions.
• Coverage of JavaScript arrays, program loops, and conditional statements.
System Requirements
This book assumes that students have an Internet connection, a text editor, and a current
browser that supports HTML5 and CSS3. The following is a list of the most recent versions of
the major browsers at the time this text was published: Internet Explorer 11, Microsoft
Edge 15, Firefox 48.02, Safari 10, Opera 39.0, and Google Chrome 53. More recent versions
may have come out since the publication of this book. Students should go to the Web browser
home page to download the most current version. All browsers interpret HTML5 and CSS3 code
in slightly different ways. It is highly recommended that students have several different browsers
installed on their systems for comparison and, if possible, access to a mobile browser or a
mobile emulator. Students might also want to run older versions of these browsers to highlight
compatibility issues. The screenshots in this book were produced using Google Chrome 53
running on Windows 10 (64-bit), unless otherwise noted. If students are using different devices,
browsers, or operating systems, their screens might vary from those shown in the book; this
should not present any problems in completing the tutorials.
iii
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
iv
New Perspectives Series
“New Perspectives texts
provide up-to-date,
real-world application
of content, making book
selection easy. The
step-by-step, hands-on
approach teaches
students concepts they
can apply immediately.”
—John Taylor
Southeastern Technical
College
visual overview
Prosk ills
keY steP
iNsight
review
aPPlY
challeNge
create
refereNce
glossarY/iNdex
The New Perspectives Approach
Context
Each tutorial begins with a problem presented in a “real-world” case that is meaningful to
students. The case sets the scene to help students understand what they will do in the tutorial.
hands-on Approach
Each tutorial is divided into manageable sessions that combine reading and hands-on, step-by-step
work. Colorful screenshots help guide students through the steps. trouble? tips, which anticipate
common mistakes or problems, help students stay on track and continue with the tutorial.
visual overviews
Each session begins with a Visual Overview, a two-page spread that includes colorful, enlarged
figures with numerous callouts and key term definitions, giving students a comprehensive
preview of the topics covered in the session, as well as a handy study guide.
proskills Boxes
ProSkills boxes provide guidance for applying concepts to real-world, professional situations,
involving one or more of the following soft skills: decision making, problem solving, teamwork,
verbal communication, and written communication.
Key steps
Important steps are highlighted in yellow with attached margin notes to help students pay close
attention to completing the steps correctly and avoid time-consuming rework.
insight Boxes
InSight boxes offer expert advice and best practices to help students achieve a deeper under-
standing of the concepts behind the software features and skills.
margin Tips
Margin Tips provide helpful hints and shortcuts for more efficient use of the software. The Tips
appear in the margin at key points throughout each tutorial, giving students extra information
when and where they need it.
Assessment
Retention is a key component to learning. At the end of each session, a series of Quick Check
questions helps students test their understanding of the material before moving on. Engaging
end-of-tutorial Review Assignments and Case Problems have always been a hallmark feature of
the New Perspectives Series. Colorful bars and brief descriptions accompany the exercises,
making it easy to understand both the goal and level of challenge a particular assignment holds.
reference
Within each tutorial, Reference boxes appear before a set of steps to provide a succinct
summary or preview of how to perform a task. In addition, each book includes a combination
Glossary/Index to promote easy reference of material.
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Level Color Scheme
HTML5 and CSS3, 7th Edition, Comprehensive
v
Our Complete System of Instruction
Coverage To meet Your needs
Whether you’re looking for just a small amount of coverage or enough to fill a semester-long
class, we can provide you with a textbook that meets your needs.
• Introductory books contain an average of 5 to 8 tutorials and include essential skills
on the books concepts.
• Comprehensive books, which cover additional concepts and skills in depth, are great
for a full-semester class, and contain 9 to 12+ tutorials.
So, if you are looking for just the essential skills or more complete in-depth coverage of a
topic, we have an offering available to meet your needs. Go to our Web site or contact your
Cengage Learning sales representative to find out what else we offer.
mindTap
MindTap is a personalized learning experience with relevant assignments that guide students to
analyze, apply, and improve thinking, allowing you to measure skills and outcomes with ease.
For instructors: personalized teaching becomes yours with a Learning Path that is built with
key student objectives. Control what students see and when they see it. Use as-is, or match
to your syllabus exactly: hide, rearrange, add, or create your own content.
For students: a unique Learning Path of relevant readings, multimedia, and activities that
guide you through basic knowledge and comprehension to analysis and application.
Better outcomes: empower instructors and motivate students with analytics and reports that
provide a snapshot of class progress, time in course, engagement, and completion rates.
The MindTap for HTML5 and CSS3 includes coding labs, study tools, and interactive
quizzing, all integrated into an eReader that includes the full content of the printed text.
instructor resources
We offer more than just a book. We have all the tools you need to enhance your lectures, check
students’ work, and generate exams in a new, easier-to-use and completely revised package. This
book’s Instructor’s Manual, Cognero testbank, PowerPoint presentations, data files, solution files,
figure files, and a sample syllabus are all available at sso.cengage.com.
Acknowledgments
I would like to thank the people who worked so hard to make this book possible. Special
thanks to my developmental editor, Pam Conrad, for her hard work, attention to detail, and
valuable insights, and to Associate Content Developer Manager, Alyssa Pratt, who has worked
tirelessly in overseeing this project and made my task so much easier with enthusiasm and
good humor. Other people at Cengage who deserve credit are Kathleen McMahon,
Sr. Product Manager; Kate Mason, Associate Project Manager; Abby Pufpaff, Product
Assistant; Jen Feltri-George, Senior Content Project Manager; Diana Graham, Art Director;
Fola Orekoya, Manufacturing Planner; GEX Publishing Services, Compositor, as well as
Chris Scriver - Sr. MQA Project Leader, and the MQA testers John Freitas and Danielle Shaw.
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
vi
New Perspectives Series
Feedback is an important part of writing any book, and thanks go to the following reviewers
for their helpful ideas and comments: Alison Consol, Wake Technical Community College;
Dana Hooper, The University of Alabama; Kenneth Kleiner, Fayetteville Technical Community
College; and Laurie Crawford, Franklin University.
I want to thank my wife Joan and my six children for their love, encouragement, and patience
in putting up with a sometimes distracted husband and father. This book is dedicated to my
grandchildren: Benedict, David, and Elanor.
– Patrick Carey
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203