Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Monday, June 25, 2018

Difference between HTML and XML

What is the difference Between HTML and XML?

What is HTML?

HTML stands for Hyper Text Markup Language. HTML defines the structure of the webpage by its tags. Tags are the basic building block of webpage. HTML is used to display data on the webpage. HTML is a data presentation technology. Browser displays the page by rendering the HTML tags. 


There are different tags constitutes the webpage like “title”, “paragraph”, ”heading”, “table” etc. The author of the HTML page uses these tags to build the HTML page. Author cannot make their own tags.  The tags of HTML are not case sensitive. The HTML tags have fix set of attributes. Author cannot define their own attributes. HTML does not preserves white spaces. HTML pages are static in nature. We use different technologies like CSS, JavaScript etc. to make HTML pages dynamic.

HTML tags also contain event attributes. These event attributes give some dynamic nature to the webpage. Actually the events have some JavaScript method attached which is executed on the occurrence of that event. Some of the events are like “onload” “onerror”, “onresize” etc.


difference between html and xml

What is XML?

XML stands for eXtensibleMarkup Language. It is designed to store and transport data form one application to another.

The XML is also used to send data from one platform to another. XML author’s defines their own tags. By using the tag, data is represented. The XML representation of data can be read by different applications. This makes data Independent from the application. The tags of the XML are case sensitive



We can also define our own attribute of the XML tags. The data is represented by these attributes and tags combined. XML is not a programming language. XML represents only data which can be used by the program. The program has its presentation layer to represent this XML representation of the data.



New Internet languages like XHTML, WSDL, SMIL etc. are created using XML.

XML is also used as deployment descriptors (web.xml).XML is dynamic since it transports data to different applications.XML preserves the white spaces.



When we define XML, there are some rules to follow. The XML document should contain only one root element. The elements we defined are to be closed properly. Proper ordering should be maintained while closing the tags.The first child tag should be closed before the parent tag. The tags are case sensitive. The attributes value must be quoted. If multiple whitespace is present in tag, it is converted to single whitespace.