Home > Css, Myself, Tutor, Web standard > 中华家教吧官网首页标准化验证Passed

中华家教吧官网首页标准化验证Passed

这两在做中华家教吧页面的web standard validation.

终于成功了,演示地址: http://www.zhjj8.com/

CSS也验证到了CSS 2.1版本。

时间主要浪费在:

  1. 要将网址链接中的“&”改成“&” 才可以。
  2. 所有HTML都要小写
  3. 所有HTML的标签的属性的值都要加“”,如 width=”30px” 而不可以 width=30
  4. <img 标签需要有 alt ,就算是没有任何意义的,也需要改成 alt=”", 最好要合上标签 即  “/>

下面摘录一些别人标准化页面时的记录:

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%

Categories: Css, Myself, Tutor, Web standard Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.