Differences between HTML and XHTML

This section describes differences between HTML and XHTML. XHTML is XML based and more restrictive than HTML.

XHTML (Extensible HyperText Markup Language) is an XML based markup language that mirrors HTML language. The current version is XHTML 1.1 released in November 2010.

Main differences between HTML and XHTML are:

Here is a good example of an XHTML document from http://www.javascriptkit.com/howto/xhtml_intro4.shtml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<!-- XHTML_Example.html
 - Copyright (c) 2009 HerongYang.com. All Rights Reserved.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>Strict DTD XHTML Example </title>
<p>Please Choose a Day:<br/><br/>
<select name="day">
  <option selected="selected">Monday</option>

Table of Contents

 About This Book

Introduction of HTML

 What Is HTML

 History of HTML

Differences between HTML and XHTML

 Relation between HTML and CSS

 Relation between HTML and JavaScript

 Relation between HTML and DOM

 Relation between HTML and DHTML

 Relation between HTML and SVG

 Relation between HTML and MathML

 Introduction of HTML5 Features

 HTML Document Structure and Content

 HTML Document and Elements Syntax

 Displayed and Printed HTML Documents

 Responsive Design of Web Pages

 MathML Integration in HTML Documents


 Full Version in PDF/EPUB