SGMLguid, also known as "CERN SGML",[1] "Waterloo based SGML",[2] and "Waterloo SGML",[3] was an early SGML application developed and used at CERN between 1986 and 1990. It served as a model of the earliest HTML specifications.

In 1984, CERN started the CERNDOC project, a document filing and retrieval system that would standardize CERN's manifold and mutually incompatible documentation practices.[4] The project adapted an earlier documentation system developed at the Rutherford Laboratory, a British particle physics research facility.[5] Written in the Rexx programming language, installed on an IBM 3090-200 mainframe computer, and running on the VM/CMS operating system,[4] the system stored tens of thousands of documents in a hierarchical structure. It offered keyword searching and was able to display documents on a screen or send them to a printer.[6]

CERNDOC supported two markup systems: a GML application named CERNPAPER, developed locally in 1985,[7] and a SGML application created in 1986 by Anders Berglund, who was at the time responsible for text processing in the CERN data handling division. Berglund mapped a Waterloo SCRIPT macro set onto SGML, basing his application on the document type defined in Annex E of ISO 8879[1] and on AAP DTD, the American Association of Publishers' document type.[9][5] Prior art also includes the IBM GML starter set.[10][11][12] The application features an extensive tag set for preparing foils, memos, letters, scientific papers, and manuals, amongst other use cases.

In 1990, when Eric van Herwijnen acted as head of text processing in the CERN Administrative Services Department, CERN replaced CERNDOC with the IBM Document Composition Facility (DCF), thereby obsoleting both CERNPAPER and SGMLguid.[2] To replace these applications, Herwijnen and Michel Goossens mapped IBM's Bookmaster macro sets onto a number of DTDs.[3][13]

Tim Berners-Lee, who was working as a CERN contractor when he created the Web, encountered CERNguid in October 1987, when CERN's Online Computing Group started to maintain its documentation in CERNDOC. Berners-Lee found its hierarchical structure highly limiting.[6]

For HTML, Berners-Lee adopted SGML syntax and a subset of the tags specified in CERN's SGMLguid.[5]