比如这样的代码就不能通过 xhtml 1.x 验证,以前没注意到这个问题 。比如这样的代码

test

  • fefe

W3C验证会报告,不允许block元素(ul)出现在这里。p 换成 div就可以,真是奇怪的限制啊。xhtml 2.0 将去掉这个限制。

Another logical anomaly in XHTML 1.0 is that you must close a paragraph in order to use a list. In fact, you must close it to use any block-level element (blockquotes, preformatted sections, tables, etc.). This is often an illogical thing to do when such content can justly be used as part of the same paragraph flow. XHTML 2.0 removes this restriction. The only thing you can’t do is put one paragraph inside another.

via The future of HTML, Part 2: XHTML 2.0

[Edit on 2006-1-28 10:34:30 By guoshuang]