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
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.
For every feature, every page, every project, again and again…
It's descriptive, faster, cleaner and easier to maintain. One .htpl file is the whole app — like python app.py.
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 examplesWrite fewer files. Use one language. Modify it with HTPL tags.
app.html + app.js + server.js
3 files, 3 languages, glue everywhereapp.htpl
1 file. HTML + logic + server.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>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.
TypeScript for building, Rust for shipping — 3.5 MB binary, ~2 ms startup, same output, same memory rules.
Mix and match HTPL tags to build anything.
Pick one in the Playground below — its source loads automatically.
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.
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.