what is the difference between HTML and XML?

10 Answers

Relevance
  • Nithya
    Lv 5
    1 decade ago
    Favourite answer

    XML and HTML are different and they both have different goals. They are designed for different purposes. Some people think that xml is an advanced version of html and it has come to replace html. It is not the case. Both will be there as they are used for different purposes.

    XML files are meant to hold data and data in an xml file is well described. If you look at an xml file you can say what it holds. For example if you find a number in an xml file you can find out easily what that number identifies, whether it is the number of products, or the price of a product etc. In html it is not the case.

    HTML is used to display the data in a formatted way. You can apply styles and use different layouts to display the data in an html file. The data that is displayed in an html file could come from an xml file.

    So to say in simple words, html displays the data and xml holds the data!

    1.HTML is presentaton language where as XML is not either a programing language or a presentation language. It is used to transfer data between applications and databases.

    2.HTML is not case-sensitive where as XML is case-sensitive.

    3.In XML we can define our own tags as it is not possible in HTML.

    4.In XML it is mandatory to close each and every tag where as in HTML it is not required.

    5.XML describes the data where as HTML only defines the data.

    • Commenter avatarLog in to reply to the answers
  • 4 years ago

    Difference Between Html And Xml

    • Commenter avatarLog in to reply to the answers
  • Anonymous
    1 decade ago

    XML and HTML are different and they both have different goals. They are designed for different purposes. Some people think that xml is an advanced version of html and it has come to replace html. It is not the case. Both will be there as they are used for different purposes.

    XML files are meant to hold data and data in an xml file is well described. If you look at an xml file you can say what it holds. For example if you find a number in an xml file you can find out easily what that number identifies, whether it is the number of products, or the price of a product etc. In html it is not the case.

    HTML is used to display the data in a formatted way. You can apply styles and use different layouts to display the data in an html file. The data that is displayed in an html file could come from an xml file.

    So to say in simple words, html displays the data and xml holds the data

    • Commenter avatarLog in to reply to the answers
  • Lv 5
    1 decade ago

    The most salient difference between HTML and XML is that HTML describes presentation and XML describes content. An HTML document rendered in a web browser is human readable. XML is aimed toward being both human and machine readable.

    XML syntax differs from HTML

    1.New tags may be defined at will

    2.Tags may be nested to arbitrary depth

    3.May contain an optional description of its grammar

    • Commenter avatarLog in to reply to the answers
  • What do you think of the answers? You can sign in to give your opinion on the answer.
  • 1 decade ago

    Though the way html and xml are written is almost the same they differ in the way they are interpreted. html is used by browsers to interpret how the different contents of a page are displayed. xml on the other hand is used by various systems as a means to exchange data.

    So in a way html is a special form of xml that browsers interpret to display the contents of a webpage.

    • Commenter avatarLog in to reply to the answers
  • 1 decade ago

    HTML is used for creating web pages,But XML for reducing sizes of sites.

    XML is also an scripting language similar to HTML,All large data are stored in XML'S then called inside HTML.

    • Commenter avatarLog in to reply to the answers
  • Anonymous
    4 years ago

    > What is the difference between HTML and XML? HTML and XML are both SGML derivatives. They both function similarily: they are intended to markup documents or similar data. The markup is similar: the use of a DTD, tags, attributes, and so on. HTML is designed for web usage. The DTD specifies elements that are useful in web documents: headings, paragraphs, hyperlinks, and so on. XML is generic. You use it for whatever you want. So many markup formats are XML formats. RSS (news feeds) uses XML to markup the data. One of my development IDEs uses a configuration file to store program settings. This file uses XML. XML is a generic method of marking up data, and you can adapt it to whatever situation you want. Which is why it is possible to have HTML that is also XML. Known as XHTML. XHTML ...is... XML, and should be treated as one. But it is also HTML, because it is adapted for web usage. > What is the difference between logical elements and physical elements? Let's say you are reading an essay. At the top is a title in big bold letters. Why is it in big bold letters? Because that's the title. It could be in small underlined letters. Red letters. Blue letters. Who cares. That's the title. Remember how I said HTML is about document markup? Documents have headings, subheadings, paragraphs, quotes, citations, and so on. Logical elements indicate these structural components of a document. Physical elements have no structural meaning. They are things like bold tags, or italic tags, or underline tags. What is the meaning of bold? Nothing. It just makes text bold. Here's the thing. HTML is only for indicating structural meaning. You can determine the look of a webpage with what is known as CSS. CSS makes stylesheets, and in the case of webpages, they can be applied to HTML. So if you have a heading in HTML, you can use CSS to make that heading look big, or red, or underlined, or whatever. Google for “semantic HTML”. The mistake people make is they use <center> tags to center a heading. Or <b> (bold) tags to emphasize something. Or font tags to make something big or small. Don't. Why do you center something? Because it is a heading? Then use <h1> or <h2> tags, which indicate logically that is a heading. Use CSS to choose how it looks.

    • Commenter avatarLog in to reply to the answers
  • 1 decade ago

    HTML is structured tags that define webpages. This includes styles, fonts, controls, text, etc). When I say structured I am referring to predefined tags that must be used.

    XML is a unstructured language that defines data. Basically you can define the tag names yourself.

    • Commenter avatarLog in to reply to the answers
  • 5 years ago

    Simply XML was designed to describe data, with focus on what data is whereas HTML was designed to display data, with focus on how data looks.

    XML is the acronym from Extensible Markup Language (meta-language of noting/marking). XML is a resembling language with HTML. It was developed for describing data.

    The XML tags are not pre-defined in XML. You will have to create tags according to your needs.

    XML is self descriptive.

    XML uses DDT principle (Defining the Document Type) to formally describe the data.

    The main difference between XML and HTML: XML is not a substitute for HTML.

    XML was developed to describe data and to focalize on what the data represent.

    HTML was developed to display data about to focalize on the way that data looks.

    HTML is about displaying data, XML is about describing information.

    XML is extensible.

    The tags used to mark the documents and the structures of documents in HTML are pre-defined. The author of HTML documents can use only tags that were previously defined in HTML. The Standard XML gives you the possibility to define personal structures and tags.

    It is important to understand that XML is not a substitute for HTML. In the future development of the Web, XML will be the main language to describe the structure and the Web data, and the HTML language will be responsible for displaying the data.

    We participated to the evolution of XML since its appearance. It is amazing to observe its rapid evolution, and how fast it was adopted by the majority of software developers. We strongly believe that XML will become as important as HTML for the future web evolution, especially when it comes to data manipulation.

    XML can store data separately from HTML.

    XML can be used to store data inside the HTML documents.

    XML can be used as a format for exchanging information.

    XML can be used to store data in files and databases.

    The HTML pages are used to display data. The data are sometimes stored in the interior of HTML pages. Using XML, you can store data in a separated file. This way, you can easily concentrate on using HTML for formatting and displaying, and you can also be certain that the modifications won’t bring any modifications to any HTML code.

    XML can also store data inside the HTML documents. The XML data will store data in HTML documents as “data islands.” You can concentrate on HTML to format and display data.

    In the real world, the calculation systems and the databases are containing data in incompatible formats. One of the most soliciting provocations for developers was exchanging data between incompatible systems over the internet. Converting XML data can reduce the complexity, and it can also create data that are easy to read by any kind of application.

    XML can be used to store data in files or databases. You can write applications to store and recover information from the hard disks, and you can write generic application to display certain types of data.

    • Commenter avatarLog in to reply to the answers
  • 1 decade ago

    i guess this link may help you ..

    http://www.xml.com/pub/a/2000/12/13/xmlhtml.html.

    • Commenter avatarLog in to reply to the answers
Still have questions? Get answers by asking now.