The difference between XML and HTML

王林
Release: 2023-09-01 11:09:11
forward
1119 people have browsed it

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>
Copy after login

Output

The difference between XML and HTML

XML

  • XML stands for "Extensible Markup Language".

  • 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>
Copy after login

Output

Mark
MIT
6787878
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!