1
The Most Important Differences from HTML 4.01
2
---------------------------------------------
3
* XHTML elements must be properly nested
4
* XHTML documents must be well-formed
5
* Tag names must be in lowercase
6
* All XHTML elements must be closed (For example <br />, space for
7
compatability with none XHTML browsers)
8
* Attribute Values must be Quoted
9
* Attribute Minimization is Forbidden ( i.e. <input readonly /> -
10
incorrect, must be <input readonly="readonly" />
11
* The id Attribute replaces the Name Attribute ( i.e.
12
<img src="1.gif" name="picture1" /> - incorrect, must be
13
<img src="1.gif" id="picture1" />, for compatability and name and id
14
attributes must be specified.
15
* The lang attribute applies to almost every XHTML element. It
16
specifies the language of the content within an element.
17
<div lang="no" xml:lang="no">Heia Norge!</div>
19
Mandatory XHTML Elements
20
------------------------
21
This is a minimum XHTML document template (DOCTYPE may differ):
26
<title>Title goes here</title>
35
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
36
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
37
TRANSITIONAL (Supporting none CSS browsers)
39
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
40
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
41
FRAMESET (If page contain frames)
43
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
44
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">