Preprocessor for the HTML Standard
Component Pascal Pascal Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Wattsi is a build tool for creating the HTML Standard from its source. It works in concert with other scripts.



  • Number the sections
  • Create Table of Contents
  • Cross-reference <span> and <code> to <dfn>
  • Create small TOC
  • Cross-reference back (<dfn> menu)
  • Strip out unused references
  • Spec splitting
  • Add annotations
  • Add syntax-highlighting markup to <pre> contents

Wattsi Syntax

For documentation on the "Wattsi language", e.g. things like data-x or w-nodev, see


Wattsi is written in Free Pascal. You'll need to install the 3.0.0 FreePascal compiler or newer to build it. With that installed, you should be able to run ./ to create the wattsi executable and supporting shared libraries.

We hope to in the future provide precompiled wattsi binaries, built via continuous integration, for Wattsi. If you think you can help with this, please file an issue to get the discussion started! In the meantime, we do provide the wattsi-server service, which allows you to upload files to a server that will run Wattsi for you.

Building a Wattsi binary with 64-bit code

On Mac OS X (and perhaps on other systems as well), the FreePascal compiler defaults to generating 32-bit code. If for some reason you need to build a wattsi binary with 64-bit code, you can do so by adding -Px86_64 to the DEFINES line in the src/ file, so that it looks like this: