The Case for HTML First Web Development
This paper advocates for an "HTML First" development approach that prioritizes semantic HTML and server-side logic over complex client-side frameworks, arguing that this minimalist strategy significantly reduces codebase size, improves performance, and enhances maintainability, as demonstrated by the htmx project and a case study on the Yle website.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The "HTML First" Revolution: Why We Should Stop Over-Engineering the Web
Imagine you're building a house.
For a long time, the standard way to build a house was to start with a solid brick foundation, put up wooden walls, and add a roof. This was simple, sturdy, and everyone knew how to do it. In the world of the internet, HTML is that brick foundation. It's the language that tells a browser, "Here is a paragraph," "Here is an image," and "Here is a button."
But around the early 2000s, things got complicated. Developers wanted to build "smart houses" (web applications) that could do complex things like chat, stream video, and update in real-time without reloading. The original bricks (HTML) felt too simple for these new demands. So, developers started inventing massive, custom toolkits (JavaScript frameworks like React, Angular, and Vue).
These toolkits were powerful, but they were like bringing a full construction crane, a team of architects, and a 3D printer to build a simple garden shed. You could build the shed, but you were carrying around tons of heavy machinery, the house took longer to build, and if the crane broke, the whole house was in trouble.
This paper, written by Juho Vepsäläinen, argues that it's time to put the crane down and pick up the bricks again. It's called HTML First.
Here is the breakdown of the argument, using some everyday analogies.
1. The Problem: "Div Soup" and the Heavy Backpack
In the old days, if you wanted a button that did something, you just wrote a button in HTML. But as web apps got complex, developers stopped using the built-in buttons. Instead, they built their own "buttons" out of invisible boxes (divs) and wrote thousands of lines of code to make them look and act like buttons.
The author calls this "Div Soup."
- The Analogy: Imagine trying to eat a bowl of soup, but instead of broth and vegetables, it's just a tangled mess of spaghetti noodles. It's hard to find the flavor (the actual content), and it's hard to digest (hard for computers and screen readers to process).
- The Result: Websites became heavy. They took forever to load, drained your phone's battery, and were a nightmare to fix because the code was so abstract and disconnected from the actual page.
2. The Solution: The "HTML First" Manifesto
The paper introduces the HTML First Manifesto (from 2023). It's a set of rules that says: "Before you reach for the heavy machinery, ask yourself: Can I just use the bricks?"
Here are the main rules, translated:
- The Principle of Least Power: Start with the simplest tool that works. If a plain HTML button works, don't build a custom React button. If CSS can make it move, don't write JavaScript to animate it.
- No Build Steps: In the old way, you had to run a complex "compiler" (a build step) to turn your code into a website. HTML First says: "Just write the code, and the browser can read it directly." It's like cooking a meal from scratch instead of ordering a pre-packaged meal that needs microwaving.
- Keep it Simple: Don't store complex data in the user's browser (client-side state). Let the server handle the heavy lifting. It's like a restaurant kitchen (server) doing the cooking rather than asking the customer (browser) to chop the vegetables.
3. The Magic of Modern HTML
You might think, "But HTML is just for static text, right?" The author says, "Wrong!"
Modern HTML (HTML5 and beyond) has evolved. It's like the brick foundation has secretly gained superpowers.
- Foldable Menus: You can make a "click to expand" menu using just two lines of HTML code (
<details>and<summary>). No JavaScript needed! - Form Validation: You can tell a browser, "This field must be an email address," using a simple HTML tag. The browser checks it for you automatically.
- Dialogs: You can pop up a window (like a "Are you sure?" box) using built-in HTML elements.
The paper shows that for many common tasks, HTML can do the job alone, or with a tiny, lightweight helper library (like htmx or Alpine.js). These libraries are like a Swiss Army knife—small, useful, and they fit right in your pocket, unlike the massive construction crane of the old frameworks.
4. The Proof: Real-World Results
The author didn't just talk theory; they ran experiments.
- The "Code Shrink" Effect: In several case studies, companies switched from heavy frameworks (like React) to HTML First approaches.
- Result: Their codebases shrank by 60% to 80%.
- Analogy: Imagine a library that had 10,000 books. After switching to HTML First, they realized 8,000 of those books were just empty pages or duplicates. They threw them out, and the library became much easier to manage.
- Speed: The websites loaded faster. Because there was less "heavy machinery" (JavaScript) to download, the site appeared almost instantly.
- The Yle Test: The author took a major Finnish news website (Yle), stripped out the complex JavaScript styling, and rebuilt it using HTML First principles.
- Result: The site became twice as fast and scored much higher on performance tests. It was like taking a rusty, heavy car, removing the unnecessary parts, and suddenly it was a sleek sports car.
5. Why Should You Care? (The Benefits)
Why does this matter to you, the user or the developer?
- For Developers: It's easier to maintain. When code is simple and close to the "bricks," you can find bugs faster. You don't need to memorize a complex framework's rules; you just need to know HTML. It's like fixing a leaky faucet with a wrench instead of trying to fix the entire plumbing system.
- For Users: Websites load faster, use less data, and work better on old phones.
- For Accessibility: Screen readers (used by blind people) and AI bots can understand simple HTML much better than complex, custom code. It's like speaking clear, simple English instead of a secret code.
- For the Future: The web platform (the browser) is catching up. It's doing more of the heavy lifting now. By using HTML First, you are riding the wave of the browser's natural evolution rather than fighting against it.
6. The Catch: It's Not a Magic Wand
The author is honest: HTML First isn't for everything.
If you are building a complex video game or a real-time 3D simulation, you still need the heavy machinery (JavaScript frameworks). But for most websites, blogs, news sites, and even many business applications, the "bricks" are enough.
The Bottom Line
The paper argues that we got lost in the complexity of "Web 2.0." We started building castles out of sand when we could have built them out of stone.
HTML First is a call to return to the basics. It's about respecting the web platform, using the tools that are already there, and building things that are simple, fast, and durable. It's not about rejecting technology; it's about using the right technology for the job, starting with the simplest one possible.
In short: Before you write a line of complex code, ask yourself: "Could I just use a button?" If the answer is yes, do that instead.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.