There are various technologies used for web development such as CSS, JavaScript, PHP etc. Among all these, the base language for web development is HTML. It is a markup language that consists of tags. There are specific tags for each task. HTML can be used to change the structure of the web page. Adding paragraphs, changing headings, adding lists and tables are some tasks that can be performed using HTML. There are several versions of HTML. The latest version is HTML5. It has many additional features to build effective web applications. 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 key difference between HTML and SGML. HTML is based on SGML. This article discusses the difference between HTML and SGML.
CONTENTS
1. Overview and Key Difference
2. What is HTML
3. What is SGML
4. Relationship Between HTML and SGML
5. Side by Side Comparison – HTML vs SGML in Tabular Form
6. Summary
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.
HTML can be combined with other technologies. When it is combined with CSS, the web page appears more presentable. Connecting with JavaScript make the web page more interactive. It is the most common markup language for creating web pages.
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. |
Stands For | |
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.
Reference:
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
Image Courtesy:
1.’SGML’ By Dreftymac at English Wikipedia – SGML.svg, (CC BY-SA 2.5) via Commons Wikimedia