top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How does HTML differ from XHTML ? And XHTML differ from XML?

+4 votes
368 views
How does HTML differ from XHTML ? And XHTML differ from XML?
posted Feb 26, 2014 by Khusboo

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

1 Answer

+1 vote
 
Best answer

HTML
Tags can be written in any case (uppercase or lowercase).
Some tags do not need to be closed.
HTML is parsed by systems based off of the Standard Generalized Markup Language (SGML).
HTML provides less accurate reading, and needs more time to read and manipulate data.
Some parsers cannot even manipulate HTML data, which is a big problem with more finicky devices (like mobile devices).

XHTML
Tags must be written in lowercase.
All tags must be closed.
Tags must be properly nested -- no overlapping elements.
XHTML is parsed by XML parsers.
XHTML provides more accurate reading, and requires less time to read and manipuate data.
If a device can parse XML (which many modern devices can), the device can manipulate XHTML data to their needs (for example, to fit a website into the screen of a mobile phone).

XML
XML is a meta language. A meta language is a language that provides a syntax mechanism for creating other languages without constraining expression through a predefined grammar. XML is defined in the SGML doctype language. Adherence to the strict syntax requirements of XML is called well-formedness, which is a practice of precise accuracy to a stated set of requirements in an effort to achieve uniform processing of a document across various different applications and user agents.
XML is a syntax: it defines how you write data, but not what data you can write. For example:

<test somthing="stuff">data</test>
answer Feb 26, 2014 by Amit Kumar Pandey
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!

+3 votes

What is XHTML Modularization?

...