Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Responsive Web Design with HTML5 and CSS - Fourth Edition

You're reading from  Responsive Web Design with HTML5 and CSS - Fourth Edition

Product type Book
Published in Sep 2022
Publisher Packt
ISBN-13 9781803242712
Pages 498 pages
Edition 4th Edition
Languages
Author (1):
Ben Frain Ben Frain
Profile icon Ben Frain
Toc

Table of Contents (21) Chapters close

Preface 1. Section I: The Fundamentals of Responsive Web Design
2. The Essentials of Responsive Web Design 3. Writing HTML Markup 4. Media Queries and Container Queries 5. Fluid Layout and Flexbox 6. Layout with CSS Grid 7. Section II: Core Skills for Effective Front-End Web Development
8. CSS Selectors, Typography, and More 9. CSS Color 10. Stunning Aesthetics with CSS 11. Responsive Images 12. SVG 13. Transitions, Transformations, and Animations 14. Custom Properties and CSS Functions 15. Forms 16. Section III: Latest Platform Features and Parting Advice
17. Cutting-Edge CSS Features 18. Bonus Techniques and Parting Advice 19. Other Books You May Enjoy
20. Index

Image format comparisons

Let’s consider an example to illustrate the possible savings. In the code that accompanies this chapter, you will find a file called scones.jpg. This is the same picture of scones we used in Chapter 1, The Essentials of Responsive Web Design, completely unmodified. On my computer, it tells me it has a file size of 199KB. If I load that file into the aforementioned Squoosh and leave the defaults, it tells me it can optimize the file down to a JPG of only 122KB. That file is in the code as squoosh-scones.jpg. That 39% saving in itself should be enough to show how much unneeded weight our images contain.

How does image optimization work?

By default, an image from an application like Photoshop or straight out of a camera contains heaps of extra information we just don’t need when destined for the web. Things like the location the image was taken, the date and time, camera used, aperture and lens settings, focal depth, and heaps...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime