What is the difference between XML and HTML?

XML and HTML are two different types of markup languages. While they make look similar at first glance, in reality they have quite a few differences between them.



Is a markup language itself

Provides a framework to define markup languages.

Primarily used to store data

Primarily used to display data

Is primarily used to store and transport data

Is primarily used for designing webpages

Focuses on what data is

Focuses on how data looks

Is case sensitive

Is not case sensitive

Is dynamic in nature

Is static in nature

Is extensible, i.e. can create new tags

Cannot create new tags. Had standard predefined tags.

Preserves white spaces

Does not preserve white spaces

Is neither a presentation language nor a programming language

Is a presentation language

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.