Using Claude Code: The Unreasonable Effectiveness of HTML
Try requesting HTML output from Claude to leverage richer formatting and interactivity in LLM responses.
Experiment with HTML output in your LLM prompts to improve readability and interactivity for documentation and code review tasks.
Summary
Thariq Shihipar of the Claude Code team argues that HTML is a superior output format to Markdown for LLM responses, citing token‑efficiency advantages that were relevant for GPT‑4 but are now outweighed by HTML’s richer capabilities.
The article showcases a collection of examples on a personal site and provides a prompt that asks Claude to produce an HTML artifact describing a pull request, complete with diff rendering, margin annotations, and severity‑based colour coding. Shihipar notes that HTML allows embedding SVG diagrams, interactive widgets, and in‑page navigation, which Markdown cannot.
To illustrate the point, the author used GPT‑5.5 to generate an HTML explanation of a Linux privilege‑escalation proof‑of‑concept from copy.fail. The resulting page includes a dark theme, callouts, a high‑level summary, a step‑by‑step table, and a table explaining why the code looks strange. The example demonstrates how HTML output can convey complex technical details more clearly than plain text or Markdown.
The piece encourages developers to experiment with HTML output for ad‑hoc prompts, especially for documentation, code reviews, and security explanations, and highlights that the token‑efficiency advantage of Markdown has largely disappeared with newer models.
Key changes
- Claude Code can output HTML instead of Markdown
- HTML supports SVG diagrams, interactive widgets, and navigation
- Markdown token‑efficiency advantage is less relevant with GPT‑5.5
- Example prompt asks for an HTML artifact describing a PR diff
- GPT‑5.5 produced a dark‑theme HTML page with callouts and tables
- The output includes a high‑level summary and step‑by‑step explanation of a Linux exploit