简体   繁体   English

W3验证需要遵循哪一个?

[英]Which one I have to follow for W3 Validation?

In W3 validations it have many options 在W3验证中,它有很多选项

HTML - XHTML1.0, XHTML - Transitional, XHTML - Strict and HTML - XHTML1.0,XHTML - Transitional,XHTML - 严格和

for CSS - CSS - 2.0, CSS - 3.0 ... for CSS - CSS - 2.0,CSS - 3.0 ......

Which one I should follow? 我应该遵循哪一个? Any suggestion plz 任何建议PLZ

Validate as whichever you've targeted your document to. 验证您将文档定位到的目标。 If you're producing HTML, validate as that. 如果您正在生成HTML,请进行验证。 Likewise, if you're writing XHTML, validate as that. 同样,如果您正在编写XHTML,请进行验证。 Go read the w3 docs on each spec to decide which you want to follow. 请阅读每个规范的w3文档,以确定要遵循的内容。

HTML5, HTML4 Strict or, if you have to, XHTML1 Strict. HTML5,HTML4严格或者,如果必要,XHTML1严格。 Don't fall into the trap of Transitional versions for new sites, you'll regret it later. 不要陷入新网站的Transitional版本的陷阱,你会后悔的。

I'd use CSS3, but CSS2.1 is alright as well. 我会使用CSS3,但CSS2.1也没问题。

I'd personally say: 我个人会说:

HTML 4.01 Strict HTML 4.01严格
CSS 2.1 CSS 2.1

This is because I (and many others) feel XHTML is flawwed which is why W3C is stopping development of the XHTML2 stanrd in favor of HTML5 (which you won't be using in another couple of years because of lack in browser support) 这是因为我(以及其他许多人)认为XHTML是闪亮的,这就是为什么W3C停止开发XHTML2 stanrd以支持HTML5(由于缺乏浏览器支持,你将在未来几年内不再使用)

Also another problem of XHTML is that it should be send with a MIME type of application/xhtml+xml however internet explorer 6 (maybe 7 and 8 too, not sure) do not render the page when it send as application/xhtml+xml, so you'll either need to send text/html for ie and text/html+xml for other browser, or use the wrong mime type completely. XHTML的另一个问题是它应该以MIME类型application / xhtml + xml发送,但是Internet Explorer 6(也许是7和8,也不确定)在发送为application / xhtml + xml时不会呈现页面,所以你需要为ie发送text / html,为其他浏览器发送text / html + xml,或者完全使用错误的mime类型。

http://www.w3.org/News/2009#item119 - W3C stops development of XHTML2 http://www.w3.org/News/2009#item119 - W3C停止开发XHTML2

http://hixie.ch/advocacy/xhtml - Lengthy article about XHTML by Ian Hickson (creator of Acid2 and Acid3 test and member of WHATWG) http://hixie.ch/advocacy/xhtml - Ian Hickson撰写的关于XHTML的冗长文章(Acid2和Acid3测试的创建者以及WHATWG的成员)

css 2.x is used in 99% cases css 2.x用于99%的案例

Do yiu know what DOCTYPE is? 你知道DOCTYPE是什么吗? HTML and XHTML are different languages. HTML和XHTML是不同的语言。 If m then it's XHTML. 如果是那么它是XHTML。

I make things tooooo simple. 我做的事情太简单了。 Better browse the web 更好地浏览网页

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM