Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Introduction to XHTML

HTML - XHTML


XHTML is HTML written in XML format.


What is XHTML?


Why use XHTML?

Many pages on the Internet contain "bad" HTML.

If viewed in a browser, the following HTML code runs perfectly fine (even though it does not follow HTML rules):

<html>
<head>
<meta charset="utf-8">
<title>

This is a non-standard HTML

title

<

body

<

h1

Non-standard HTML

<

p

This is a paragraph

body

XML is a markup language that must be properly tagged and well-formed.

If you want to learn XML, please read ourXML Tutorial。

Today's technology world has a number of different browser technologies. Some of them run on computers, while others may run on mobile phones or other small devices. Small devices often lack the resources and ability to interpret "bad" markup languages.

So - by combining the strengths of XML and HTML, XHTML was developed. XHTML is HTML redesigned as XML.


The most important differences compared with HTML:

Document Structure