A few months ago, an interesting question came across my social media feed.1 “How does a web page that doesn’t weigh 50 KB (compressed) consume 68 MB RAM?”
An almost immediate response: “JavaScript frameworks have led to web developers who can’t write HTML. Loading up needless frameworks to support ads and tracking to say ‘Hello World!’”
An interesting hypothesis; shame there’s no way to test that… oh, wait, I can just open up dev tools and discover…
There was no JavaScript. Or ads. Or, for that matter, images. It was all just HTML and CSS.
There are a few lessons in this.
- When someone asks “why is this happening,” it’s always worth a look before opening your mouth.
- Before you sneer at a web developer’s work, check to see if you are speaking to that developer.2
- Web browsers use a surprising amount of memory just to display even basic web pages.
But really, many people hate on JavaScript reflexively. I’ve started taking that into account in these conversations. Sometimes I think it’s because they don’t know JavaScript themselves, and hating it gives them a moral high-ground to defend their continued ignorance.
Sometimes I think that’s ungenerous.
But just in case: it’s ok to just use HTML and CSS if you are not interested in JavaScript personally. And if you use it sparingly, the web is better for it.
What’s not OK is this: developing for the web using JavaScript and not understanding HTML and CSS. Those are the foundational technologies, and JavaScript is supposed to cooperate with and augment them. If you’re using them to replace or abstract away HTML or CSS you are doing it wrong.
I think it’s important that people place blame where it belongs, and I can’t think of an example where the language is at fault. Instead, it’s snobbery, laziness, and greed.
For example:
- Snobbery
- ”CSS isn’t programing, and it’s a terrible language.”
- Laziness
- ”CSS is so hard to understand. Protect me, JavaScript!”
- Greed
- ”Why should I hire experts? I can replace four of them with one full-stack developer."
- "New features fast! 10x Developer! Sleep when you’re dead! Vibe code!”
These human failings lead to a lot of bad code, caused by using the wrong tool, using the tool incorrectly, or not slowing down enough to make good decisions or learn how to use the tool.
Anything that takes the place of direct contact with code plays to all three. That includes AI, but also the lengthy list of “no code” web building solutions. Figma Sites is the most recent example.
Of these, “greed” is the worst; it encourages and rewards the other two. When you go into a company and see terrible JavaScript doing things much better left to other tools, don’t think “ugh, JavaScript.” Think: what have these poor people been having to put up with?
That’s not to say that languages don’t deserve criticism. JavaScript has its faults, and there are many places it should not be used, and purposes for which it is not suited. Absent context, using JavaScript is not bad.
Much the same thing can be said for frameworks; React is old. It served a purpose quite well in 2013, and it has not (perhaps) caught up with what CSS and HTML can do in 2025. But I’ll take a well-documented, thoughtful, and carefully maintained framework every day over a bespoke vanilla JavaScript application that has little documentation, no testing, and no internal consistency.
Yes, even if it’s React.
I do love JavaScript. I write it every day3. But I love it for what it can do that HTML and CSS can’t do. I love it for its portability and how accessible it is to learn. I love that you can be functional, object-oriented, or even procedural with JavaScript.
It works so well with HTML and CSS, though. Use those more. I am running to use new CSS (anchor-based positioning) or HTML (dialogs and popovers).
I love JavaScript, but any day I can replace it with HTML or CSS is a good day.
Footnotes
-
I tend not link to Mastodon conversations because they are ephemeral and sometimes involve people who would prefer not to have their content widely indexed or distributed. ↩
-
Based on personal experience, I find it a lot more effective to be behind someone before you talk behind their back. ↩
-
Well, I write Typescript. Which I like less. ↩