XHTML Day 12th: Checksum common errors

Source: Internet
Author: User
Tags end error code file upload
xhtml| error For many days, we worked hard to learn how to use XHTML+CSS to redesign our website. So how do we know that our own pages really conform to the 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!", as shown in figure:

Validation fails with more checksum options and error messages, as shown in figure:

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 other
  • tags will be an error, so do not see a bunch of false fear, usually solve a mistake, the other mistakes are gone. If your page passes the xhtml1.0 checksum, you can place an icon on the page: The code is as follows:

    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!" ", HoHo, check the information to support Chinese OH. As shown in figure:

    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.
    Similarly, after testing, you can place a CSS checksum through the icon, the following code:

  • Related Article

    Cloud Intelligence Leading the Digital Future

    Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

    Register Now >

    Starter Package

    SSD Cloud server and data transfer for only $2.50 a month

    Get Started >

    Alibaba Cloud Free Trial

    Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

    Learn more >

    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.