Numerous useful patterns for building HTML tools &#039,

Dec 21, 2025 23: 00: 00

image

Open source engineer

has developed . He calls his web applications, which combine HTML, JavaScript, and CSS into a single file, ‘ HTML Tools .’ He has written a blog post summarizing the useful patterns he has discovered in the process of developing these HTML Tools.

Important patterns for creating HTML tools

What HTML components ought to look like
Willison has created some HTML resources, including:

SVG-render: A program for creating JPEG and PNG files that can be downloaded.
: A tool to create diffs between different package releases and copy them to your clipboard
: A tool that generates a nested view of discussion threads on

Willison identifies the traits of an HTML tool from the perspective of the person who created it over.

consists of a single HTML document
The HTML document includes both JavaScript and CSS.
Avoid using libraries like Respond that require create steps.
fill relationships from

– Stay it as compact as probable

Process of development
Use Claude’s” Artifacts,” ChatGPT’s, or Gemini’s” Canvas” have, according to Willison, is the simplest way to generate HTML tools. For instance, if you want to use these LLMs to produce an HTML tool that you paste JSON and convert it to YAML, you should use Gemini or ChatGPT’s after instructions:
[code]
Create a paint that I can powder into YAML and JSON. Reacting absent.
[/code]

Claude would offer the following guidelines:
[code]
Create a piece of art that I can glue into JSON and convert it to YAML. Reacting absent.
[/code]

In both instances, we specified” No React,” because it would be difficult for LLM to copy and paste the script outcome because it would be generated only for Respond. Another problem is that Behave code frequently requires a build step, which may take a long time to show. Using a programming agent like Claude Code or Codex Basic for more complex projects allows you to check your code as you develop it.

Using CDN
When using third-party JavaScript libraries, Willison recommends loading them via a Caching. Major LLM platforms such as Claude, ChatGPT, and Gemini support specific CDNs as features of Artifact and Canvas, so if you specify a command like ‘Use PDF.js,’ PDF.js will be loaded from the appropriate CDN. If you don’t use a Caching, an alternative is to use , but this requires a build step, which reduces the productivity of analysis and makes self-hosting cumbersome.

â—†Hosting
Willison does not advise using LLM platforms to host HTML files because they typically operate in a tight playground and are less trustworthy than other dynamic hosting options. Williamson suggests

, which has the advantage of allowing you to paste HTML code into github.com and have it published at a permanent URL within seconds.

Using already-existing resources
Over 100 of Willison’s personal HTML tools are now available in a single people collection, and he claims that the LLM assistant can do so with ease in interesting combinations. He adds that reusing used equipment increases the likelihood that LLM’s script will function properly.

For instance, I initially instructed Claude Code to follow the instructions below when creating the pypi-changelog:
[code]
Use the Python Package Explorer device.
[/code]

After LLM discovered and read the source code, they created the HTML resource by providing the following guidelines:
[code]
Create a new program called pypi-changelog. a package that uses the PyPI API to obtain the wheel URLs of all available versions of a package and then displays them in a list with a” Show changes” button that is clickable in between the wheels and displays a nicely rendered diff representing the difference between the two, as close to a standard diff format as you can get with JS libraries from CDNs, and when that is displayed there is a” Copy” button that copies that diff to the clipboard.
[/code]

These guidelines should be summarized as follows:

Create a brand-new program called “pypi-changelog.” using the PyPI API to obtain vehicle URLs for all current versions.
– Screen a” show modifications” button for each set between the two.
To see the differences between the different wheel components, click the” Show adjustments” option.
Use a Caching’s JS library to display diffs as close to the standard diff format as possible.
– Set up a” Copy” button so that when clicked, the diff’s items are copied to the folder.

Major capabilities and methods
Willison provides a list of the essential features and methods for using HTML tools:

The most important input/output technique for HTML equipment is copy and paste.
Troubleshooting tools can be created by creating them, such as console debugging and , as a great way to explore the possibilities of HTML tools.
Use URLs, LocalStorage, etc. for state resilience.
Use compatible APIs that LLMs like OpenAI, Anthropic, and Gemini offer.
Don’t be afraid to change files: JavaScript can also generate files for download and immediately access file contents.
Usage of Pyodide and WebAssembly: Run Python script in a computer and download software created in different languages.

Summary
Recording all relations with LLM is, according to Willison, just as crucial as trends and practices. Recording and publishing these will help you learn how to use LLM. He concludes by stating that if you want to create your own HTML tool, you can use GitHub Pages as a free GitHub store, copy and paste the HTML pages you generate using your chosen approach, and start developing straight away.

Leave a Comment