Home >Web Front-end >HTML Tutorial >The difference between XML and HTML

The difference between XML and HTML

王林
王林forward
2023-09-01 11:09:111157browse

In this article, we will understand the difference between HTML and XML.

HTML

  • #It refers to Hypertext Markup Language.

  • It helps in creating web pages and applications.

  • It is a markup language.

  • It also helps in creating static pages.

  • It helps in displaying data.

  • It does not transmit data.

  • Hypertext helps define links between multiple web pages.

  • Markup language helps define text documents using tags, thereby providing structure to web pages.

  • It helps to annotate text so that the system can understand and use it.

    >
  • It ignores small errors.

  • It is not case sensitive.

  • There are a specific number of tags in HTML.

  • These tags are predefined.

  • It does not preserve spaces.

  • The closing tag is not required.

HTML Example-

Example
<!DOCTYPE html>
<html>
<head>
   <title>My title</title>
</head>
<body>
   <h1>title</h1>
   <p>A sample</p>
</body>
</html>

Output

The difference between XML and HTML

XML

  • XML stands for "Extensible Markup Language".

    li>
  • case sensitive.

  • Errors not allowed.

  • Help provides a framework for defining markup languages.

  • tags are user-defined.

  • These tags are extensible.

  • tags are user-defined. p>

  • can be left blank.

  • tags help describe the data.

  • These labels are not used to display data.

  • The closing tag is required.

  • It helps in creating web pages and applications.

  • It is dynamic as it helps in transferring data.

  • Design goals focus on simplicity and usability across the Internet.

  • It supports Unicode.

  • It can also be used to represent any data structure required by a Web service.

XML Example -

Example

<?xml version = "1.0"?>
<contactinfo>
   <address category = "type">
      <name>Mark</name>
      <College>MIT</College>
      <mobile>6787878</mobile>
   </address>
</contactinfo>

Output

Mark
MIT
6787878

The above is the detailed content of The difference between XML and HTML. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete