Difference between HTML and XML
It is a markup language that displays data and describes a web page’s structure. HTML is used to create web pages that contain text, images, links, etc.
It is a text-based markup language designed especially for web documents. XML defines a set of rules and instructions for encoding documents in a format that is human-readable and also machine-readable.
HTML vs XML:
|1. It stands for Hypertext Markup Language||1. It stands for Extensible Markup Language|
|2. It is a predefined markup language||2. It is a text-based markup language that has a self-describing structure.|
|3. HTML is not case-sensitive||3. XML is case-sensitive|
|4. HTML is a static language||4. XML is a dynamic language|
|5. White spaces are not preserved in HTML.||5. White spaces are preserved in XML.|
|6. HTML has its own predefined tags||6. XML has its own extendible tags|
|7. In HTML, Some tags do not have a closing tag||7. In XML, it is mandatory to close each and every tag|
|8. HTML is used for designing a web page that is rendered on the client side||8. XML is used to transfer the data between the application and the database|
|9. In HTML, there is no need to use quotation marks to represent attribute values||9. In XML, the attribute value must be enclosed within the quotation marks|
|10. HTML ignores small errors and renders the content on the web browsers||10. If there are some errors in the XML code, it cannot be parsed|