HTML6
PROPOSAL · VERSION 0.1.0 · EXPERIMENTAL

A declarative extension layer for application-grade HTML.

HTML6 explores how far markup alone can carry state, interaction, forms, and navigation, before you need to reach for JavaScript — while staying backward compatible with every browser shipping today.

Not a standardIndependent proposal, unaffiliated with W3C/WHATWG
~2 filesReference runtime: html6.js + html6.css
MITLicensed, © 2026 Colm Lenehan
§01

What HTML6 is

HTML5 gave the web semantic structure. HTML6 is a proposal for the next layer up: declarative application behaviour — state, interaction, form lifecycle, and navigation — expressed directly in markup rather than assembled in JavaScript.

It ships today as a small runtime that reads plain HTML attributes and elements and wires up the behaviour they describe. Nothing about it requires a new parser or a new browser: unknown elements already degrade gracefully, and the runtime does the rest.

<html data-html-version="6"> — the only marker a document needs. Browsers without the runtime still parse the page as ordinary HTML5.
§02

Declarative state & actions

State lives in a <state> element instead of a JavaScript variable. Elements read it with when, and buttons mutate it with action — no event listeners written by hand.

<state name="menu" value="closed"></state>

<button action="toggle" target="menu">Toggle menu</button>

<div when="menu == open">
  The menu is open.
</div>
LIVE — toggle
The menu is open.

The same primitive extends to numeric state, so counters need no script at all:

LIVE — increment / decrement
0
ActionEffect
setAssigns value to the target state
toggleFlips a state between two declared values
increment / decrementAdjusts a numeric state by 1
show / hideForces a state to a visible / hidden value
§03

Forms with built-in pending states

Submission feedback — the disabled button, the "Submitting…" label, the error summary — is one of the most re-implemented patterns in every framework. HTML6 proposes expressing it declaratively.

<form>
  <input name="email" type="email" required>

  <button type="submit" pending-text="Submitting...">
    Submit
  </button>
</form>
LIVE — submit
Enter a valid email address.

This demo simulates a 900ms round trip: the button disables, its label swaps to pending-text, and a bare-required field surfaces an accessible error rather than the browser's default tooltip.

§05

Declarative components

Rather than inventing a competing component model, HTML6 leans on Shadow DOM that browsers already ship. A <component> wrapper just gives the declaration a name.

<component name="user-card">
  <template shadowrootmode="open">
    <article>
      <slot></slot>
    </article>
  </template>
</component>

<user-card>Colm Lenehan — Maintainer</user-card>
RENDERED
Colm Lenehan — Maintainer
§06

Accessibility is load-bearing, not optional

Every state change above the fold in this document announces through the same primitives assistive technology already understands: live regions for when transitions, disabled/aria-busy pairing for pending submits, and focus retention across partial navigation. None of it is automatic in every case — authors are still responsible for a coherent interface — but the defaults lean toward correctness.

§07

Browser compatibility

HTML6 is a compatibility layer, not a replacement parser. Any browser shipping today already parses unrecognised elements without error, so the runtime — two files, html6.js and html6.css — attaches the described behaviour on top of the DOM you already have. The repository's minibrowser/ directory documents one integration path, loading the runtime into a WKWebView as a document-end user script.