Compressed HTML for AI code generation. Fewer tokens, same output.
BHTML is the HTML module of BurnedLang β an experimental family of compressed symbolic languages designed for AI-assisted code generation.
Instead of writing verbose HTML tags repeatedly, an AI generates compact Unicode opcodes. A converter then expands them back into valid, standard HTML.
β’ β <div class="container">
β₯ β <header>
β
ββ¦βββMy Siteββ§β© β Full HTML boilerplate
BurnedLang is not a new programming language. It is a symbolic compression layer β a shorthand that LLMs can generate efficiently, designed to be expanded deterministically back into normal code.
LLMs operate within token budgets. Traditional HTML is token-heavy:
<div class="container">
<header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>Every repeated tag, attribute, and boilerplate fragment costs tokens. Over a large codebase, this adds up fast.
BHTML replaces the most frequent HTML patterns with single Unicode characters:
β’
β₯
β
β
β¦β³Β§index.html">Homeβ·β€
The AI generates far fewer tokens. The converter does the rest.
Human prompt
β
AI generates BHTML (compact Unicode opcodes)
β
bhtml.converter.py (string replacement, longest-first)
β
Valid HTML output
Reverse mode is also supported β compress existing HTML into BHTML:
index.html β converter (--reverse) β index.bhtml
python bhtml.converter.py input.bhtml output.htmlpython bhtml.converter.py input.html output.bhtml --reverse- Python 3.7+
- No external dependencies
The dictionary file (bhtml.dictionary.json) must be in the same directory as the converter.
BHTML uses Unicode symbols as atomic opcodes. Each opcode maps to exactly one HTML fragment.
| Opcode | Expands to |
|---|---|
β
|
<!DOCTYPE html> |
β |
<html lang="en"> |
βͺ |
</html> |
β¦ |
<head> |
β§ |
</head> |
β© |
<body> |
β« |
</body> |
β |
<title> |
β |
</title> |
| Opcode | Expands to |
|---|---|
β |
<meta charset="UTF-8"> |
β |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
β |
<meta name="description" content=""> |
β |
<link rel="stylesheet" href="style.css"> |
β― |
<script src="script.js"></script> |
| Opcode | Expands to |
|---|---|
β‘ |
<div> |
β |
</div> |
β’ |
<div class="container"> |
β£ |
<div class="card"> |
β€ |
<div class="row"> |
β₯ |
<div class="col"> |
β¦ |
<div class="grid"> |
β§ |
<div class="wrapper"> |
β¨ |
<div class="content"> |
β© |
<div class="sidebar"> |
βͺ |
<div class="hero"> |
β« |
<div class="footer"> |
| Opcode | Expands to |
|---|---|
β |
<section> |
β£ |
<article> |
β₯ |
<header> |
β¦ |
<footer> |
β |
<main> |
β |
<nav> |
| Opcode | Expands to |
|---|---|
β |
<form action="" method="post"> |
β |
<input type="text"> |
β |
<input type="password"> |
β |
<input type="email"> |
β |
<button type="submit"> |
β |
<textarea> |
β |
<select> |
| Opcode | Expands to |
|---|---|
Β€ |
class=" |
Β’ |
id=" |
Β§ |
href=" |
Β΅ |
src=" |
ΒΆ |
alt=" |
Β¬ |
placeholder=" |
Γ |
onclick=" |
| Opcode | Expands to |
|---|---|
Γ |
required |
Γ |
disabled |
Γ |
readonly |
Γ |
checked |
Full opcode list: see
bhtml.dictionary.jsonβ 130+ mappings total.
β
β
β¦
β
β
βMy Pageβ
β
β§
β©
β’
β₯
<h1>Hello World</h1>
β‘
β
<p>Welcome to my site.</p>
β
β
β«
βͺ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header>
<h1>Hello World</h1>
</header>
<main>
<p>Welcome to my site.</p>
</main>
</div>
</body>
</html>BHTML is built on a strict, simple model:
- String replacement only β the converter is not an HTML parser
- Longest match first β prevents partial replacements
- One opcode = one fragment β atomic, never merged
- Fully reversible β every
.bhtmlfile can be expanded back to valid HTML - JSON-driven β all mappings live in
bhtml.dictionary.json, nothing is hardcoded - No runtime β no interpreter, no compiler, no VM
Attribute opcodes replace the attribute name inside an HTML tag, not the tag itself.
β
<div Β€card"> β <div class="card">
β β‘Β€card" β <div>class="card" (broken!)
Pre-built layout opcodes (β£, β’, etc.) already include their class β never append attributes to them.
BHTML/
βββ bhtml.converter.py # CLI converter (BHTML β HTML)
βββ bhtml.dictionary.json # All opcode mappings
βββ bhtml.skill.md # AI prompt skill (for LLM integration)
βββ output.html # Example output file
βββ README.md
BHTML is the first released module. Planned modules:
| Module | Target | Status |
|---|---|---|
| BHTML | HTML | β Released |
| BCSS | CSS | π§ Planned |
| BJS | JavaScript | π§ Planned |
| BPY | Python | π§ Planned |
| BSQL | SQL | π‘ Concept |
| BJSON | JSON | π‘ Concept |
| BYAML | YAML | π‘ Concept |
- AI code generation with reduced token usage
- Prompt compression for large HTML codebases
- AI coding assistants generating boilerplate faster
- Tokenizer and compression research
- Educational experiments in symbolic language design
- BHTML is not meant for hand-editing in production
- Generated files should be expanded before manual maintenance
- The converter performs text replacement β it does not validate HTML structure
- Some complex custom attributes still require manual HTML syntax
BurnedLang is an experimental research project exploring symbolic source-code compression for AI systems.
It is not intended to replace HTML or any existing web standard. Its purpose is to reduce repetitive syntax overhead during AI-assisted code generation, while remaining fully reversible through deterministic converters.
Made with π₯ by BnBurned