Using Claude Code: The Unreasonable Effectiveness of HTML

· Source: Simon Willison's Weblog · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Intermediate, short

Summary

Thariq Shihipar of Anthropic's Claude Code team advocates for using HTML over Markdown as an output format when prompting large language models like Claude. This approach, detailed with examples on a dedicated site, allows for richer explanations incorporating SVG diagrams, interactive widgets, and in-page navigation, enhancing information clarity and user experience. Historically, Markdown was preferred due to token efficiency with models like GPT-4's 8,192 token limit. However, the ability of HTML to create dynamic and visually engaging content, such as color-coded PR reviews or detailed exploit explanations, suggests a reevaluation of output format defaults. An example demonstrates GPT-5.5 generating an HTML explanation for a Linux security exploit from obfuscated Python code, showcasing the potential for interactive and well-styled technical documentation.

Key takeaway

For Machine Learning Engineers or NLP Engineers generating technical explanations or code reviews, reconsider defaulting to Markdown. Your outputs can be significantly enhanced by requesting HTML, enabling interactive elements, SVG diagrams, and advanced styling. This shift allows for more navigable and clearer documentation, especially for complex topics like security exploits or intricate code logic, ultimately improving comprehension and reducing review time.

Key insights

HTML offers richer, more interactive LLM outputs than Markdown, improving clarity and navigation for complex information.

Principles

Method

Prompt LLMs to generate HTML artifacts for explanations, specifying desired interactive elements, styling, and content focus (e.g., "Render the actual diff with inline margin annotations, color-code findings by severity").

In practice

Topics

Best for: Machine Learning Engineer, NLP Engineer, Prompt Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Simon Willison's Weblog.