Customer Service 1-800-221-5528

Murach’s HTML and CSS (5th Edition)

by Zak Ruvalcaba and Anne Boehm
18 chapters, 580 pages, 244 illustrations
Published December 2021
ISBN 978-1-943872-86-2
List price: $59.50

This 5th edition of our best-selling HTML and CSS book integrates the essential job skills with our proven instructional methods. And now, since HTML and CSS have finally stabilized, we were able to simplify, improve, and enhance the previous edition so your students can learn faster and better than ever. In fact, this edition is 100 pages shorter than the previous edition, even though we haven’t dropped any of the critical skills. Besides that, this new edition is in full color, which makes the book even easier to read and understand.

To supplement this book, we offer a Lab Manual that provides all of the student activities you’ll assign during the course. The Lab Manual is available in a print edition (January), in an electronic edition, and in an eManual+eText bundle.

Canvas course file available now!

The Canvas course file contains all the objectives, quizzes, exercises, case studies, and PowerPoint slides that you need to run an effective course. It only takes a few clicks to import it into the Canvas LMS. Then, you can customize it for your course. Learn more.

I really like your HTML book. I now use it for two of my classes. I think the way the book is laid out is beneficial to the student, with information on the left side and content examples on the right.”

Gigi Simonsen,
Information Technology Instructor, Nebraska

  • About this Book
  • Table of Contents
  • Courseware
  • FAQs
  • Corrections

What this book does

To present the essential HTML and CSS skills in a manageable progression and at the right pace, this book is divided into 4 sections.

Section 1: The essential concepts and skills

In the 8 chapters of this section, your students will learn how to use HTML to mark up the content of web pages and CSS to present that content. In fact, by the end of section 1, your students will be able to develop web pages the way today’s best professionals do.

That means they’ll be using HTML semantic elements to mark up the structure of a page. They’ll be using float and the CSS box model right from the beginning. And they’ll be using a professional subset of HTML and CSS that consists of the most-used HTML elements, CSS selectors, and CSS properties.

The last chapter in this section shows your students how to use Responsive Web Design so their pages will work on all screens, from mobile devices to desktop computers. This, of course, is essential today.

From this point on, the sections and chapters are written as independent modules, so you can assign them in whatever sequence you prefer.

Section 2: Page layout and Responsive Web Design

The two chapters in this section show how to use Flexible Box and Grid Layout. These CSS modules let you build responsive page layouts without using floating. And knowing how to use both of them is part of any web development job today.

Section 3: More HTML and CSS skills as you need them

Section 3 expands on section 1 by presenting additional HTML and CSS skills that professional developers use all the time. That includes:

  • More on how to work with images, which were introduced in section 1, including icons, rollovers, and image maps
  • When and how to use tables, including how to make tables responsive
  • How to work with forms and the HTML validation features
  • How to add audio and video to web pages by using HTML to work with the players that are built into all modern browsers
  • How to use embedded fonts so all browsers will have access to them
  • How to use the CSS features for special effects like transitions, animations, transforms, and filters

Section 4: Web design, deployment, and JavaScript

Section 4 consists of three chapters that help you expand your students’ knowledge beyond HTML and CSS:

  • Chapter 16 covers users, usability, and today’s best practices for designing a website that’s user-centric.
  • Chapter 17 shows not only how to deploy a site on a web server, but also how to get the site indexed on the major search engines.
  • Chapter 18 shows how to add JavaScript and jQuery features to web pages...without knowing how to code JavaScript and jQuery. That will answer some of the questions your students are likely to have about the common features that they see on websites, like image swaps and slide shows.

Because of the modular structure of this book, you can assign these chapters any time after section 1.

What's new in this book

Most important is a focus on what a web developer needs to know today. As a result, we’ve cut obsolete material, rearranged some topics, and streamlined the book so it’s more manageable for students.

We’ve also printed the book in full color. This is something that instructors have been requesting for the last 10 years, and we agree, it makes many of the skills far easier to grasp right away. We think you’ll find it’s a big help to your students.

