Web Standard Learning Journey "entry": 9. Verification and Common Errors

Source: Internet
Author: User

1. XHTML Verification

·Verification URL:Http://validator.w3.org/

·Verification Method:Website verification and file upload Verification

If the verification is successful, "This page is valid XHTML 1.0 transitional!" is displayed! ",

If verification fails, more verification options and error messages are displayed,

General"Show source"And"Verbose output"Can help you find errorsCodeRow and cause of error.

XHTML Verification common error causes table

·No doctype found! Falling back to HTML 4.01 transitional --UndefinedDoctype.

·No character encoding found! Falling back to UTF-8 .--Language encoding is not defined.

·End tag for "IMG" Omitted, but omittag no was specified --Image Tag not added"/"Disable.

·An Attribute Value specification must be an attribute value literal unless than tag yes is specified --The attribute value must be enclosed in quotation marks.

·Element "Div" undefined --- DivThe tag cannot be in uppercase or lowercase.Div.

·Required attribute "Alt" not specified ---Image needs to be addedALTAttribute.

·Required attribute "type" not specified --- JSOrCSSThe call Tag is missing.TypeAttribute.

The most common error is the case sensitivity of tags. These errors are usually associated. For example, if you forget one of the </LI> Other <li> labels, an error is reported. Therefore, do not be afraid to see a bunch of errors. An error is usually solved, none of the other errors. If your page passes the xhtml1.0 verification, you can place the following icon on the page:The Code is as follows:

<P> <a href = "http://validator.w3.org/check/referer"> </a> </P>

2. css2 Verification

·Verification URL:Http://jigsaw.w3.org/css-validator/

·Verification Method:Website verification, File Upload verification, and direct code verification

"Congratulations, this document has passed the style sheet validation! ", Hoho, the verification information supports Chinese.

If verification fails, two types of errors are displayed: errors and warnings. The error indicates that it must be corrected; otherwise, it cannot pass verification. The warning indicates that code is not recommended by W3C.,It is recommended to modify.

Css2 Verification common error causes table

: ( error ) invalid number : color909090 not a color value : 909090 --- The hexadecimal color value must be added " # " NO, that is, #909090

· ( error ) invalid number : margin-topunknown dimension: 6 pixels --- pixels not a unit value , correct syntax 6px

· ( error ) attributes scrollbar-face-color nonexistent : # eeeeee --- defines non-standard attributes for the color of the scroll bar.

· ( warning ) line: 0 font-family: we recommend that you specify a category family as the final choice -- W3C we recommend that you , end with a font of the last category , example " Sans-serif " , to ensure that , webpage fonts are displayed.

·(Warning) Line: 0 can't find the warning message for otherprofile --Indicates that there are non-standard attributes or values in the code.,VerificationProgramYou cannot determine and provide the corresponding warning information.

Similarly, after passing the verification, you can place a CSS verification icon. The Code is as follows:

<P> <a href = "http://jigsaw.w3.org/css-validator/"> </A> </P>

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.