XML vs HTML
Is XML same as HTML??XML may look like HTML to anyone who knows basics of HTML. The reasons are given below:
- HTML and XML look similar, because they are both SGML languages (Standard Generalized Markup Language)
- Both HTML and XML use elements enclosed in tags.
- Both use tag attributes.
- Both use entities.
- HTML focuses on how data looks to the viewers while XML describes and carries data to be processed by computers.
- HTML describes the structure and appearance while XML describes only the meaning.
- HTML uses a fixed, unchangeable set of tags while XML has only user-defined tags.
- Most of the browsers correct the errors or slackness in HTML code while XML is very strict about the rules.
- There are many tags in HTML that do not have a closing tag. In XML it is compulsory for every tag to have a closing tag as well.
- HTML is a language in itself that can change the look of a web page while XML cannot do anything by itself and is used in conjunction with other languages.
