Difference between HTML and XML
Main difference
Both HTML and XML are markup languages extended from SGML. The main difference is its design purpose. HTML was designed for data visualization to focus the look of the data. XML was designed to store and transport data. HTML was invented in 1990, while XML was invented in 1996. HTML is static type while XML is dynamic type.
What is HTML?
HTML is the markup markup used for displaying web pages and designed for displaying data to focus the appearance of the data. HTML is static and SGML is extended. It was invented in 1990 with Presentation type language. Your tags are predefined and whitespace cannot be preserved in HTML. HTML has no strict processing rules.
What is XML?
XML is the markup language designed to store and transport data. It is the set of rules for making data human and machine readable by data encoding. It is a dynamic type invented in 1996. The author can create custom tags using XML and preserves whitespace. XML is not a presentation-type language or a programming-type language. XML has to follow strict rule, otherwise the render file will end.
Key differences
- HTML was designed for data visualization to focus on the appearance of the data, while XML was designed to store and transport data.
- HTML is used to display web pages, while XML is not used to display web pages.
- HTML was invented in 1990, while XML was invented in 1996.
- HTML is static type, while MXL is dynamic type.
- In XML, the author can create custom tags, but in HTML custom tags are predefined.
- XML can preserve whitespace whereas XML cannot preserve whitespace.
- HTML is a presentation type language, while XML is not a presentation type language or a type of programming.
- HTML has no strict processing rules, while XML has to follow strict rule, otherwise the render file will be terminated.