Although your students can use any IDE or text editor with our book, the book now shows how to use Visual Studio Code (VS Code). That’s the text editor that has become so popular for all types of program development. And chapter 2 provides a tutorial that shows your students how to use it for HTML and CSS.

Beyond that, every chapter in the book has been improved, enhanced, and upgraded. In short, you’ll find that this book works even better than the previous edition.

Content features that benefit your students...and you

Like all of our books, this one has our standard content features, like paired pages, logical organization, real-world examples, modular design, exercises that solidify your students’ skills, and much more. Here, though, are the content features that are specific to this book, to help you teach HTML more effectively.

HTML and CSS are always related

In a modern website, HTML is used to define the structure and content for the site, and CSS is used to format the content. In other words, they always work together, and that’s the way our book teaches them...from the first chapter to the last.

In contrast, some books start by first presenting a complete subset of HTML and then presenting a subset of CSS. But that means that the students don’t see the relationships between HTML and CSS until later in the book. Worse, some books have a section on HTML and a separate section on CSS. That may work okay for reference, but it doesn’t work didactically.

HTML and CSS are presented before web design

Many HTML and CSS books present web design before the students understand how a website is implemented with HTML and CSS. We think that’s a mistake.

As a result, our book first shows how to build pages with HTML and CSS. Then, after the students understand how websites are implemented, they are ready to learn the principles of web design, which can be taught any time after section 1.

Responsive Web Design (RWD) is emphasized

Chapter 8 in this book shows how to build responsive web pages with fluid layout, scalable images, and media queries. It also shows how to use a jQuery plugin called SlickNav to convert the menus for a page to a form that works on mobile devices. Then, chapters 9 and 10 present the two CSS modules for page layout and RWD. As a result, your students learn all the skills that they need for building responsive websites at a professional level.

Accessibility and SEO guidelines are integrated

User accessibility and search engine optimization are presented in chapter 1. After that, guidelines for accessibility and SEO are presented whenever they are relevant. For instance, when the <a> element is presented, the related accessibility and SEO guidelines are presented too.

The continuing application is real-world

Like other books, our book has dozens of examples that show how HTML and CSS are used in a variety of contexts. Beyond that, though, our book presents a real-world application that is progressively enhanced from one chapter to the next. In fact, this application is a simplified version of a site that we developed for a local nonprofit that brings six speakers each year to its Town Hall meetings.

What courses this book can be used for

This book is currently used by colleges and universities around the world for a variety of course titles. In general, though, these course titles fall into two categories:

A complete HTML course

If you teach an HTML and CSS course, regardless of whether it’s a one- or two-term course, this book is for you.

It presents all of the HTML and CSS skills at a professional level. It emphasizes Responsive Web Design. It shows how to design and deploy websites and presents some perspective on JavaScript and jQuery. After the first section, it lets you put together any chapters you want in any sequence you want, to fit the course structure.

And even if you aren’t able to cover all of the content, your students will have the book to answer questions and learn new features on their own (yes, many students actually keep our books!).

Web design with HTML and CSS

Because of its modular design, this book also works for an introductory course that puts more emphasis on web design and less on HTML and CSS. In that case, you can teach section 1, select the remaining chapters that you want to include, and skip the other chapters. Then, your students can use the rest of the book in an advanced course or as a reference for their own work.

What software your students need

A text editor

Although your students can use a text editor as simple as Notepad to code HTML and CSS, we think that a text editor that includes syntax coloring, auto-completion, and error-marking will help your students build web pages more quickly and with fewer errors. That in turn means that they will learn faster.

That’s why our book recommends Visual Studio Code as the text editor. This editor was developed by Microsoft; it’s available for free; it can be used for entering HTML and CSS (and JavaScript, too, as well as languages like Python); and it runs on Windows, macOS, and Linux systems.

To make it easy for your students to get going with this editor, the appendix in our book shows how to download and install the software, and chapter 2 gives a tutorial on using it.

Of course, your students can use whichever editor or IDE you want with this book. If you don’t have a favorite, though, VS Code has some excellent features.

The Chrome browser

