---
title: "Kition html: Web pages"
description: "Edit a web page as HTML source and see it rendered beside you as you type."
canonical: "https://kition.ai/kits/html"
---

> Canonical HTML: [https://kition.ai/kits/html](https://kition.ai/kits/html)

[Kits](https://kition.ai/kits) html

Publish with AI.

# Kition html

Edit a web page as HTML source and see it rendered beside you as you type. The preview comes from a renderer built into the kit, not a browser, so it runs offline and never reaches the network. Your AI can read the page, rewrite it, check it for linked files the preview cannot load and for script errors, and look at the result.

**For** people who keep single-page HTML files, such as flyers, reports, one-page sites and generated pages, and want an AI to edit them safely.

 Free, for macOS, Windows and Linux.

**Preview.** Kition html is in the desktop app as an early preview: try it, and expect gaps.

## What you can do

6 areas

### Source and live preview

Write HTML on the left and see the rendered page on the right.

-   A plain source editor next to a rendered preview of the same page
-   The preview updates as you type; Cmd/Ctrl+S saves
-   Undo and redo for every change, from you or your AI
-   New pages start as "Untitled HTML.html" at 640 × 480
-   If the file changes on disk, you choose: keep your edits or load the saved version

### HTML and CSS rendering

A Rust engine lays out and paints the page without a browser, a GPU or system fonts.

-   Flexbox, grid (including subgrid and template areas), floats and multi-column layout
-   Gradients, shadows, borders, blend modes, clip paths, transforms and SVG
-   Custom properties, cascade layers, :has(), container queries, media queries and dark mode
-   Tables, lists, counters, right-to-left text and vertical writing
-   A bundled Inter font, so plain text renders the same everywhere

### Scripts that run in the preview

JavaScript on the page runs inside the kit, so buttons, timers and canvas drawings show up.

-   Scripts written in the page, including ES modules and import maps
-   DOM and CSS changes, events, timers and requestAnimationFrame
-   Canvas 2D drawing: paths, gradients, transforms, clipping, text and images
-   Click the preview to trigger the page's handlers; time moves forward in 100 ms steps
-   Scripts cannot read your files or reach the network, and runaway loops are stopped

### Problems you can see

A diagnostics line under the preview lists what the page needs and the kit could not do.

-   Files the page links to, which the preview does not load
-   Script errors, with the message and line
-   CSS filter and backdrop-filter effects the renderer does not draw

### Your file stays your file

The saved page is exactly the source text, nothing added.

-   Saves back byte for byte, including a byte order mark, CRLF line endings and non-ASCII text
-   Clicks and timers in the preview never change the saved file
-   Undo is kept per person and per agent, so your AI can take back only its own steps

### Render from the command line

The kition-html program turns a page into a PNG or a terminal preview.

-   kition-html render writes a PNG of the page at the size and scale you choose
-   kition-html preview draws the page in your terminal in true color or ASCII
-   A dark mode switch and a folder of fonts and images you supply
-   Reads the page from a file or standard input, up to 16 MiB

## Opens and saves

2 formats

File formats Kition html opens and saves

| Format | Open | Save | Notes |
| --- | --- | --- | --- |
| .html | Opens | Saves | Saved as the exact source text; the preview matches Chrome in 76 of 128 measured layout and style cases |
| .htm | Opens | Saves | Same as .html |

## Ask your AI

5 commands

Kition html is an MCP server that follows KHP. Claude, ChatGPT, Cursor or any MCP agent uses the same 5 commands as the editor, in the file you have open. A few requests to try:

-   “Make the headline on index.html dark blue.”
    
    Reads the source with `html_inspect`, sends the edited page with `html.setSource`, then runs `html_check` and looks at the preview.
    
-   “Add a "Tickets" link under the date on the concert page.”
    
    Inserts the link into the source and replaces the page with `html.setSource` as one undo step, leaving the rest untouched.
    
-   “poster.html shows a broken image. Fix it.”
    
    `html_check` reports `html.resource-unavailable` for the linked picture, which the preview does not load; the agent puts it in the page as a data: URL or inline SVG, or drops it, and checks again until the list is empty.
    
-   “Click the "Show prices" button and tell me what appears.”
    
    Runs `html.click` at the button's position and reads the rendered preview; the saved file does not change.
    
-   “Undo what you just changed.”
    
    Runs `edit.undo`, which takes back the agent's last source change and keeps your own edits.
    

### What your AI can check

-   html\_check reports four problems: linked files the preview cannot load, script errors, CSS filters that are not drawn, and backdrop filters that are not drawn
-   html\_inspect with a preview returns the rendered page as an image, so the agent can look before it reports back
-   html.click and html.advance let the agent test buttons and timers without touching the saved file

[How KHP works](https://kition.ai/khp)

## Good to know

Current limits

-   The preview is not Chrome: 76 of 128 measured layout and style cases match Chrome closely, and 551 of 843 supplementary cases do
-   The editor is a plain text editor: no syntax highlighting, no visual drag-and-drop editing
-   The preview loads no file but the page: images, stylesheets and scripts it links to are not loaded, even from your workspace. Write CSS and scripts in the page, and pictures as data: URLs or inline SVG
-   Some form controls are incomplete: select drop-downs and list boxes are not drawn, and number, date and colour inputs are partial; typing into the rendered page is not wired up yet
-   Not every browser API exists: no network requests, Shadow DOM, document.write or full framework support; canvas shadows, patterns and filters are missing

## Embed it

### Embed it in your product

Kition html ships as a self-contained package, an editor plus a WebAssembly engine, that any web product can embed in an iframe.

[Embed a kit](https://developer.kition.ai/)

## Questions

### Does the HTML kit use a browser to show the page?

No. It renders the page with its own engine, built in Rust on open-source projects such as Blitz, Stylo and Vello. It needs no browser, GPU or network. Chrome is used only to test how close the result is.

### Will it change my HTML when I save?

No. The saved file is the source text you see, byte for byte. Clicking the preview or letting its timers run does not change the file.

### Does JavaScript run?

Yes, inside the kit. Scripts, modules, events, timers and canvas drawing run in the preview. They cannot read your files or reach the internet, and each session has limits that stop runaway loops. Some browser APIs are missing.

### How close is the preview to Chrome?

It is measured. In the kit's 128-case layout and style corpus, 76 cases reach 99.9% similarity with Chrome. In a second set of 843 cases, 590 of them with JavaScript, 551 do. Treat the preview as a close draft, not a browser.

### How does my AI edit a page?

It reads the whole source, changes it, and writes it back with html.setSource as one undo step. Then it runs the check and looks at the preview. There are no per-element commands; the source is the document.

### What does it cost?

The HTML kit is free in the Kition desktop app.

[Previous kit**note**](https://kition.ai/kits/note)[Next kit**motion**](https://kition.ai/kits/motion)

Kition html is free in the desktop app.
