what is the difference between html and xml?
what is the difference between html and xml?
To brief you, HTML has defined tags you can not change them while XML allows you to create your own tags(customized tags) and use them accordingly.
HTML would define the format and layout (with the use of CSS) of what you want to 'layout' and XML would carry the content or 'Data' that you would use within the HTML.
Ok this doesn't really help. Great one focuses on what data is and one focuses on how it looks. That doesn't make any sense to me. I really like that fact that you can make your own tags. How would that work? Like PHP where you define it with $myVariabel and then call on it? If so where does the CSS and PHP come in?
HTML was designed to display data with focus on how data looks while XML was designed to be a software and hardware independent tool used to transport and store data, with focus on what data is.
HTML is predefined while XML can be defined by you as well.
HTML is a Hyper Text Markup Language.html Use only Predefined Tags.Where as HTML is use for static it means content is not changed page will alway reloaded.
XMLis a Extensible Markup Language..XML users create their own tags.And XML is dynamic which means content is changed every time page is reloaded.
HTML is an abbreviation for HyperText Markup Language while XML stands for eXtensible Markup Language. Actually it is clear in mind that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data. To design XML and HTML have different goals like XML was designed to transport and store data, with focus on what data is. And that of HTML was designed to display data, with focus on how data looks. XML is now as important for the Web as HTML was to the foundation of the Web. XML is the most common tool for data transmissions between all sorts of applications.
The Difference are as follows:-
1.HTML focus on how data looks and it was designed to display data while XML focus on what data is and it was designed to be a software and hardware independent tool used to transport and store data.
2.HTML is a markup language itself while XML provides a framework for defining markup languages.
3.HTML is a presentation language while XML is neither a programming language nor a presentation language.
4.HTML is case insensitive while XML is case sensitive.
5.HTML is used for designing a web-page to be rendered on the client side while XML is used basically to transport data between the application and the database.
6.HTML has it own predefined tags while what makes XML flexible is that custom tags can be defined and the tags are invented by the author of the XML document.
7.HTML is not strict if the user does not use the closing tags but XML makes it mandatory for the user the close each tag that has been used.
8.HTML does not preserve white space while XML does.
9.HTML is static which is about displaying data, but XML is dynamic hence it is about carrying information.
Thus,it can be said that HTML and XML are not competitors but rather complement to each other
and clearly serving altogether different purposes.
XML was designed to transport and store data, with focus on what data is
HTML was designed to display data, with focus on how data looks
Well HTML is more subtle and is more user friendly then XML. You can create anything according to your liking in HTML where as XML does not give you this freedom.
XML and HTML purpose is different from each other.
HTML is for displaying purpose and XML is for data representation
HTML would be used to mark up text so it can be displayed to users and XML is used to mark up data so it can be processed by applications
HTML describes both structure (e.g. <p>, <h2>,) and appearance (e.g. <br>, <font>, <i>).XML describes only content or meaning
HTML uses a fixed, unchangeable set of tags.In XML, we make up our own tags.
Something called SGML is the parent of HTML, it defines a grammar but has no vocabulary. HTML is said to be an application of SGML in that it takes that grammar and adds a vocabulary. It is designed to represent the structure of documents.
SGML has a lot of funky rules that turned out to have been not a good idea and so XML came along. It's just SGML with fewer but more strict rules and it is nothing but a grammar. If you take the HTML vocabulary and apply it to the XML grammar you get XHTML. Or if you take the XML grammar and use a certain set of elements that were developed to describe the parts of any mathematical formula then you get MathML. Or you can just make up your own vocabulary without giving it a name and then people will call that raw XML.