<分区>
我读过许多解释严格文档类型和过渡文档类型之间区别的论坛,但没有一个解释在呈现页面时选择严格文档类型还是过渡文档类型。例如:在严格的文档类型中不推荐使用“i”标签。但无论您使用哪种文档类型,它都可以在您的网页中正常呈现。其他已弃用的标签(例如“u”或“font”)也是如此。所以我的问题是,在页面呈现方面,严格文档类型和过渡文档类型之间是否存在真正的区别。
<分区>
我读过许多解释严格文档类型和过渡文档类型之间区别的论坛,但没有一个解释在呈现页面时选择严格文档类型还是过渡文档类型。例如:在严格的文档类型中不推荐使用“i”标签。但无论您使用哪种文档类型,它都可以在您的网页中正常呈现。其他已弃用的标签(例如“u”或“font”)也是如此。所以我的问题是,在页面呈现方面,严格文档类型和过渡文档类型之间是否存在真正的区别。
最佳答案
What differs in almost-standards mode is roughly this: inline boxes that have no non-whitespace text as a child and have no border, padding, or margin:
The HTML 4.01 transitional doctype validates against the HTML 4.01 spec. It allows some presentational markup and deprecated elements (such as elements) but not framesets.
The HTML 4.01 strict doctype validates against the HTML 4.01 spec, although it doesn't allow any presentational markup or deprecated elements (such as elements) or framesets to be used.
If you are using an XHTML doctype, you need to use XML well-formed syntax
引用资料
关于html - 严格和过渡文档类型之间的真正区别是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15137819/