HTML Tutorials - Herong's Tutorial Examples - v2.30, by Herong Yang
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" "DTD/xhtml1-strict.dtd"> <!-- XHTML_Example.html - Copyright (c) 2009 HerongYang.com. All Rights Reserved. --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Strict DTD XHTML Example </title> </head> <body> <p>Please Choose a Day:<br/><br/> <select name="day"> <option selected="selected">Monday</option> <option>Tuesday</option> <option>Wednesday</option> </select> </p> </body> </html>
Table of Contents
►Differences between HTML and XHTML
Relation between HTML and JavaScript
Relation between HTML and DHTML
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