Problems in the application of Web standards in the Classic style table contest

Source: Internet
Author: User
Tags object header
Web|web Standard | problem | style sheet Author: Atzie 2004-11-8 11:36:30

The first resume style sheet design competition has been awarded the winning works, congratulations to all the winners, but also encouraged all the outstanding players to continue to refuel. I want to sum up the problems that exist in the works so that we can see what is going on there.

A. CSS checksum problem

First, according to the requirements of the competition, the entries must conform to XHTML standards, and the submitted CSS must be validated by the consortium. CSS Check the situation is more ideal, the entries only 8 works failed CSS2.0 Check, the main error is: "line:0 font-family: suggest you designate a family of species as the final choice."

When the consortium recommends a font definition, it ends up with a font of one category instead of ending with a single font. For example, "Sans-serif" to ensure that the page fonts can be displayed under different operating systems.

Although most people define "Sans-serif" on the body tag, the SANS-SERIF is omitted when another font is defined in another ID or class, and is considered to be a checksum. This error is not very serious, as long as a little attention can be avoided.

Two. CSS writing suggestions

    1. Annotate the CSS file. Comments will be convenient for your future maintenance, it is recommended to annotate CSS files whenever possible, do not worry about adding a small number of bytes.
    2. Try to abbreviate CSS syntax. For example, the color value "#FFFFFF" can be written as "#FFF"; padding-top:30px; Padding-right:0;padding-bottom:10px;padding-left:2 0px "can be abbreviated to" padding:30px 0 10px 20px; ". There are more savings tips on defining skills, and you'll find better ways to keep up with the use of CSS.

Three. XHTML checksum problem

Because it is the style table competition, we pay attention to the CSS checksum, but in the XHTML compliance with the standards of a little overlooked, there are many low-level errors. The main issues are listed below:

  1. Target= "_blank", this syntax in HTML4.0 is correct, in XHTML1.0 is not allowed to use. One of the solutions is to write target= "new", and another way is to use JS to handle all target;
  2. Style sheets are best not embedded, and the stylesheet files are independent and easy to maintain. If inline

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.