Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of module_invoke_all(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/.megatoes/geniusy/geniusy/drupal/modules/fuzzysearch/fuzzysearch.module on line 324
通不过W3C验证最常见的网页标准错误 | Geniusy's Blog

通不过W3C验证最常见的网页标准错误

刚才到W3C网站验证了一下www.geniusy.com, 网站竟然起初有100多处错误,其中有些是由于疏忽导致的,比如多了</p></strong>标记,有<li>而 之前没有<ul>或<ol>等,不过有些就是由于以前不清楚标准导致的,比如<img>必须包含alt说明等。

不过查出来错误最多的还是Sablog的JS调用标签,一段标签都N个错误,看来得避免使用JS调用啊。下面是找来的最容易出现的错误:

HTML Tag Error PSU Pilot Frequency <img>, <area> Required attribute ALT not specified 29.9% <table>, <tr>, <th>, <td> There is no attribute BGCOLOR | HEIGHT | WIDTH | ALIGN 10% <ul>, <ol> Start tag for "LI" omitted, but its declaration does not permit this 8.6% Any HTML tag Document type does not allow element <tag> here 6.2% <font> Element "FONT" is undefined 4.5% The align attribute on any tag There is no attribute "ALIGN" 3.8% <script>, <style> There are three commons types of errors on these tags:
  • There is no attribute "LANGUAGE"
  • Required attribute "TYPE" not specified
  • Many strange markup errors occurring within a <script> or <style> element
3.5% All HTML tags End tag for <tag> omitted, but OMITTAG NO was specified. 3.4% Page content and all tags using URLs in attribute values This error can be presented several ways, based on the validator being used, such as:
  • Cannot generate system identifier for general entity "variable"
  • General entity "variable" not defined and no default entity
  • Reference to entity "variable" for which no system identifier could be generated
  • Invalid entry was found in the value for the "href" or "src" attribute
  • Character "&" is the first character of a delimiter but occurred as data
3.4% Any attribute value on any tag An attribute value must be a literal unless it contains only name characters 3.3% Any series of tags End tag for "tag1" omitted, but OMITTAG NO was specified - AND - End tag for "tag2" which is not open 3.0% <body> There is no attribute:
  • bgcolor
  • text
  • bgcolor
  • link
  • vlink
  • alink
2.9% <b>, <i>
  • Use <strong> rather than <b> for emphasis
  • Use <em> rather than <i> for emphasis
2.8% <!DOCTYPE> DOCTYPE errors can be found in the following forms:
  • No DOCTYPE found!
  • No document type declaration; implying "<!DOCTYPE HTML SYSTEM>"
  • Unknown parse mode
  • DOCTYPE is not a recognized DOCTYPE and may not be valid
2.4% Content: &128;-&159; Found an illegal character reference or Character "&" is the first character of a delimiter but occurred as data 1.8% <hr> align, noshade, size, and width attributes for <hr> are all deprecated in favor of style sheets 1.3% <ul>, <ol>, <li> This error can appear in multiple ways, depended on the validator and the context in which it is contained:
  • Document type does not allow element "ul" or "ol" here; assuming missing "li" or "ol" start-tag
  • Document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag
  • End tag for "li" omitted, but OMITTAG NO was specified
  • Nested lists should be contained in an "li" tag
1.1% <img> height and width attributes should be used with the <img> element 1.0% <body> Document type does not allow element "body" here 0.4% id and name attribute on any tag ID or name attribute already defined 0.2% <center> <center> is deprecated 0.1%

Tags: alt, w3c验证, 错误

发表新评论

此内容将保密,不会被其他人看见。
  • You can use BBCode tags in the text, URLs will automatically be converted to links.
  • You can use coolfilter tags in the text, to include code and media
  • Image links from G2 are formatted for use with Lightbox.V2
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ol> <dl> <dt> <dd> <img> <inline> <center> <p> <object> <br> <th> <tr> <td> <embed>
  • 网页地址和电子邮件地址将会被自动转换为链接。

更多格式化选项信息

Similar