This page is written in Fixed-Point HTML. When the HTML
is parsed and then re-serialized by a browser, it is identical to the
original source code. In other words, it is a
"Fixed
Point" in the browser's parse-serialize functionality. The source is
invariant, no matter how many round-trips it makes through
outerHTML
, it will always be the same.
Fixed-Point HTML can be checked on the fly in the browser. Simply compare the page's source code against the serialized document's HTML (plus doctype). I.e., the following expressions will always be true for Fixed-Point HTML (before DOM modification):
await (await fetch(document.location.href)).text()
===
'<!DOCTYPE html>\n'+document.documentElement.outerHTML
Press the button to check the page. View source to see the code.
For the most part Fixed-Point HTML is the same as typical text-book HTML. However the syntax is very regimented. Some highlights:
html
and head/body
elements>
)</p>
)<br>
instead of <br />
)<img src="a.jpg" alt="">
instead of <img src = 'a.jpg' alt >
)I could claim that Fixed-Point HTML is an aid to writing consistent and error-free HTML (which it can be), but the real reason to code in Fixed-Point HTML is simply the satisfaction of knowing that you and the browser are in total agreement about the HTML.