Preface

When I wrote the first edition of this book in 2011 and 2012, it was by no means certain that responsive web design would become the de facto approach for web design for the foreseeable future. Here we are, 9 years and two editions later and its popularity and utility show no signs of abating.

There's a saying apt for authors of technical books, "When one person teaches, two people learn". That's certainly been the case for me while writing this third edition. I've learned so much more covering these topics than I imagined I would. In my day-to-day work, I already find myself coming back to certain chapters and sections when trying to refresh my memory on how to do one thing or another that I have subsequently forgotten! I hope these pages prove as resourceful for you!

Thinking back on the contents of the first edition, it also struck me just how capable the technologies we have at our disposal have become. If you are an old hand at the web development game, feel free to jump right into some of the newest topics, such as CSS Grid layout or variable fonts and I'd be shocked if you didn't come away in the least bit excited by the possibilities they offer. These are things that would have blown my mind a decade ago.

I won't waste any more of your precious time here. Thank you for taking the time to read this book. I hope you enjoy this latest edition and take plenty from it. Please reach out to me with your thoughts, both good and bad, and any questions that arise. They will naturally inform the content of any future editions.

Finally, while the publishers mention it again in a moment, if you do enjoy it, please consider adding a review on Amazon or your book store of choice. From a commercial point of view, it really does help with sales. From a personal perspective, it's really lovely to read them and know people around the world are making use of something you spent so long working on.

It should go without saying here that if you don't enjoy it, please keep your opinions to yourself!

Who this book is for

Are you a full-stack developer who needs to gen up on their front-end skills? Perhaps you work on the front-end and need a definitive overview of everything that modern HTML and CSS has to offer? Maybe you have done a little website building but you need a deep understanding of responsive web designs and how to achieve them? This is the book for you!

All you need to take advantage of this book is a working understanding of HTML and CSS. No JavaScript knowledge is needed.

What this book covers

Chapter 1, The Essentials of Responsive Web Design, is a whistle-stop tour of the key ingredients in coding a responsive web design.

Chapter 2, Writing HTML Markup, covers all the semantic elements of HTML5, text-level semantics, and considerations of accessibility. We also cover how to insert media such as video into our pages.

Chapter 3, Media Queries – Supporting Differing Viewports, covers everything you need to know about CSS media queries: their capabilities, the syntax, and the various ways in which you can wield them.

Chapter 4, Fluid Layout, Flexbox, and Responsive Images, shows you how to code proportional layouts and responsive images and provides a thorough exploration of Flexbox layouts.

Chapter 5, Layout with CSS Grid, is a deep dive into the two-dimensional layout system of CSS Grid.

Chapter 6, CSS Selectors, Typography, Color Modes, and More, covers the endless possibilities of CSS selectors, HSLA and RGBA color, web typography including variable fonts, viewport-relative units, and a whole lot more.

Chapter 7, Stunning Aesthetics with CSS, covers CSS filters, box shadows, linear and radial gradients, multiple backgrounds, and how to target background images to high-resolution devices.

Chapter 8, Using SVGs for Resolution Independence, covers everything we need to use SVG graphics inside documents and as background images, as well as how to interact with them using JavaScript.

Chapter 9, Transitions, Transformations, and Animations, gets our CSS moving as we explore how to make interactions and animations using CSS.

Chapter 10, Conquer Forms with HTML5 and CSS, explains how web forms have always been tough but the latest HTML5 and CSS features make them easier to deal with than ever before.

Chapter 11, Bonus Techniques and Parting Advice, explores the essential considerations before embarking on responsive web design and also provides a few last-minute nuggets of wisdom to aid you in your responsive quest.

Get the most out of this book

To get the most from this book, you'll need:

  • A text editor such as Sublime Text, Vim, or Visual Studio Code.
  • A modern browser such as Firefox, Edge, Safari, or Chrome.
  • An appreciation for mediocre jokes and obscure popular film references.

Download the example code files

You can download the example code files for this book from your account at www.packt.com/. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at http://www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the on-screen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Responsive-Web-Design-with-HTML5-and-CSS-Third-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781839211560_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: "We can fix that prior problem easily by adding this snippet in the <head>."

A block of code is set as follows:

img {
  max-width: 100%;
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

img {
  max-width: 100%;
  display: inline-flex;
}

Bold: Indicates a new term, an important word, or words that you see on screen, for example, in menus or dialog boxes, also appear in the text like this. For example: "At its simplest, you pick a URL and click on START TEST."

Warnings or important notes appear like this.

Tips and tricks appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you could report this to us. Please visit www.packtpub.com/support/errata, select your book, click on the Errata Submission Form link, and enter the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you could provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make a purchase decision, we at Packt can understand what you think about our product, and our author can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.61.119