What is difference between html and xml

What is difference between html and xml



HTML

HTML stands for HyperText Markup Language which is a language used to describe the structure of a web page. It consists of various HTML element which is composed of HTML tags and their content.

HTML is a hypertext language so we can create a chain of links of documents. The current version of HTML is HTML5. HTML is static and it can ignore small errors and in it, closing tags are not necessary.

Let us see an example of HTML −





Example

 Demo

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>HTML</title> </head> <body> <h1 style="text-align: center;color:#db133a;">HTML</h1> <h3 style="text-align: center;">I'm a HTML document.</h3> </body> </html>






XML

XML stands for eXtensible Markup Language which is a language used to transfer data not to structure data. It is dynamic and it reports all errors and in its closing tags are necessary. It is basically a textual data format with strong support via Unicode for different human languages. The current version of XML is XML1.1.

Let us see an example of XML −

<?xml version="1.0" encoding="UTF-8"?> <fullname> <firstname>John</firstname>





                             HTML

HTML stands for HyperText Markup Language which is a language used to describe the structure of a web page. It consists of various HTML element which is composed of HTML tags and their content.

HTML is static because it is used to display data.

It is a presentation language.

It is not necessary to use a closing tag.

Predefined tags like <p>, <strong>, <head>, etc are in HTML.

HTML does not preserve whitespaces

HTML is case insensitive.






                             XML

XML stands for eXtensible Markup Language which is a language used to transfer data not to structure data XML is dynamic and used to transfer data.

It is not a presentation language.

It is mandatory to use a closing tag.

Define your own tags in XML.

XML preserve whitespaces.

XML is case sensitive.

Post a Comment

Previous Post Next Post