---
# System prepended metadata

title: 'DIFFERENCES BETWEEN HTML, XHTML AND XML'

---

# DIFFERENCES BETWEEN HTML, XHTML AND XML

**1. HTML HyperText Markup Language**

HTML is the standard language used to create web pages, It provides the structure for web content using elements and tags HTML is  lenient with syntax rules, making it forgiving for developers

**HTML Features;**

-Used for structuring content on the web
-Not case-sensitive `<div>` and `<DIV>` are equivalent
-Allows omission of certain tags e.g. closing `<li>, <p>`


HTML example:

```
<!DOCTYPE html>
<html>
<head>
    <title>BLOCKFUSE LABS</title>
</head>
<body>
    <h1>Welcome to Blockfuse labs</h1>
    <p>This is BLOCKFUSE</p>
    <img src="blockfusee.jpg" alt="Image">
</body>
</html>
```

**2. XHTML Extensible HyperText Markup Language**

XHTML is a stricter and more XML compliant version of HTML. It was developed to bridge the gap between HTML and XML ensuring that web documents are well-formed and more reliable across different browsers and devices

**XHTML Features;**

-Follows stricter syntax rules, similar to XML.
-Case-sensitive
-Requires all tags to be properly closed
-Attributes must be quoted and properly defined.


XHTML example;

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <title>Blockfuse labs</title>
</head>
<body>
    <h1>Welcome to Blockfuse labs</h1>
    <p>This is a picture of Blockfuse labs</p>
    <img src="Blockfuse labs.jpg" alt="Image" />
</body>
</html>
```

**3. XML Extensible Markup Language**

XML is a markup language designed to store and transport data Unlike HTML, XML doesn't have predefined tags but allows users to define their own tags, making it highly flexible, XML is designed to be both human and machine readable, ensuring data can be easily shared and understood across different systems

**Key Features of XML:**

-Focused on data storage and transfer.
-Tags are user-defined.
-Strictly well-formed and case-sensitive.
-Requires all tags to be closed and attributes to be quoted.


XML examples

```
<?xml version="1.0" encoding="UTF-8"?>
<note>
    <to>sedicryptic</to>
    <from>peter</from>
    <heading>Blockfuse labs</heading>
    <body>hello</body>
</note>
```
Reference:https://www.w3.org/1999/xhtml/
https://www.w3schools.com/html/html_xhtml.asp
https://www.differencebetween.net/technology/internet/dif
https://www.quora.com/What-is-the-difference-between-HTML-HTML5-XHTML-and-XMLference-between-xml-and-xhtml/ 