Some misunderstandings of web standards for beginners

Source: Internet
Author: User
Tags define
Web|web Standard | Beginners are very happy to see many designers start to pay attention to and try to use Web standards to make Web pages. But from the Netizen's question and the production found a few problems, here special reminder:

1. Not to standardize by verification.

Web standards are meant to be a separation of content (structure) and performance by stripping out styles and placing them in separate CSS files. The advantage of this is that you can handle content and performance separately, and also facilitate search and reuse of content.

The CCS2 is just a checklist to help you check whether your XHTML code is written or not, and whether the CSS attributes are within the specification. The standardization of code is only the first step, not the passing of the checksum, my web page is standardized. We are not for the title, or to show off: "See my page passed the check" and to standardize, our goal is to make their web design work more efficient, in order to reduce the size of the Web page, in order to be able to browse in any browser and network equipment.

Please be careful to study and understand the meaning of Web standards. The network is full of not impetuous and vanity, please do not bring this ethos to the Web Standard application, this will only affect and damage the promotion of web standards.

2. Do not use the traditional form of thinking to set Div

"CSS layout is the original use of the table with a DIV to replace the original table is nested, now is a div nesting." "This view is wrong!"

Please jump out of the original form of the layout of the prison, discard a TD and a TD to place pictures and content of the way of thinking. As we said above, the purpose of web standards is to separate content and performance, you can think like this, there is only content in the page, there is no modification of the case, it looks like a white page, there are some text and pictures (this image refers to the content of the picture, is the real meaning of the picture). These text pictures are only listed in sequence, only the structure, without any style. Then add the performance, all decorated pictures as the background, with C SS to define the position of each piece of content, font, color and so on.

This makes the page is the content and performance separation, that is, when you pull out the CSS file, the rest is clean content. This can be read in the text browser, in the mobile phone, PDA reading, can modify the CSS to achieve the revision at any time.

3. Do not have to create an ID for each piece of content

Some netizens complain that the CSS file is too big and too complex. Take a closer look at their code and find out why they define a div for each piece of content, or even for each sentence, to create an ID. This is a lack of familiarity with stylesheet applications and, on the other hand, a lack of thorough understanding of web standards.

We know that content is structured (if you don't understand, read: Understanding performance and structure separation), the same structure of the content we can use the same style to define, such as the same level of title, body, picture. A style that is referenced multiple times can be defined with class, with no ID required, and not necessarily with <div>, and you can use <p> instead, which is also a block-level element, with seven parameters of the box model,<div> just easy to float.

As for the extra div just for line height, spacing, and a decorated picture, I think you can quickly omit this as you apply and understand CSS. We are opposed to using div nesting to replace the nesting of the table, which has no meaning and does not embody the structure of the content. I hope that you study css, write the most concise, most effective style sheet.

4. Don't give up because of a little setback.

I think it's a matter of attitude and approach, not just for learning web standards. It is difficult to learn any new knowledge and to accept new concepts, especially when you have to change the habits and thoughts you already have. The only question is: Do you think it is worthwhile to learn web standards? Ask yourself: Do you recognize the benefits of Web standards (simplify code, accelerate development, compress file sizes, improve download speed, ease of use, get more users, be easier to maintain, multi-platform compatible)? Do you feel that the world's common XML is far from you? Do you think the HTML knowledge you have now is enough?

Since 99, the Web page production technology in China has not been how to progress and change over (except the rise of Flash), and the pace of foreign progress has not stopped, xhtml1.0, xhtml1.1, XML, XSL ..., Both the consortium and the major software companies are constantly researching and promoting web technology, making it more convenient, more efficient and more powerful. The application and promotion of web standards abroad for more than eight years (with the Zeldman Web Standards Organization Web site as the starting point), although the difficulties, but is gradually accepted and recognized. Why we still revel in the surface of the site "bustling", not to think about the nature of the page behind the things.

Do you want China to continue to lag behind? Do you want to keep falling behind yourself? All decisions lie with you.

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: 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.