top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What is the relationship between SGML, HTML, XML and XHTML?

+2 votes
213 views
What is the relationship between SGML, HTML, XML and XHTML?
posted Oct 10, 2014 by Rahul Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

HTML and XML are both markup languages (hence the *ML). XML is a generic markup language suitable for representing arbitrary data, while HTML is a specific markup language suitable only for representing web pages.

HTML and XHTML are both subsets only of SGML, except that XHTML has additional specifications so that it also validates as XML. Think of XML as XHTML's influential godfather.

Because of this relationship to SGML across all 3 of these languages, there are a lot of similarities, but they are all considered different languages. However, much of what defines these languages is their restrictions on SGML.

  • HTML restricts SGML by defining a list of tags that are allowed to be
    used.

  • XML restricts SGML by not allowing unclosed or empty start and end
    tags, and forces attributes to be explicit. XML also has a large
    number of additional restrictions that are not found in SGML.

  • XHTML restricts SGML with the tags from HTML (with some exclusions,
    such as frameset, et al), and with the tag and entity restrictions
    from XML.

answer Nov 10, 2014 by Vrije Mani Upadhyay
Similar Questions
+2 votes

Is there a class/method we can use in VB.net to transform a website in html format to xml format? If there is can you please type the codes out thanks!

0 votes

Sorry for simple question, need to clean some queryhome code.

Can someone help me to find out the difference between these three: onclick, onmouseover, onmouseout.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...