To run and test web applications, your students should use at least two browsers. Since Edge is always available with Windows and Safari with macOS, your students already have one browser.

Then, for the second browser, your students should install Chrome because it’s the most popular browser and because this book shows how to use its developer tools. That’s why the appendix in this book shows how to download and install Chrome.

Related books for JavaScript courses

If you teach a JavaScript course after your HTML and CSS course, we have two JavaScript books for you to consider. Both are ideal for students without previous programming experience who need detailed explanations, but they also work well for students who already know another language and are ready to move more quickly. Either way, when your students are done with your course, they’ll have the JavaScript skills that are in such demand today.

Murach’s Modern JavaScript

This book helps your students learn JavaScript more easily than ever by presenting the best practices of modern JavaScript. If you don’t need to teach jQuery, we recommend using this book.

Murach’s JavaScript and jQuery (4th Edition)

This book integrates the teaching of JavaScript and jQuery, an influential JavaScript library that has been around since 2006 and is still used extensively in millions of websites. If your course includes coverage of jQuery, this book is an excellent choice.

What instructors and students say about this book

“The HTML/CSS book was an instant hit. I asked a student to evaluate it for me, and now I cannot get it back!”
- James Gonzalez, Multimedia Studies Instructor, College of Marin

“Needed to learn how to make web pages. Took a class and this was the required textbook. Finished with the class, but I still use this book as reference material. There is so much here and it has helped me a great deal.”
- Posted at an online bookseller

“My students have really enjoyed the HTML book. Murach books are uniquely geared towards two-year colleges; we need books that cut to the chase and hit the ground running. Thanks for providing affordable and quality books.”
- René Bylander, Instructor, IT Web & Software Developer Program, Wisconsin

Great Book, Relevant & Educational! A+: Used this book for my first semester in Web Design, and it was my go-to for any question I had in my class. This is a great supplement to any other course material, with hands-on labs and solutions to modern coding situations. Would Highly Recommend!”
- Posted at an online bookseller

Murach's HTML and CSS is the only worthwhile book I have seen in this category.”
- Andrew McConnell, Emeritus Professor

“Rented for an Introductory web design class for a minor, planning on purchasing to keep for reference.”
- Posted at an online bookseller

“I think others should know the value of your HTML book. It has made a great impact on my teaching and my students’ learning.”
- Posted at an online bookseller

Murach's HTML and CSS is still getting rave reviews from my students.”
- Al Cutting, Professor, Rhode Island

View the table of contents for this book in a PDF: Table of Contents (PDF)

Click on any chapter title to display or hide its content.

Section 1 The essential concepts and skills

Chapter 1 Introduction to web development

How web applications work

The components of a web application

How static web pages are processed

How dynamic web pages are processed

How JavaScript fits into web development

An introduction to HTML and CSS

The HTML for a web page

The CSS for a web page

A short history of the HTML and CSS standards

Tools for web development

Text editors and IDEs

FTP clients

How to view a web page and its source code

How to view a web page

How to view the source code for a web page

Four critical web development issues

Responsive Web Design

Cross-browser compatibility

Web accessibility

Search engine optimization

Chapter 2 How to code, test, and validate a web page

The HTML syntax

The basic structure of an HTML document

How to code elements and tags

How to code attributes

How to code comments and whitespace

The CSS syntax

How to code CSS style rules and comments

How to code basic selectors

How to use VS Code to develop web pages

How to work with folders

How to work with files

How to edit an HTML file

How to use the HTMLHint extension to find HTML errors

How to edit a CSS file

How to use the Live Server extension to open an HTML file in a browser

How to test and debug a web page

How to test a web page

How to debug a web page

How to validate HTML and CSS files

How to validate an HTML file

How to validate a CSS file

Chapter 3 How to use HTML to structure a web page

How to code the head section

How to include metadata

How to code the title element and link to a favicon

How to present the contents of a web page

How to code the lang attribute

How to code headings and paragraphs

How to code the structural elements

When and how to use div elements

Other elements for presenting text

How to code the inline elements for text

