HTML and CSS
Visual Quickstart Guide
9th Edition
Joe Casabona
Visual QuickStart Guide
HTML and CSS, 9th Edition
Joe Casabona
Peachpit Press
www.peachpit.com
Copyright 2021 by Pearson Education, Inc. or its affiliates. All Rights Reserved.
San Francisco, CA
Peachpit Press is an imprint of Pearson Education, Inc.
To report errors, please send a note to
Notice of Rights
This publication is protected by copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise. For information regarding permissions, request forms and the appropriate contacts within the Pearson Education Global Rights & Permissions department, please visit www.pearson.com/permissions.
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 author 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
Visual QuickStart Guide is a registered trademark of Peachpit Press, a division of Pearson Education.
Unless otherwise indicated herein, any third party trademarks that may appear in this work are the property of their respective owners and any references to third party trademarks, logos or other trade dress are for demonstrative or descriptive purposes only. Such references are not intended to imply any sponsorship, endorsement, authorization, or promotion of Pearson Education, Inc. products by the owners of such marks, or any relationship between the owner and Pearson Education, Inc., or its affiliates, authors, licensees or distributors.
Executive Editor: Laura Norman
Development Editor: Victor Gavenda
Senior Production Editor: Tracey Croom
Copy Editor: Scout Festa
Proofreader: Becky Winter
Compositor: Danielle Foster
Indexer: Valerie Haynes-Perry
Cover Design: RHDG / Riezebos Holzbaur Design Group, Peachpit Press
Interior Design: Peachpit Press with Danielle Foster
Logo Design: MINE www.minesf.com
ISBN-13: 978-0-13-670256-6
ISBN-10: 0-13-670256-2
ScoutAutomatedPrintCode
Dedication
To my wife, Erin. Your love and support has allowed me not only to write this book, but to have the life Ive always wanted.
To my daughter, Teresa. You make me smile and laugh every day. And to my son, Louis. Welcome to the world, buddy.
I love you all.
Acknowledgments
Writing a book, especially a good one, takes time and a group of solid people. And this one wouldnt have happened without the great team I got to be a part of. I want to extend a special thank you to:
Laura Norman, who helped me get back in the book writing game with this title, for her support and guidance along the way.
Victor Gavenda, for his development editing and deep knowledge of the VQS format, and for making it seem like I have good control over the English language.
Faraz Kelhini, the tech editor. His feedback and suggestions made for a much better read.
Scout Festa, for excellent copyediting.
Tracey Croom and the entire Pearson design team, for making this book look fantastic.
Shawn Hesketh, a friend and mentor who taught me all the good things I know about screencasts.
Brian Richards, for helping me work though some of the more advanced topics in this book.
My friends and family, for the support and encouragement throughout the writing process.
Everyone who has contributed by letting me use a screenshot, image, or resource that they created.
To TT at my local Starbucks. He always saw me coming and had my order ready.
To you, the readers. Thank you for allowing me to contribute to your learning journey.
Finally, to Elizabeth Castro for creating this title, and to Bruce Hyslop for passing me the torch.
Introduction
In This Introduction
When I started making websites, back in 2000, it was a much simpler time. I was able to build a full website with just HTML and CSS and a few images. There were also fewer browsers and devices. But as the web evolved and computers got smarter and more powerful, the needs of both web users and web developers changed. This made some things easier. It also made learning more complicated.
Today, a website that doesnt use any JavaScript is a rare sight (and site!). There are so many build tools, libraries, and development philosophies that learning how to make a website can seem overwhelming.
But theres good news: at the heart of it all are still just plain and simple HTML and CSS.
What You Will Learn
The building blocks of the web are plain HTML and CSSand you can make a website knowing just those two technologies. Thats what you learn in this book. Specifically, youll get the ins and outs of what it takes to write good, meaningful, and well-structured HTML. Youll learn how to write proper, maintainable CSS to make your HTML look nice. And youll learn how to get it all online.
Websites are meant to be universal files that can be accessed and displayed everywhere by everyone. Accessibility in multiple senses of the wordis the name of the game, and learning to design and build websites that can be reached by all users, regardless of their personal abilities, using any device they choose.
To make a webpage, you need only what you already have on your computer: a text editor, a place to save files, and a browser. This book teaches you how to put all those pieces together.
Current technologies
On top of learning how to write HTML and CSS (and get it online), youll get a crash course in what its like to build a professional website today. Youll learn about important aspects of web design, such as performance (making sure your website loads quickly and doesnt burden the user). Youll learn about how to make your website accessible so that anyone can use it, including those who are color blind or rely on a screen reader.
This book also explores modern tools like CSS preprocessors, JavaScript libraries, and version control. Its good to know these things as you move forward because they will probably be the next step on your learning journey. This brings us to the next question: who is this book for?
Who Is This Book For?
In short, this book is written for anyone who wants to learn HTML and CSS. It assumes no prior knowledge.
That means that if you want to make a website for your hobby, this book is for you. If youre taking a beginner course (or teaching a beginner course), its for you too. Or if you want to become a professional web developer, hey, its for you too. After all, books like this are how I got my start. Youll get all the tools you need to get a website online. And then Ill give you some options for what you can learn next.