via Transitional vs. Strict Markup,很不错的文章,总结了绝大部分重要条目,在我验证的过程中也发现了几乎所有这些问题。不想全转,一般大家不注意的地方如下:
下面三个标签在 strict 中不再存在!center 用 text-align:center;font用样式表;iframe用object;(搜索本站旧贴)
* center
* font
* iframe
* text and images are not allowed immediately inside the body element, and need to be contained in a block level element like p or div
body 里面不能直接跟inline(行内)元素而必须先用 h1-7,div,p等block(块)元素
* input elements must not be direct descendants of a form element
form里面不能直接跟 input。我个人经验是用div,p或者fieldset
* text in blockquote elements must be wrapped in a block level element like p or div
blockquote 内也不能直接跟行内元素,而需要 p ,div等先
其实使用 W3C xhtml 验证 的时候就会出现这些提示。
Leave a reply