Why HTML Wins
Markdown costs 3× fewer tokens. JSON gives you structured data. But HTML conveys 10× richer information than either — and it's the only format that works for humans and machines simultaneously.
The Three Formats
🔴 JSON API
{"title": "Why HTML Wins"}
Structured, but lifeless. No layout, no hierarchy, no semantics beyond what the developer explicitly encoded. Requires a client to render it into something a human can see.
🟢 HTML
<article><h1>Why HTML Wins</h1></article>
Structured and semantic. Headings, sections, links, emphasis, tables — all encoded with meaning. An AI agent understands an <h2> is a section header. A <nav> is navigation. A <a href> is a link to follow.
The Semantic Advantage
| Element | Meaning to an AI | JSON equivalent |
|---|---|---|
<h1> | Primary topic of this page | None — just a field name |
<nav> | Site navigation | None |
<a href> | Related content — fetch this URL | Just a string |
<article> | Self-contained composition | None |
The key insight: An AI agent reading HTML doesn't just get content. It gets a map. Headings are landmarks. Links are paths. Navigation is the table of contents. The HTML is the application.
The Navigation Problem
// JSON API — the agent needs documentation
GET /api/articles/123
→ { id: 123, title: "..." }
// Now what? How does it find related articles?
// HTML — the agent gets content AND navigation
GET /p/why-html-wins
→ <article>
<a href="/p/free-the-web">Free The Web</a>
<a href="/p/edge-first">Edge-First</a>
</article>
// The links tell the agent exactly where to go next.
Why This Matters Now
2026 is the year AI agents started using the web, not just reading it. MCP servers let agents fetch URLs, read HTML, follow links, and submit forms. Agents that can navigate a hypermedia site are indistinguishable from a human researcher doing the same thing.
HTML is the universal protocol. It works for humans with browsers, search engines with crawlers, and AI agents with HTTP clients. No other format has that property.
The Numbers
| Metric | SPA (React) | Hypermedia (HTMX) |
|---|---|---|
| Initial JS payload | ~180KB gzipped | ~14KB (htmx.min.js) |
| Time to interactive (3G) | 4–8 seconds | <1 second |
| AI-readable without rendering | No | Yes |
| Works without JavaScript | No | Yes |
Further Reading
- Free The Web — the five principles
- The Surfable Web — knowledge graphs as hypermedia
- Edge-First Architecture — where this all runs