HTML versus XHTML

XHTML stands for EXtensible HyperText Markup Language. It is a stricter, more XML-based version of HTML.

XHTML is HTML defined as an XML application.

XHTML is supported by all major browsers

XHTML was developed to make HTML more extensible and flexible to work with other data formats (such as XML). Besides, browsers ignore errors in HTML pages, and try to display the website even if it has some errors in the markup. Not so with XHTML.

The Most Important Differences from HTML

An Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Title of document</title>
</head>
<body>

  some content here...

</body>
</html>

[...]