本文介绍了W3C攻击HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! W3C中的某个人无法接受这么多时间的想法(你自己的b $ b和其他所有人)浪费了一切(确切地说是XHTML)。所以 而不是专注于有用的东西而不是他们决定将b $ b挤出HTML - 好像它可以推动任何人使用XHTML。 在W3C反对HTTP战争中需要注意的事项。 (一个疯狂的 标题 - 但接近真相): 1.截至最近甚至完全正确的严格页面与DTD链接*和* 服务器内容类型标题text / html: <!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01严格// EN" " http://www.w3.org/TR/html401/strict.dtd"> < html> < head> < title>清空< / title> < meta http-equiv =" Content-Type" content =" text / html; charset = iso-8859-1"> < / head> < body> < p> ;没有内容< / p> < / body> < / html> 会发出巨大警告: < quote> 未知的解析模式! 此文档的MIME媒体类型(text / html)是用于同时提供基于SGML和XML的文档,并且根据文档中的DOCTYPE声明,无法消除它b / b 的歧义。在SGML模式下解析将继续 。 < / quote> 请随意忽略此警告:它有没有技术意义,实际上是错误的,误导性的,与W3C自己的规格相矛盾。 2.从本周开始,这个警告被用作正式的借口而不是 建议更多有效的HTML 4.01横幅即使验证本身 已通过。 如果您通过验证(绿色横幅)并仍想放置 $ b您网站上的$ b横幅广告,相关图片网址为 < http://www.w3.org/Icons/valid-html401>和相关的HTML代码 可能是这样的: < p>< a href =" http: //validator.w3.org/check?uri=referer"><img src =" http://www.w3.org/Icons/valid-html401" width =" 88" height =" 31" alt =" Valid HTML 4.01" style =" border:1px none">< / a>< / p> 如果将来W3C服务器停止提供横幅广告,可以从多个地点重新链接 ,比如来自 < http://www.geocities.com/schools_ring/html401/valid-html401.bmp>。 但到目前为止,这种极端情况是不必要的(但是?)。 解决方案 验证者不喜欢你的doctype就好了: 它是无效的! - AGw。 不正确。单词Strict在4.01之后不属于。 这并不奇怪验证者不喜欢你的文件类型:它无效! 是吗?请解释。引用的文档类型声明本身是 几乎''无效''(如果你在目录中设置''覆盖''到'是''并添加 an将公共标识符输入到HTML 4.01的本地副本 strict DTD - 或其他任何内容,公共和系统标识符 HTML 4.0指向不同的DTD自从多年和noboby关心 - 你可以 甚至验证本地设置的文档实例。 - |||十六进制EBB oo十进制3771 --oOo - () - oOo--八进制7273 205再见二进制111010111011 Someone in W3C just cannot accept the idea of so much time (your ownand everyone else) wasted for nothing (for XHTML to be exact). Soinstead of concentrating on something useful instead they decided tosqueeze HTML out - as if it can push anyone for XHTML.To things to be aware of in this "W3C against of HTTP war" (a crazytitle - but close to the truth):1. As of recently even fully correct Strict page with DTD linked *and*served with server Content-Type header "text/html":<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN""http://www.w3.org/TR/html401/strict.dtd"><html><head><title>Empty</title><meta http-equiv="Content-Type"content="text/html; charset=iso-8859-1"></head><body><p>No content</p></body></html>leads to a huge warning:<quote>Unknown Parse Mode!The MIME Media Type (text/html) for this document is used to serve bothSGML and XML based documents, and it is not possible to disambiguate itbased on the DOCTYPE Declaration in your document. Parsing willcontinue in SGML mode.</quote>Please feel free to ignore this warning: it has no technical sense,factually wrong, misleading and contradicting to W3C own specs.2. Starting this week this warning is used as a formal excuse to notpropose any more "Valid HTML 4.01" banner even if the validation itselfis passed.If you passed the validation (green banner) and still want to place thebanner on your site, the relevant image url is<http://www.w3.org/Icons/valid-html401> and the relevant HTML codecould be like:<p><ahref="http://validator.w3.org/check?uri=referer"><imgsrc="http://www.w3.org/Icons/valid-html401"width="88" height="31"alt="Valid HTML 4.01"style="border: 1px none"></a></p>If in the future W3C server stops serving the banner, it can bere-linked from a number of locations, say from<http://www.geocities.com/schools_ring/html401/valid-html401.bmp>.But as of today such extreme is not necessary (yet?). 解决方案It''s hardly surprising that the validator didn''t like your doctype:it''s invalid!--AGw.Incorrect. The word "Strict" doesn''t belong after the "4.01". It''s hardly surprising that the validator didn''t like your doctype: it''s invalid!Is it? Please explain. The cited document type declaration itself ishardly ''invalid'' (if you set ''override'' to ''yes'' in your catalog and addan entry for the public identifier to your local copy of the HTML 4.01strict DTD -- or anything else, the public and the system identifier ofHTML 4.0 point to different DTDs since years and noboby cares -- you caneven validate the document instance set locally).--||| hexadecimal EBBo-o decimal 3771--oOo--( )--oOo-- octal 7273205 goodbye binary 111010111011 这篇关于W3C攻击HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!