This is the code repository for Responsive Web Design with HTML5 and CSS, Fifth Edition, published by Packt.
Ben Frain
Responsive Web Design with HTML5 and CSS, Fifth Edition, is the very latest, up-to-date version of one of the most comprehensive and bestselling books on HTML5 and CSS techniques for responsive web design. It emphasizes pragmatic application, teaching you all about the approaches needed to build most real-life websites, with downloadable examples for every chapter. Written in author Ben's friendly and easy-to-follow style, this title can be read as a complete guide or used to dip in as a reference for each topic-focused chapter. It covers all the cutting-edge and modern developments in responsive design and the HTML and CSS languages. It includes methods for better accessibility, techniques for using variable fonts, the latest color manipulation tools, and color spaces now usable in modern browsers. Throughout the book, you’ll enjoy in-depth coverage of bleeding-edge features such as scroll-linked animations, view transitions, CSS anchor positioning, CSS layers, functions, container queries, nesting, and more. Get exclusive tips and approaches for frontend development, including how to validate the effectiveness of AI generated code. By the end of this book, you’ll not only have a thorough understanding of responsive web design and what's possible with the latest HTML5 and CSS, but also know how to best implement each technique.
- Employ color functions to mix colors and convert between color spaces
- Use media and container queries to detect things like touch/mouse and color preference within CSS
- Leverage HTML semantics to author accessible markup
- Use SVGs to provide resolution-independent images and learn the most efficient way of displaying them
- Discover CSS custom properties and learn to make use of new CSS functions, including clamp, min, and max
- Add validation and interface elements to HTML forms
- Check whether the frontend code produced by AI tools is effective for your goals
- The Essentials of Responsive Web Design
- Writing HTML Markup
- Media Queries and Container Queries
- Fluid Layout and Flexbox
- Layout with CSS Grid
- CSS Selectors, Typography, and More
- Stunning Aesthetics with CSS
- CSS Color
- Responsive Images
- SVG
- Transitions, Transformations, and Animations
- Custom Properties and CSS Functions
- Forms
- Cutting-Edge CSS Features
- Bonus Techniques and Parting Advice
- You'll need a text editor such as Sublime Text, Neovim, or VS Code
- You'll need a modern browser such as Firefox, Edge, Safari, or Chrome
- You'll need an appreciation of mediocre jokes and popular 90s film references
For more about this title, visit rwd.education
Queries? Create an issue, contact the author on Twitter or via his website.
You can browse the source files used to build the rwd.education website here.
To build the site I used vitejs to speed development.
Note a little TypeScript was used for the little bit of JavaScript used on site.
I also used the rather lovely https://realfavicongenerator.net/ to make all the favicon images/manifests.
If you are curious and 'don't mind getting your hands dirty', included in the folder should be everything you need to run it up in a local server yourself.
- You will need to install a recent version of Node (I used 16 if memory serves)
- You will need to install Vite
- Run
[sudo] npm installin Terminal from the 'rwd.education' folder - Assuming all installs OK (cross all your digits!), after everything is installed, you should now be able to run
npm run devfrom the Terminal and away you go.
Problems? Open an issue, Tweet at me, or send me a mail. Happy building!
Ben Frain has been a web designer/developer since 1996. He is currently employed as a lead product designer at Bet365. Before the web, he worked as an underrated (and modest) TV actor and technology journalist, having graduated from Salford University with a degree in media and performance. He has written four equally underrated (his opinion) screenplays and still harbors an, admittedly fading, belief he might sell one.
He likes to pretend he isn’t a nerd but spends an inordinate amount of time building keyboards and talking about them, text editors, and the web on his blog and YouTube channel. Outside of geekery, he enjoys managing his youngest son’s football team, if standing in a freezing wet field, while a team of 11-year-olds shout at you to shut up can be called enjoyment. He is also hoping that, one day soon, his eldest teenage son will emerge from his room to spend some time with him and his wife, rather than merely to ask whether there is anything to eat or to ask for money.