Meta HTML
Brian Fox's 1995 server-side web language, written as HTML-style tags with Lisp-like semantics. It is still used to build the GCC website three decades later.
Created by Brian J. Fox (Universal Access Inc.)
Meta-HTML (also written <Meta-HTML> and MetaHTML) is a server-side programming language for the web, created in 1995 by Brian J. Fox, the original author of GNU Bash. It was later owned and distributed by Universal Access Inc. of Santa Barbara, California. You write a Meta-HTML program as HTML: language statements are tags mixed freely into ordinary markup. A page goes through an interpreter that runs the Meta-HTML tags, passes all other HTML through untouched, and sends the resulting page to the browser. The 5.0 announcement quoted one description of it: “Server side includes on steroids.”
Meta-HTML came out in the same years as PHP, ColdFusion and Active Server Pages, and it never came close to their popularity. It became a GNU package, and its most lasting use is one few people would guess: the GCC compiler project’s website has been generated with it since 1999 and still is.
History and Origins
From Wells Fargo to a New Language
Fox explained where the language came from in an interview he wrote up for the distribution (dated July 1996). He first thought of it “sometime around Februrary [sic] of 1995”, while working on the Wells Fargo online banking website. He had to read posted form variables, pass cookies back and forth and build every page on the fly. He wrote a Scheme program on the back end as a prototype, but “you still had to write HTML by printing it out. I hated it.”
Around August 1995 he took a contract for a site with “like 27 different areas” that needed database integration and session tracking for everything. He started by writing libraries that parsed special tags. He said that soon “turned out we really needed a general solution”, so he wrote an interpreter with flow control and direct database access. He then showed it to friends and colleagues, naming Dante DeLucia and Henry Minsky, whose feedback he called valuable. Because they “didn’t have super fast machines”, he said, he rewrote the parser around that time with more efficient algorithms.
A Fast Start
The ChangeLog in the source distribution shows how quickly it grew. Its first entry, on 8 August 1995, already reads “Now at version 1.2”. User-definable macros arrived in 1.5 (13 August), a package system for variables in 2.1 (24 August), and on 26 August 1995 version 3.0 changed the parser so nested calls became readable. In Fox’s ChangeLog note, you “no longer have to quote your ass off”. An array lookup that used to be written
<set-var \"<get-var names[<get-var index>]>\"> = .... >
became
<set-var <get-var names[index]> = ... >
Code from late 1995 carries Fox’s samsara.com address and a “Brian J. Fox & Samsara Partners” copyright. On 8 November 1995 Joseph Arceneaux, also at Samsara Partners, posted to the IETF HTTP working group that “we have a new standard for extending HTML to include programming; we are calling our language Meta-HTML”, and asked which standards body to approach.
Universal Access and the Free Release
By 1996 the language belonged to Universal Access Inc. (ua.com). Version 4.0 is dated 31 July 1996. Version 5.00 followed in September 1996; its ChangeLog entry (16 September) reads “5.00! Welcome to the World.” The announcement called it “the first publicly available release of the Meta-HTML source code”. It credited the design and implementation to Fox and named Fox, Henry Minsky and Jarlath O’Carroll as maintainers. Minsky announced 5.01 on comp.infosystems.www.announce on 20 November 1996.
The source files are licensed under the UAI Free Software License, Version 1 (August 1996). The 5.0 announcement describes it as terms “identical to the GPL”. The FSF’s Free Software Directory later listed Meta-HTML as a GNU package under GPL version 2 or later, with Fox as maintainer.
Design Philosophy
Fox set out the reasoning in a white paper, The Meta-HTML Manifesto: A Dynamic Programming Language for WWW Applications. He argued that HTML is already “a weak scripting language” that runs on a generic machine called the browser, but one that is “missing variables, iteration, data structures and other general programming constructs”. In his view, general-purpose languages such as C, Pascal, Perl and Tcl were poor tools for web pages, because the code sat so far from the HTML it was supposed to produce.
He concluded that the syntax should be HTML’s own syntax:
“The syntax of META-HTML is the syntax of HTML.”
The interpreter does not recognise any HTML keywords and passes them straight through, just as a browser ignores tags it does not understand. A page that contains no Meta-HTML is simply returned as it is. The manifesto’s Hello World is just the text Hello World!, with no code at all.
Fox gave his reasons in the interview. He wanted “a language that would just let me write HTML wherever I wanted it, and not force me to go through quoting hell to get there,” and he did not want to write web applications in Perl, because “the results would be hard to maintain, and lengthy to build”.
Key Features
Tags as Function Calls
Every operation is a tag, and tags nest. Here a variable fills in an HTML attribute (from the manifesto):
<body <get-var body-spec>>
Functions are defined with <defun>, and the language takes much of its vocabulary from Lisp. An older Free Software Directory entry said it “resembles a cross between HTML and Lisp”. This example ships with the 5.x distribution in examples/copy-file.mhtml:
;;; <copy-file from to>
<defun copy-file from to>
;;; Read the existing stream.
<with-open-stream src <get-var from> type=file mode=read>
<stream-get-contents src file-contents>
</with-open-stream>
;;; Find out how big the file is.
<set-var size=<content-length file-contents>>
;;; If the file existed, and/or it had some size, write the output file.
<when <gt size 0>>
<with-open-stream dst <get-var to> type=file mode=write-create>
<stream-put-contents dst file-contents>
</with-open-stream>
<get-var size> bytes transferred.
</when>
</defun>
Lisp-style ;;; comments, <when>, <with-open-...> forms and keyword arguments make Meta-HTML read more like Emacs Lisp written in angle brackets than like PHP. The distribution even includes an Emacs mode, elisp/mhtml.el.
Language Constructs
According to the manifesto and the reference material:
- Variables and packages:
<set-var>and<get-var>work on named variables, which are grouped into packages that can be created, copied and switched between - Flow control:
if,ifeq,when,var-caseandwhile, withand,orandnot. A test is true when it evaluates to a non-empty value - Arithmetic: add, subtract, multiply, divide and remainder, using integer or floating-point maths depending on the inputs
- Arrays: several values stored under one name and indexed as
names[i] - Macros and new tags:
<defun>,<defsubst>,<defmacro>and<define-container>let programmers redefine existing HTML tags, which is how sites wrap every page in common headers and footers
Built-in Web Functionality
The 5.0 announcement listed the web features built into the language:
- Stateful sessions, with or without browser cookie support
- GDBM database storage, retrieval and searching, plus an interface to the mSQL database
- Network and file-system streams
- File upload and download over HTTP/1.0
- Extended regular expressions in string operations
Later 5.x releases added a generic SQL interface with mySQL support (5.06), a revamped module system (5.08), <encrypt>/<decrypt>, and an interface to gnuplot for drawing graphs on the fly.
Four Ways to Run It
From 5.0 on, the source distribution came with several interpreters:
| Component | Role |
|---|---|
| CGI engine | Runs under any Unix web server; later versions add a FastCGI engine and an Apache module (mod_mhtml.c, from 5.01) |
mhttpd | A complete web server with the interpreter built in |
mhc | A standalone processor, “much like Perl or Tcl” |
mdb | An interactive debugger, “with a feel similar to GDB” |
The 5.0 and 5.01 announcements listed pre-compiled builds for BSDI 2.0, HP-UX 10.10, IRIX 5.3, Linux on i386, OSF/1 3.0 on Alpha, Solaris 2.5 (x86 and SPARC) and SunOS 4.1.4. The ChangeLog also records ports to Windows NT and HP-UX 9.0 in version 3.75 (June 1996).
A Real-World Example: gcc.gnu.org
Meta-HTML’s longest-running job is the GCC website. On 23 November 1999 Gerald Pfeifer committed “First version of our new MetaHTML style”, and on 29 December the preprocessing script that runs every page through mhc. The style sheet redefines ordinary HTML tags so that page authors can keep writing plain HTML:
;;; Redefine the <title> tag to mention the GNU project.
<define-container title>
<verbatim><title></verbatim>
%body
<verbatim>- GNU Project</title></verbatim>
</define-container>
In an October 2007 thread Pfeifer explained the choice. One requirement was that “anyone editing our web pages should be able to just use plain HTML,” and “hardly any other tool offered” that. He also called MetaHTML “a master piece of not how to run a free software project”. FX Coudert had proposed replacing it at the end of September, noting it “was last released 1999 and apparently unsupported since then”. David Malcolm posted a Python port of the preprocessing in June 2018. Even so, the GCC repository’s bin/preprocess still calls mhc, and htdocs/style.mhtml was being edited as recently as July 2026.
Evolution
| Date | Milestone |
|---|---|
| Feb 1995 | Fox’s first idea, while prototyping Wells Fargo online banking in Scheme |
| Aug 1995 | Versions 1.2-3.1: macros, packages, readable nested syntax |
| Nov 1995 | Introduced to the IETF HTTP WG; mhttpd server nearing completion (3.25) |
| Jun-Jul 1996 | 3.75 (Windows NT, HP-UX 9.0 ports), 4.0 |
| Sep 1996 | 5.00, first public source release |
| Nov 1996 | 5.01: printable manual (about 96 pages), Apache module |
| 1997-1998 | 5.02-5.09 on ftp.gnu.org |
| Aug 1999 | 5.091, the last release on ftp.gnu.org |
| Oct 2003 | 6.10 and 6.11.01 listed on ftp.gnu.org as withheld pending authenticity checks |
| 2010 | Savannah project registered (reportedly in March) |
| Oct 2016 | Savannah news post on porting MetaHTML to modern GNU/Linux |
The 5.091 tree already contains a libcompiler directory for a byte compiler, though it holds only a Makefile and a design note about the parser interface. The manifesto names byte compilation and standalone binaries as future work, and Fox said in the interview that performance would improve “when the byte compiler and engine are finished”. The released versions do not show it ever becoming the default execution path, so its final state is uncertain. The 5.09 announcement also records a setback: “The disk containing my CVS repository (which contained detailed changelogs) died.”
Performance
The only performance statement from the authors is informal. In the 1996 interview Fox said the interpreter was “around the speed of Perl, or TCL, instead of C, or C++”. He gave no benchmark, workload or hardware, so this is a rough impression, not a measurement.
Current Relevance
Meta-HTML counts as historical. The GNU project page says it “is looking for a maintainer”, the last release on ftp.gnu.org dates from 1999, and Universal Access’s metahtml.com and metahtml.org domains no longer serve the project. The 2016 Savannah effort to get it building on modern systems described its progress as “very makeshift”. There is no official Docker image.
It still runs in at least one important place, though. The HTML pages in GCC’s wwwdocs repository are still processed with Meta-HTML’s mhc before they are published, more than 25 years after the last release on ftp.gnu.org.
Why It Matters
Meta-HTML was an early, thorough take on the idea that a web page should be the program, and that the dynamic parts should look like the markup around them. It worked that idea out in 1995, when most dynamic pages were still being printed line by line from CGI scripts. It was also a GNU package from one of the GNU Project’s earliest programmers, with Lisp-style macros, a debugger modelled on GDB and its own web server. Its long life inside the GCC project suggests it was good at the job it was designed for: letting people write plain HTML and have the repetitive parts filled in for them.
Timeline
Notable Uses & Legacy
GCC website (gcc.gnu.org)
Since late 1999 (style sheet committed in November, preprocess script in December) the GCC project's wwwdocs build has run every page through MetaHTML's mhc with a site-wide style.mhtml that redefines <head>, <title> and <body> to add headers, navigation and a standard footer. Replacements were proposed in 2007 and in 2018, but the style sheet was still being edited in 2026
The metahtml.com and metahtml.org sites
Universal Access served the language's own documentation, FAQ, mailing-list archives and download pages as .mhtml pages. The distribution ships the source for many of them, including the manifesto, the interview with Fox and the manual welcome pages
The 1995 client site that started it
Fox says he wrote the first version for a contract site, around August 1995, that had about 27 different areas and needed database integration and session tracking throughout. He has not named the client