HTML vs XML

Hello, Guy's.

Welcome to CodeWithWebDev's blog.

In this blog, we will see the difference between HTML and XML. Before that we will talk a little bit about both HTML & XML, then we will see the difference between HTML & XML. So let's get started. 





# What is HTML?

HTML stands for HyperText Markup Language, it is a standard text formatting language of the World Wide Web(WWW) used for creating and displaying pages/sites on the web. 

The word HyperText means a text that links to other information on the web.
Markup Language is the language of writing layout information within a document.
HTML is used to give a structure to our web page. We cannot create webpages/sites without using HTML. Think of HTML as the skeleton of our webpage without which the body won't be able to stand. HTML is not a case-sensitive language.

Note :

HTML is not a Programming Language, it is a Markup Language. 
Now you might ask why is it so, because we write code in HTML, so why not?
It is because programming languages have logic, rules, syntax, loops, and much more, but HTML does not have any of these so that is why it is not a programming language. We write the code inside tags, which acts as a markup for the content written inside it.

# History

HTML was created by Sir Tim Berners Lee in late 1991 but was not released officially.
HTML is an evolving language and over the years many versions have been released which made developing web pages easier for developers.

HTML 1.0 was released in 1993.
HTML 2.0 was released in 1995, with a few advanced features than HTML 1.0
HTML 3.0 was released later on which was better for designing webpages.
HTML 4.01 was released in 2012 & was the most used HTML version until HTML 5.0
HTML 5.0 is the latest version of HTML and is widely worldwide was released in 2014.

# Features

-Advantages:

  • It is platform-independent.
  • It is free to use.
  • It is case-insensitive.
  • It is very easy to learn and use.

-Disadvantages:

  • Dynamic web pages cannot be created using HTML
  • Does not have good security features.
  • It does not pass information to web pages.
  • All the browsers do not support all HTML tags.

# What is XML?

XML is a software & hardware-independent tool for storing and transporting data.
XML stands for eXtensible Markup Language, it is a Markup Language much like HTML. XML was designed to store & transport data, it was designed to be self-descriptive which means that the tags define the purpose. XML is W3C recommendation. 

XML does not do anything. It is just information wrapped in tags. See the example below.

ex:
<note>
<to> You </to>
<from> Me </from>
<subject> Learning Web Development </subject>
<body> Follow me to learn Web Development </body>
</note>

#History

It was standardized and created by W3C in 1996. There are currently two versions of XML.
XML 1.0 was released in 1998. It has undergone minor revisions since then, without changing the version number, it is now in its fifth edition. It is widely used since then.

XML 1.1, it was released on February 4, 2004. It contains a few features that are supposed to make XML a lot easier.

# Features

It is used mostly in the field of web development. It is used for data sharing & data storing. 

-Advantages

  • It separates data from HTML
  • It simplifies data sharing & transportation
  • It increases data availability

Now, let's see the difference.

# HTML vs XML


HTML

XML

It is a Markup Language.It is a framework for Markup Languages.
It is not case-sensitive.It is case-sensitive.
It has pre-defined tags.It has user-defined tags.
It is not necessary for closing tagsIt is necessary to have a closing tag.
HTML is static, can create static webpages.XML is dynamic, as transportation of data takes place.
It does not show whitespacesIt shows whitespaces.
HTML is used to display data and how it looks.XML is used to transport data, and share data.
It is a presentation language.It is neither presentation nor a language.


# Conclusion

In this article about HTML & XML, we learned about HTML 5 and XML and how they are different. There is not much detail about the features and history of XML, but I tried my best to explain it to you.  There is a lot to learn about XML. If you guys want to learn more about XML,  mention in the comment section I will also write an article on XML.

Thanks a lot for keeping calm and reading this.
You know what to do and how to proceed.
You can contact me in case of any doubt or if you need assistance.
Let me know your thoughts in the comment section.


Post a Comment

0 Comments