HTPL v0.2 IS HERE— Rust-like memory, two runtimesNo garbage collector · Runs on Pages
htpl run playground/app.htpl

Faster, cleaner, easier
full-stack development

HTPL is the Hyper Text Programming Language you will love! It gives you HTML, CSS, JS, TypeScript and Node + Python-style APIs in one file — so you write less code and build faster.

★ Runs in your browser — no server needed · 15 examples inside

Faster development
Cleaner HTML
One file, full stack
Rust-like memory
No garbage collector

Types

numberstringboolarrayobjectnull

Semantic colours

primary · secondary · accent · info · success · warning

No GC. Ownership, move, borrow, drop.
Runs on Pages, like Vite.

don't split your app
every time

In a normal stack you write HTML, then JS, then a Node server, then Python scripts. Thousands of lines just to glue it all together.

instead of writing
3 apps

For every feature, every page, every project, again and again…

use one file

It's descriptive, faster, cleaner and easier to maintain. One .htpl file is the whole app — like python app.py.

Take HTML
to the next level

HTPL adds programming to HTML — var, if, for, func, server and more. And it's still HTML underneath, so daisyUI classes like btn, card and toggle work exactly as they do anywhere else.

See all examples

No more glue code

Write fewer files. Use one language. Modify it with HTPL tags.

app.html  +  app.js  +  server.js
3 files, 3 languages, glue everywhere
app.htpl
1 file. HTML + logic + server.

Fewer files.
Faster development.
Smaller apps.

Files per app
1
instead of 3+
Runtimes
2
TypeScript + Rust, same output
Examples
13
Hello to borrow-scope
Garbage collector
0
Ownership, move, borrow, drop

Highly customizable
Powered by daisyUI

HTPL is still HTML, so style it with anything — daisyUI, Tailwind, or plain CSS. This very page is styled with daisyUI.

See it live ↓
<a class="btn btn-primary">Button</a>
<div class="card bg-base-100">Card</div>

Pure HTML.
Runs everywhere.

HTPL builds to plain HTML + CSS + JS. It works on Cloudflare Pages, Vercel, Netlify and GitHub Pages — and the Rust binary runs .htpl with no Node at all.

Two runtimes, one language

TypeScript for building, Rust for shipping — 3.5 MB binary, ~2 ms startup, same output, same memory rules.

15 examples
2 runtimes
endless possibilities

Mix and match HTPL tags to build anything.

Examples

01-hello02-vars03-if-input04-for-array05-while-func06-object-json07-counter08-todos09-fetch10-fullstack11-move12-borrow13-borrow-scope14-stdlib15-animations

Pick one in the Playground below — its source loads automatically.

Memory, like Rust

Copy types: number, bool, null. Move types: string, array, object. Assigning a bare Move variable moves it. Borrow with &: many immutable borrows or one mutable borrow, never both. No assigning while borrowed. Borrows end at scope end.

Copy: number, bool, nullMove: string, array, objectBorrow: & and &mut

Playground

Pick an example, edit it, press Run. Runs in your browser — no server needed. Input and server are not supported inside eval.

Output will appear here.