5 Ways to Reduce HTML File Size on Your Website, Step 0
Published on April 16, 2025, filed under Development (RSS feed for all categories).
Anna Monus of DebugBear wrote about 5 Ways to Reduce HTML File Size on Your Website. Strangely, or interestingly, the most immediate way is missing:
Remove the HTML that isn’t needed, i.e., all optional HTML. *
What is optional HTML? Optional start and end tags, optional quotes, and attribute value defaults. Optional HTML: Everything You Need to Know provides an overview.
Why omit optional HTML? As Anna says, to reduce HTML file size and improve performance; you find a similar argument in HTML and Performance: Leave Out Optional Tags and Quotes.
It’s not a popular practice, but that doesn’t change the fact that omitting optional HTML is quite literally a valid performance optimization measure, and a pillar of writing minimal HTML.
If this is your first visit on this website, welcome! I write a lot about HTML optimization, meaning HTML that is valid (error-free), semantic, accessible, and minimal.
* I like to focus this on optional HTML, but another opportunity to reduce HTML file size lies in validation. This is because erroneous HTML code may be code that can be removed. And because we know that large commercial websites usually come with validation and therefore conformance issues, this has become an actual performance optimization vector.
About Me

I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve worked as a technical lead and engineering manager for small and large enterprises, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)