最新消息:

最常犯的 HTML 标识错误 Top 100(转)

Html 大步 815浏览 0评论

 原文链接:      http://www.oschina.net/news/30080/top-100-html-validation-errors?from=20120617

       国外的一个网站 W3CLove ,最近对在其网站上进行的 45 万的网页验证进行统计,下面是最频繁的错误和警告列表。

W3CLove是一个用来验证网页编写是否规范的在线网站,不过用它来测试 oschina 页面的时候,提示错误:

Sorry, we could not scrape this page.

Please check it's an existent URL, or try again in a few minutes.

最常犯的 HTML 标识错误 Top 100(转) - ksharp_dabu - ksharp_dabu的博客

 

Top 100 errors list

  1. required attribute "alt" not specified, 1,392,075 times.
  2. & did not start a character reference. (& probably should have been escaped as &.), 764,450 times.
  3. end tag for "img" omitted, but OMITTAG NO was specified, 663,765 times.
  4. end tag for "br" omitted, but OMITTAG NO was specified, 502,366 times.
  5. an attribute value specification must be an attribute value literal unless shorttag yes is specified, 463,999 times.
  6. an attribute value must be a literal unless it contains only name characters, 337,970 times.
  7. required attribute "type" not specified, 293,050 times.
  8. document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag, 274,987 times.
  9. document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag, 202,423 times.
  10. document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag, 196,060 times.
  11. an img element must have an alt attribute, except under certain conditions. for details, consult guidance on providing text alternatives for images., 164,988 times.
  12. end tag for "input" omitted, but OMITTAG NO was specified, 160,066 times.
  13. end tag for "p" omitted, but OMITTAG NO was specified, 142,452 times.
  14. end tag for "ul" which is not finished, 142,081 times.
  15. end tag for element "a" which is not open, 115,545 times.
  16. document type does not allow element "div" here; missing one of "applet", "object", "map", "iframe", "button" start-tag, 115,358 times.
  17. end tag for "li" omitted, but OMITTAG NO was specified, 101,451 times.
  18. element "div" undefined, 98,741 times.
  19. reference to entity "action" for which no system identifier could be generated, 93,877 times.
  20. document type does not allow element "link" here, 91,422 times.
  21. document type does not allow element "a" here, 84,233 times.
  22. reference to entity "id" for which no system identifier could be generated, 82,970 times.
  23. document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag, 82,761 times.
  24. end tag for element "div" which is not open, 82,144 times.
  25. document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag, 80,011 times.
  26. document type does not allow element "li" here; missing one of "ul", "ol" start-tag, 77,854 times.
  27. character data is not allowed here, 73,051 times.
  28. there is no attribute "width", 72,246 times.
  29. attribute property not allowed on element meta at this point., 72,024 times.
  30. end tag for "meta" omitted, but OMITTAG NO was specified, 71,601 times.
  31. document type does not allow element "style" here, 70,476 times.
  32. reference to entity "nbsp" for which no system identifier could be generated, 69,629 times.
  33. reference to entity "widgetid" for which no system identifier could be generated, 69,565 times.
  34. syntax of attribute value does not conform to declared value, 66,937 times.
  35. element meta is missing one or more of the following attributes: http-equiv, itemprop, name., 65,735 times.
  36. document type does not allow element "meta" here, 64,134 times.
  37. reference to entity "cat" for which no system identifier could be generated, 60,781 times.
  38. there is no attribute "height", 60,035 times.
  39. end tag for "div" omitted, but OMITTAG NO was specified, 59,892 times.
  40. an attribute specification must start with a name or name token, 59,374 times.
  41. bad value category tag for attribute rel on element a: keyword category is not registered., 58,762 times.
  42. consecutive hyphens did not terminate a comment. -- is not permitted inside a comment, but e.g. - - is., 57,425 times.
  43. document type does not allow element "div" here, 56,466 times.
  44. reference to entity "widgettype" for which no system identifier could be generated, 54,850 times.
  45. document type does not allow element "option" here, 54,802 times.
  46. reference to entity "sectionid" for which no system identifier could be generated, 53,532 times.
  47. value of attribute "align" cannot be "absmiddle"; must be one of "top", "middle", "bottom", "left", "right", 52,637 times.
  48. element "g:plusone" undefined, 50,184 times.
  49. end tag for "link" omitted, but OMITTAG NO was specified, 50,006 times.
  50. reference to entity "postid" for which no system identifier could be generated, 48,854 times.
  51. character "/" is not allowed in the value of attribute "id", 47,406 times.
  52. document type does not allow element "script" here, 47,169 times.
  53. document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag, 47,167 times.
  54. element "br" undefined, 46,530 times.
  55. NET-enabling start-tag not immediately followed by null end-tag, 45,105 times.
  56. there is no attribute "src", 44,667 times.
  57. end tag for element "p" which is not open, 44,416 times.
  58. document type does not allow element "tr" here, 44,374 times.
  59. there is no attribute "href", 43,999 times.
  60. there is no attribute "target", 43,848 times.
  61. the width attribute on the td element is obsolete. Use CSS instead., 43,173 times.
  62. element "a" undefined, 42,579 times.
  63. end tag for "a" omitted, but OMITTAG NO was specified, 42,486 times.
  64. the frameborder attribute on the iframe element is obsolete. Use CSS instead., 42,393 times.
  65. there is no attribute "allowtransparency", 41,756 times.
  66. the align attribute on the td element is obsolete. Use CSS instead., 41,471 times.
  67. end tag for "option" omitted, but OMITTAG NO was specified, 41,181 times.
  68. there is no attribute "property", 40,952 times.
  69. document type does not allow element "td" here, 40,645 times.
  70. there is no attribute "name", 39,828 times.
  71. there is no attribute "border", 39,069 times.
  72. end tag for element "td" which is not open, 38,553 times.
  73. reference to entity "type" for which no system identifier could be generated, 38,548 times.
  74. element "iframe" undefined, 38,229 times.
  75. end tag for element "span" which is not open, 36,688 times.
  76. the valign attribute on the td element is obsolete. Use CSS instead., 35,955 times.
  77. element "noindex" undefined, 35,183 times.
  78. document type does not allow element "li" here, 34,723 times.
  79. element "td" undefined, 34,008 times.
  80. element "variable" undefined, 33,992 times.
  81. the cellspacing attribute on the table element is obsolete. Use CSS instead., 33,090 times.
  82. the cellpadding attribute on the table element is obsolete. Use CSS instead., 32,300 times.
  83. end tag for "variable" omitted, but OMITTAG NO was specified, 32,142 times.
  84. the scrolling attribute on the iframe element is obsolete. Use CSS instead., 31,772 times.
  85. reference to entity "w" for which no system identifier could be generated, 31,699 times.
  86. reference to entity "h" for which no system identifier could be generated, 31,497 times.
  87. reference to entity "itemid" for which no system identifier could be generated, 31,319 times.
  88. character ";" not allowed in attribute specification list, 31,139 times.
  89. end tag for "tr" omitted, but OMITTAG NO was specified, 30,930 times.
  90. there is no attribute "type", 30,620 times.
  91. there is no attribute "align", 30,159 times.
  92. element "font" undefined, 29,676 times.
  93. the name and vi delimiter can be omitted from an attribute specification only if shorttag yes is specified, 29,542 times.
  94. end tag for element "options" which is not open, 29,330 times.
  95. reference to entity "title" for which no system identifier could be generated, 29,229 times.
  96. element "embed" undefined, 29,099 times.
  97. there is no attribute "size", 28,937 times.
  98. element p not allowed as child of element span in this context. (suppressing further errors from this subtree.), 28,691 times.
  99. end tag for "td" omitted, but OMITTAG NO was specified, 28,528 times.
  100. reference to entity "mibenumid" for which no system identifier could be generated, 26,944 times.

有兴趣的观众可以将以上 100 错误翻译成中文:)

转载请注明:大步's Blog » 最常犯的 HTML 标识错误 Top 100(转)

SiteMap