What is XML?
XML stands for (Xtensible Markup Language) and are used to create web pages and web applications. XML is a dynamic language because it is used to transport the data only not for the data displaying. The XML simply focused on simplicity, generality, and usability all over the Internet. This language is a textual data format that has strong support through the Unicode for different human languages. XML also focuses on documents, this language is widely used for the representation of arbitrary data structures like XML is used in web services. XML is also case-sensitive.
The basic unit in the XML is generally known as an element and the Extension of the XML file is written as “.xml”. XML tags are written between angular brackets(< >).
Example,
<Data>
<Name>Mohit</Name>
<email>Mohit123@gmail.com</email>
<Contact>+1232763589</Contact>
</Data>
Output:
Name-Mohit
Contact-+1232763589
What is HTML?
HTML stands for HyperText Markup Language which is used to make and design web pages and web applications. HTML is a markup language. With HTML we can create and design our own static page. This language is only used for displaying the data, not for the transportation of data. HTML is the fusion of Hypertext and Markup language it also defines the link among the web pages. This markup language is used for defining the text document within the tag which gives the structure of web pages. The tags are the words between the <angle brackets> and separate standard text from HTML code. The output is displayed on web pages in the form of tables, images, diagrams, etc.
Example-
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1> First Heading</h1>
<p> First Paragraph.</p>
</body>
</html>
Output:
First Heading
First Paragraph.
What are the Differences Between XML and HTML?
As we have seen a brief introduction to XML and HTML Languages. We will now study the difference between XML and HTML Languages. The major differences between these two languages are explained in the table provided below:
Difference Between XML and HTML | |
XML | HTML |
The term HTML stands for HyperText Markup Language. | The term XML stands for extensible Markup Language. |
This Language is static language. | This Language is a dynamic language. |
This Language is a markup language. | This Language provides a framework to define markup languages. |
HTML can ignore small errors. | XML does not allow errors. |
This Language is not Case sensitive. | This Language is Case sensitive. |
HTML tags are predefined tags and there is a limited number of tags. | XML tags are user-defined tags and these tags are extensible. |
HTML does not maintain white spaces. | White space can be maintained in XML. |
HTML tags are used for displaying the data. | XML tags are used for describing the data not for displaying it. |
In this language, closing tags are not necessary. | In this language, closing tags are necessary. |
It displays the data. | It is used to store data from the database. |
Comments
write a comment