主要是体现在代码规范上,XHTML 规范会更加严格
XHTML 元素必须被正确地嵌套
正确示范
<b><i>This text is bold and italic</i></b>
错误示范
<b><i>This text is bold and italic</b></i>
XHTML 元素必须被关闭
正确示范
<p>This is a paragraph</p> <p>This is another paragraph</p> A break: <br /> A horizontal rule: <hr /> An image: <img src="happy.gif" alt="Happy face" />
错误示范
<p>This is a paragraph <p>This is another paragraph A break: <br> A horizontal rule: <hr> An image: <img src="happy.gif" alt="Happy face">
标签名必须用小写字母
正确示范
<body>