- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between XML and HTML
In this post, we will understand the difference between HTML and XML.
HTML
It refers to Hyper Text Markup Language.
It helps create web pages and applications.
It is a markup language.
It helps create static pages as well.
It helps display data.
It doesn’t transport data.
HyperText helps define link between multiple web pages.
Markup Language helps define text document using tags, which gives a structure to the web page.
It helps annotate the text so that a system can understand it and use it.
It ignores minor errors.
It is not case sensitive.
There are specific number of tags in HTML.
These tags are predefined.
It doesn’t preserve white spaces.
Closing tags are not a necessity.
An example of HTML −
Example
<!DOCTYPE html> <html> <head> <title>My title</title> </head> <body> <h1>title</h1> <p>A sample</p> </body> </html>
Output
XML
XML stands for ‘eXtensible Markup Language’.
It is case sensitive.
It doesn’t allow errors.
It helps provide a framework that would define markup languages.
The tags are user defined.
These tags are extensible.
The white space can be preserved.
The tags help describe data.
These tags aren’t used to display data.
The closing tags are required.
It helps create web pages and applications.
It is dynamic since it helps transport data.
The design goals focus on simplicity, usability across internet.
It supports Unicode.
It can also be used to represent arbitrary data structures required for web services.
An example of XML −
Example
<?xml version = "1.0"?> <contactinfo> <address category = "type"> <name>Mark</name> <College>MIT</College> <mobile>6787878</mobile> </address> </contactinfo>
Output
Mark MIT 6787878
- Related Articles
- Difference between JSON and XML
- HTML vs XML
- Difference between HTML and HTML 5
- Difference Between HTML and ASP.
- Difference Between HTML and CSS
- Difference between JavaScript and HTML
- Difference Between RTF and HTML
- Difference between WML and HTML
- Difference between XHTML and HTML 5
- What is the difference between HTML tags and ?
- Difference between :focus and :active selector in HTML
- Difference Between GET and POST Method in HTML
- Difference between an id and class in HTML
- How to display XML in HTML in PHP?
- What is the difference between text() and html() in jQuery?
