Use Web standard build station checksum common errors

Source: Internet
Author: User
Tags end error code file upload

We use XHTML+CSS to redesign our site, how do we know that our own pages really conform to Web standards? The Web site and some volunteer websites provide online calibration programs to help us check whether the page meets the standards and provide help for correcting errors. These checksums are very useful and are the first thing I want to do when I debug the page.

1.XHTML Checksum

Verification URL: http://validator.w3.org/

Check mode: URL check, file upload check

The checksum is successful and displays "This Page is Valid XHTML 1.0 transitional!."

Checksum fails, more checksum options and error messages are displayed.

General selection of "show Source" and "Verbose Output" can help you find the error code and the reason for the error.

XHTML checksum common error reason tables

No DOCTYPE found! Falling back to HTML 4.01 transitional--undefined doctype.

No Character Encoding found! Falling back to utf-8.--does not have a defined language encoding.

End tag for "IMG" omitted, but Omittag no is specified--picture label is not added "/" off.

An attribute value specification must a attribute value literal unless Shorttag YES is specified--property values must be quoted.

Element "div" Undefined---div tag cannot be capitalized, to be converted to lowercase div.

Required attribute "alt" not specified---picture requires an Alt property.

Required attribute "Type" is not specified---JS or the label of the CSS call misses the Type property.

One of the most common bugs is the case of a label. Usually these errors are related, such as forgetting a </li> other <li> tags will be an error, so do not see a bunch of false fear, usually solve a mistake, the other mistakes are gone.

2.CSS2 Check

Verification URL: http://jigsaw.w3.org/css-validator/

Check mode: URL check, file upload check, directly into the code check

Verification success, will show "Congratulations congratulations, this document has been through the stylesheet checksum!" "。

Checksum fails, two types of errors are displayed: errors and warnings. Error indicates must be fixed, otherwise cannot pass checksum, warning indicates that the code is not recommended by the consortium, proposed modification.

CSS2 Check common error reason tables

(Error) Invalid number: color909090 is not a color value: 909090---Hexadecimal color value must be added with the "#" number, that is #909090

(Error) Invalid number: Margin-topunknown dimension:6pixels---Pixels is not a unit value, the correct spelling 6px

(Error) Property Scrollbar-face-color does not exist: #eeeeee---Defines a nonstandard property of the scroll bar color

(error) value Cursorhand does not exist: Hand is a nonstandard attribute value, modified to Cursor:pointer

Warning line:0 font-family: It is recommended that you designate a family of species as the final option--w3c suggest font definitions, and end up with a category of fonts, such as "Sans-serif", to ensure that page fonts can be displayed under different operating systems.

Warning Line:0 can ' t find the warning messages for Otherprofile--Indicates that there are non-standard attributes or values in the code, and the validator cannot determine and provide the appropriate warning information.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.