HTML versus K2F

HTML+CSS is a document that reflows. K2F is a document whose published pixels do not. They can live on the same site — this one — without being the same format.

K2F is not a lossless superset of HTML. Do not preview a K2F tree by rendering it as HTML.

At a glance

TopicHTMLK2F
What the file isTags + CSS the user agent layoutsSemantic tree + geometry lock in a ZIP
Pixel-stable pagesNo (viewport reflow)Yes — viewers paint document.K2F.lock
Agent-stable node idsFragile DOMYes — dotted ids in the semantic tree
Semantic roles vs presentationTags mixed with CSSRoles + Theme; no inline CSS in State A
Integrity bannerNoRequired
Engine / reader mismatchUser-agent differencesENGINE_MISMATCH is hash provenance; viewers stay UNSIGNED/SIGNED

What HTML is good at

HTML is the right choice for websites, apps, and anything that should reflow on a phone. This adoption portal is HTML. Navigation, docs chrome, and these compare pages are HTML on purpose.

Tags mixed with CSS are a feature for the web and a problem for a lock: two browsers, two zoom levels, two pages.

What K2F adds

Official viewers are a WASM host. They paint document.K2F.lock. Body text of a package is not CSS flow. Agents edit JSON nodes, not a DOM that a script might rewrite.

Integrity banners are required. An HTML page has no SIGNED / BROKEN_INTEGRITY contract in the format.

Honest losses versus HTML

  • No reflow. A K2F page is page-fixed, like PDF, not like a responsive article.
  • No inline CSS in State A. Styling belongs to the theme. That is stricter than HTML.
  • This site’s HTML is not the document. Canvas / WASM output is invisible to crawlers — which is why compare pages still state the facts in HTML and in /compare/html/index.md.

When to pick which

  • Stay on HTML for sites, apps, and responsive reading.
  • Use K2F for paged artifacts that agents edit and humans print or archive with stable pixels.
  • Do not render State A as HTML to “preview” it. Use the official viewer or the playground.

See Why K2F and the Compare matrix.