imbue
Docs pages

Docs / For developers

HTML pages

An HTML page is a kind of page whose content is one HTML document. Worlds shows it in a sandbox, styled to match the rest of your pages. It is for things blocks cannot do well: a calculator, a tracker with its own logic, a designed one-page report, or a small interactive explainer.

HTML pages are not in the current release of Worlds. This page describes them as they will arrive in a coming release.

Creating an HTML page

  1. Create the page

    In the Windows app choose New HTML page from the New menu (after Drawing) or from the command palette. Its description: "A designed page in HTML: a tool, a tracker or a report". The page starts with starter content in your interface language.

  2. Write it, or ask Claude

    Switch between Page and Source. In Source mode the editor sits beside the running page. Or ask Claude to build the page for you.

  3. Saving is automatic

    The source is saved a moment after your last keystroke. If it breaks a rule you see Not saved with the reason, and the page keeps its last good version.

The rules

These rules protect your computer and your pages. If one is broken, saving is refused with the reason:

  1. One self-contained document, at most 1 MB. A full document, or just the <body> content, which Worlds wraps.
  2. Nothing from the network. No <script src>, no stylesheet or @import from an address, no images, video or audio from a link. Images are inline SVG or data: addresses. The sandbox blocks the network entirely.
  3. No embedding or redirects. No <iframe>, <object>, <embed>, <base>, <meta http-equiv> or <form action>.
  4. Scripts are inline only. They run with no network, no cookies or storage, and no access to Worlds or other pages.

Design rules come back as warnings, and the page is still saved:

Plain HTML elements (headings, paragraphs, lists, tables, buttons and inputs) are already styled like Worlds. There are ready classes such as .w-card for a card, .w-stat for a figure with its label, .w-bar for a progress bar and .w-grid for wrapping columns.

Keeping data: worlds.save

The page cannot use browser storage. To let a calculator or tracker remember what you entered, it uses the worlds object:

worlds.state
The JSON value the page last saved, or null
worlds.save(value)
Keeps a JSON value with the page, up to 256 KB. A larger value throws an error.
worlds.lang
"ar" or "en", the app's language
<button id="add">+1</button> <b id="n"></b>
<script>
  let count = (worlds.state && worlds.state.count) || 0;
  const show = () => { document.getElementById("n").textContent = count; };
  document.getElementById("add").onclick = () => { count++; worlds.save({ count }); show(); };
  show();
</script>

People who cannot edit the page can call worlds.save, but nothing is kept for them.

Links: https:// and mailto: open in the browser after you click. worlds://page/ followed by a page id opens another Worlds page.

On each platform

PlatformWhat you see
WindowsThe page runs inside Worlds, with Source mode to edit it. Its height follows its content.
AndroidThe page fills the screen and runs without internet, and worlds.save works. The source is read only: "Runs here without the internet. Edit its source in Worlds on the desktop."
iPhone, iPad and MacThe page fills the screen and runs without internet, and the source is read only. worlds.save works when the page is in a workspace or local copy that can be written to; otherwise you see "Read only".

On phones, links open only right after you tap them, and the page gets a 16 px edge.

How Claude writes them

Ask Claude in a chat for an HTML page, such as "a calculator for my grade average" or "a tracker for this month's spending". It has three tools:

It can also create a new HTML page directly. Before every write Worlds saves a version of the page, so you can undo any change from History. The same tools are available to any program connected through the MCP server.

The visible text of an HTML page is included in search like any other page.

Read next