htmlsgml

Was HTML first implemented using SGML?


This is a question from a past exam paper.

HTML was first impelmented using 1. C++ 2. Java 3. Standard Generalized Markup Language (SGML) 4. none of the above

I think the answer to it is SGML because here on this link (https://www.w3.org/MarkUp/html3/HTMLandSGML.html), it says "HTML is an application conforming to International Standard ISO 8879 -- Standard Generalized Markup Language (SGML)"

the answer could very well be "none of the above" but I'm not sure. I have tried to google it but have not hit gold yet.

Can someone please confirm how was HTML first implemented?


Solution

  • From the Wikipedia entry for SGML:

    While HTML was developed partially independently and in parallel with SGML, its creator, Tim Berners-Lee, intended it to be an application of SGML.[citation needed] The design of HTML (Hyper Text Markup Language) was therefore inspired by SGML tagging, but, since no clear expansion and parsing guidelines were established, most actual HTML documents are not valid SGML documents.

    Later, HTML was reformulated (version 2.0) to be more of an SGML application, however, the HTML markup language has many legacy- and exception- handling features that differ from SGML's requirements.

    HTML 4 is an SGML application that fully conforms to ISO 8879 – SGML.[14]

    So the answer is that while it was first implemented using SGML-type markup, but it was in parallel rather than as a direct decendant of SGML.

    Further, on the same article, the World Wide Web Consortium states:

    The charter for the 2006 revival of the World Wide Web Consortium HTML Working Group says, "the Group will not assume that an SGML parser is used for 'classic HTML'".[15] Although HTML syntax closely resembles SGML syntax with the default reference concrete syntax, HTML5 abandons any attempt to define HTML as an SGML application, explicitly defining its own parsing rules,[16] which more closely match existing implementations and documents. It does, however, define an alternative XHTML serialization, which conforms to XML and therefore to SGML as well.

    (my emphesis)

    Therefore the answer is clearly "No - none of the above". XML can be classed as a SGML markup but HTML 1 is not, HTML 2 is, HTML 3 and 4 are not and HTML 5 uses it's own markup.

    Time spent reading Wikipedia: 3 minutes.