Key Difference – HTML vs SGML
What is HTML?
HTML stands for Hyper Text Markup Language. Most web pages are connected together. A link to another web page is called a Hypertext. HTML contains tags that instruct the web browser on how to create the structure of the page. The headings, paragraphs, lists, tables come under web page structure.
Every HTML file has the document type declaration at the top. It tells the browser about the HTML version used in the document. The details of the web page are in <head> section. The content to display in the web page is inside the <body> section. There is a lot of tags to perform various tasks. The <h1>, <h2> etc are used to create headings. The <p> tag is used to separate paragraphs. Most tags have the corresponding starting tag and the closing tag. e.g. </h1>, </p>. There are formatting tags as well. The <b> is used to bold the text. The <u> tag is used to underline the text. The <i> tag is used to make the content italic. Some tags contain the starting and ending tags itself. The <hr /> is used to create a horizontal line in the page. If the programmer only writes <hr> without the slash, it still works. But it will not work with more precise XHTML. Those are some common HTML tags.
When opening the above HTML page in the web browser it appears as follows.
According to the above HTML file, the document declaration is at the top. It specifies that the HTML document is using HTML5. The head section and body section are included inside the starting <html> tag and closing </html> tag. The details of the web page is included in the head section. The content to display is in the body section. The <h2> tag defined a heading. The <b> is used to bold the specific piece of text. There are two paragraphs in the page.
What is SGML?
SGML stands for Standard Generalized Markup Language. It is a standard for defining markup languages. HTML is based on SGML. It is not in itself a document language. It is a description of how to specify the document. Therefore, it is a metadata. SGML was originally designed to share machine readable large projects in government and other industries. An SGML document consists of three sections. There is a declaration. The prologue contains the DOCTYPE declaration with other markup declarations. Then the instance itself. It contains one top most element and its content.
Main advantages of SGML are it can be created by considering the document structure than thinking about the appearance characteristics. They will be more portable because an SGML compiler can interpret any document by reference to its document type definition (DTD). Documents originally intended for the print medium can easily be re-adapted for other media, such as the computer display screen.
SGML is an international standard for specifying the description of the type and content of the digital documents. One drawback of SGML is that it does not support style sheets. The software becomes undeveloped because of the strong settings of SGML. Other than that, the data interchanging is also complex in SGML.
What is the Relationship Between HTML and SGML?
- HTML is based on SGML.
What is the Difference Between HTML and SGML?
HTML vs SGML
|HTML is the standard markup language for creating web pages and web applications.||SGML is a standard for defining generalized markup languages for documents.|
|HTML stands for Hypertext Markup Language.||SGML stands for Standard Generalized Markup Language.|
Summary – HTML vs SGML
Every organization nowadays maintain web pages. There are various technologies used for web applications. This article discussed the difference between HTML and SGML. HTML is the standard markup language for creating web pages and web applications. SGML is a standard for defining generalized markup languages for documents. That is the difference between HTML and SGML. HTML is based on SGML.
1.“What Is SGML (Standard Generalized Markup Language)? – Definition from WhatIs.com.” SearchMicroservices. Available here
2.“Standard Generalized Markup Language.” Wikipedia, Wikimedia Foundation, 18 Mar. 2018. Available here
3.“HTML Overview.” , Tutorials Point, 8 Jan. 2018. Available here