How to use character entities and three block elements for text

How to code links, lists, and images

How to code URLs

How to code links

How to code lists

How to include images

A structured web page

The page layout

The HTML file

Chapter 4 How to use CSS to format the elements of a web page

An introduction to CSS

How to provide CSS styles for a web page

How to use the basic selectors to apply CSS to HTML elements

When and how to use the normalize style sheet for browser compatibility

How to specify measurements and colors

How to specify measurements

How to specify colors

How to use advanced techniques to specify colors

How to work with text

How to set the font family and font size

How to set the properties for styling and formatting fonts

How to add shadows to text

How to float an image so text flows around it

How to use other selectors to apply styles

How to code relational, combination, and attribute selectors

How to code pseudo-class and pseudo-element selectors

How the cascade rules work

The HTML and CSS for a web page

The page layout

The HTML file

The CSS file

How to use Developer Tools and custom properties

How to use Developer Tools to inspect the styles that have been applied

How to create and use custom properties

Chapter 5 How to use the CSS box model

An introduction to the box model

How the box model works

A web page that illustrates the box model

How to size and space elements

How to set widths and heights

How to set margins

How to set padding

A web page that illustrates sizing and spacing

The HTML for the web page

The CSS for the web page

A version of the CSS that uses a reset selector

How to set borders and backgrounds

How to set borders

How to add rounded corners and shadows to borders

How to set background colors and images

How to set background gradients

A web page that uses borders and backgrounds

The HTML for the web page

The CSS for the web page

Chapter 6 How to use CSS for page layout

How to develop 2- and 3-column page layouts

How to float and clear elements

How to use floating in a 2-column, fixed-width layout

How to use floating in a 2-column, fluid layout

How to use floating in a 3-column, fixed-width layout

A home page with a 2-column, fixed-width layout

The home page

The HTML for the home page

The CSS for the home page

A speaker page with a 2-column, fixed-width layout

The speaker page

The HTML for the speaker page

The CSS for the speaker page

How to create text columns

The properties for creating text columns

A 2-column web page with a 2-column article

How to position elements

Four ways to position an element

How to use absolute positioning

How to use fixed positioning

Chapter 7 How to work with lists, links, and navigation menus

How to code lists

How to code unordered lists

How to code ordered lists

How to code nested lists

How to code description lists

How to format lists

How to change the bullets for an unordered list

How to change the numbering system for an ordered list

How to change the alignment of list items

How to code links

How to link to another page

How to format links

How to use a link to open a new browser window or tab

How to create and link to placeholders

How to link to a media file

How to create email and phone links

How to create navigation menus

How to create a vertical navigation menu

How to create a horizontal navigation menu

How to create a 2-tier navigation menu

How to create a 3-tier navigation menu

The CSS for a 3-tier navigation menu

Chapter 8 How to use media queries for Responsive Web Design

Introduction to Responsive Web Design

The three components of a Responsive Web Design

How to test a responsive design

How to implement a fluid design

Fluid layouts vs. fixed layouts

How to convert fixed widths to fluid widths

How to use other units of measure with responsive design

How to size fonts

How to scale images

A web page with fluid design

The HTML for the web page

The CSS for the web page

How to use media queries

How to control the mobile viewport

How to code media queries

How to determine the breakpoints for media queries

How to build responsive menus with the SlickNav plugin

A web page with Responsive Web Design

The design of the web page

The CSS for the media queries

The CSS when using mobile-first coding

The CSS for the smallest viewports

The CSS for the media queries

Section 2 Responsive Web Design

Chapter 9 How to use Flexible Box Layout for Responsive Web Design

An introduction to Flexible Box Layout

The basic flexbox concepts

How to create your first flexible box

How to set flexbox properties

How to align flex items along the main axis

How to align flex items along the cross axis

How to wrap and align wrapped flex items

How to allocate space to flex items

How to change the order of flex items

A responsive web page that uses flexbox

The design of the web page

The HTML for the main structural elements

The CSS for larger screens

The CSS for smaller screens

Chapter 10 How to use Grid Layout for Responsive Web Design

Getting started with Grid Layout

An introduction to Grid Layout

How to create a basic grid

How to set the size of grid tracks

The properties for aligning grid items and tracks

A page layout that uses alignment

How to define the grid areas for elements

How to use numbered lines

How to use named lines

How to use template areas

How to use the 12-column grid concept

A responsive web page that uses grid layout

The design of the web page

The HTML for the structural elements

The CSS for the template areas

The media query for smaller screens

The CSS for the page with a 12-column grid

Common page layouts that use grid

The headline and gallery layout

The fixed sidebar layout

The advanced grid layout

Section 3 More HTML and CSS skills as you need them

Chapter 11 How to work with images, icons, and fonts

Basic skills for working with images

Types of images for the Web

How to include an image on a page

How to resize an image

How to align an image vertically

How to float an image

Other skills for working with images

How to use the HTML figure and figcaption elements

How to do image rollovers

How to create image maps

How to provide images for varying viewport sizes

How to use the img and picture elements

How to use Scalable Vector Graphics

How to get the images and icons that you need

When to use an image editor

How to get images

How to get and work with icons and favicons

How to work with fonts

How to embed fonts in a web page

How to use Google and Adobe Web Fonts

Chapter 12 How to work with tables

Basic HTML skills for coding tables

An introduction to tables

How to create a table

How to add a header and footer

Basic CSS skills for formatting tables

How to use CSS to format a table

How to use the CSS structural pseudo-classes for formatting tables

Other skills for working with tables

How to use the HTML figure and figcaption elements with tables

How to merge cells in a column or row

How to provide for accessibility

How to make a table responsive

Chapter 13 How to work with forms

How to use forms and controls

How to create a form

How to use buttons

How to use text fields and text areas

How to use radio buttons, check boxes, and labels

How to use drop-down lists and list boxes

How to use the number, email, url, and tel controls

How to use the date and time controls

Other skills for working with forms

How to align controls

How to group controls

How to set the tab order and assign access keys

How to use the HTML features for data validation

The HTML attributes and CSS selectors for data validation

How to use regular expressions for data validation

A web page with a form

The page layout

The HTML

The CSS

How to use other HTML controls

How to use the search control

How to use the file upload control

How to use the color, range, progress, and meter controls

How to use a data list and an output control

Chapter 14 How to add audio and video to a web page

An introduction to media on the web

Common media types for audio and video

How to convert a file from one media type to another

How to use the HTML audio and video elements

A web page with audio and video

The page layout

The HTML

Chapter 15 How to use CSS transitions, transforms, animations, and filters

How to use CSS transitions

How to code transitions 

How to create an accordion using transitions

How to use CSS transforms

How to code 2D transforms

A gallery of images with 2D transforms

How to use CSS animations

How to code simple animations

How to set the keyframes for a slide show

How to use CSS filters

How to code filters

The ten filter methods applied to the same image

Section 4 Web design, deployment, and JavaScript

Chapter 16 Users, usability, and web design

Users and usability

What web users want is usability

The current conventions for usability

Design guidelines

Use mobile-first design

Use the home page to sell the site

Let the users know where they are

Make the best use of web page space

Divide long pages into shorter chunks

Know the principles of graphics design

Write for the web

Chapter 17 How to deploy a website

How to transfer files to and from an Internet server

How to connect to a website on the Internet

How to upload and download files

How to test a web page that has been uploaded to the Internet server

How to start your own website

How to get a web host

How to get a domain name

How to get your website into search engines

How to set up, maintain, and improve a website

Chapter 18 How to use JavaScript to enhance your web pages

Introduction to JavaScript

How JavaScript works

Three ways to include JavaScript in a web page

How DOM scripting works

Methods and properties for DOM scripting

How JavaScript handles events

The Email List application in JavaScript

The HTML

The JavaScript

Introduction to jQuery

How to include jQuery in your web pages

How to code jQuery selectors, methods, and event methods

The Email List application in jQuery

The HTML

The jQuery

How to use JavaScript as a non-programmer

The Image Swap application

The Slide Show application

Three sources for tested JavaScript and jQuery

Appendix

Appendix A How to set up your computer for this book

How to install the source code for this book

How to install Visual Studio Code

How to install Chrome and other browsers

Supporting materials for teaching HTML and CSS

We want to make it easy for you to teach an effective course with our book. And we want students to feel that any assignment you give them is worth doing – that it’s not just busywork.

To make that happen, we include practice exercises at the end of each chapter that are probably different than what you’re used to. We supply instructor’s materials that let you give your students more experience and measure their progress. And we provide an optional Lab Manual that gathers the student materials you’re most likely to use in a single package.

For a complete description of all of these materials, please read the Instructor's Summary. Otherwise, here's a quick overview:

The end-of-chapter (EOC) exercises

The EOC exercises are carefully designed to let your students (1) practice what they’ve just learned and (2) help them apply what they’ve learned in new ways.

What’s different about these?

  • Other books may have a ton of exercises, but each covers maybe one or two skills at a time. So no matter how many you assign, students still don’t see how all the skills interact in a production website. But if you assign just one of the exercises in our HTML book, your students will apply and practice almost everything in the chapter, as they would in the real world.
  • Our exercises start from partial HTML/CSS files, so your students can focus on new skills. They won’t waste time on repetitive code that they’d never code from scratch in a work environment.
  • Students can download the solutions to the exercises (as well as the exercise starts) for free from our retail website. We provide the solutions primarily for the professionals who use our books for self-training. But we’ve found that the solutions keep students from giving up when they get stuck on a problem at midnight, and that the model code also helps them refine their future work.
  • And don’t worry! We provide additional projects and case studies that you can use for testing, where the solutions are available only to instructors (see the instructor’s materials below).

You’ll soon find that this approach allows students to practice more…and learn much more!…in less time.

The instructor’s materials

To help you present the book content and evaluate your students’ progress in gaining real-world skills, we provide the following instructor resources (for all the details, please see the Instructor’s Summary):

  • Instructional objectives by chapter
  • PowerPoint slides for each chapter for classroom presentations
  • Test banks of multiple-choice questions by chapter
  • Two case studies that present chapter-by-chapter exercises, plus their solutions
  • Short exercises that can be used for added practice, quizzes, or tests, plus their solutions
  • Generic projects that offer minimal guidance as they have your students design and develop small websites of their own

The instructor .zip file and the Canvas course

The complete set of instructor’s materials described in the Instructor’s Summary can be downloaded from your instructor account page once you’ve submitted your request and we’ve approved it. The download is a .zip file.

If you use Canvas as your LMS, we’ve created a complete Canvas course for the book, using selected materials from our full set of instructor’s materials. This makes it easy for you to evaluate the components and see how they work together in a complete course. Again, if you request this file, it will be available to download from your instructor account page. It’s an .ismcc file.

This is the first Canvas course file we’ve created, so we’d really appreciate your feedback on it. Is it easy to install? Is there anything missing or unnecessary? What improvements can we make? Please let us know. Thank you!

The Lab Manual for the book

The Lab Manual for this book presents all of the student activities from both the book and the instructor’s materials in a single document. That includes course objectives, chapter summaries, term lists, book exercises, case studies, and projects.

  • This Lab Manual ensures that your students will have everything they need for the course, with the exception of the starting code that you’ll supply from the instructor’s materials. And it makes it easier for you to assign case studies and projects.
  • This Lab Manual is available as a print book, an eBook, and in an electronic bundle that consists of the eText+eManual.
  • The instructor’s materials include a PDF version of the lab manual materials for the first 4 chapters. If you like what you see there, you can request the complete version by going to our Lab Manual or electronic bundle page.

On this page, we'll be posting answers to the questions that come up most often about this book. So if you have any questions that you haven't found answered here at our site, please email us. Thanks!

To view the corrections for this book in PDF, just click on this link: View the corrections

Then, if you find any other errors, please email us so we can correct them in the next printing of the book. Thank you!

Murach college books and courseware since 1974