The advantages of using W3C to build a site from the perspective of a programmer

Source: Internet
Author: User
I have met many Program The member complained in the QQ discussion group in the blog park that the application of Div + CSS to build a website that complies with W3C standards will increase the workload of programmers. In fact, this is just an excuse, or programmers themselves do not want to change to adapt to technological changes. In fact, using Div + CSS to build a W3C-compliant website has many benefits for programmers. We can see the following eight advantages.

1. Use Div to nest programs, especially PHPCodeNesting can reduce the amount of code that is as heavy as in the table, and reduce the problems caused by table code for page nesting.

Ii. When using Div for designing and using Ajax, it can reduce the complexity of JavaScript code for page control, because there are at least three layers of hierarchies when using table, table-tr-Td and above, while div is basically only two layers (div-Div.

3. Use Div to locate the page more accurately, because the width and height of the code using Div are controlled by CSS or style of the page, that is, you need to modify a box) you can directly modify the CSS code or the style code of the label. There is almost no need to modify other Code. However, when using a table, the position of the table may change, which affects the modification of the entire code.

4. In terms of page effects, Firefox and other browsers have made a lot of Optimizations to the table, so that Firefox can be so close to ie when processing page output, however, for some table formatting, Firefox may have at least some other problems. These problems may not exist in IE, but may occur in browsers using Firefox and other engines.

5. The output code will be smaller. Because div is used to organize Page code, and the layout is controlled by CSS and other files, the code generated from the output HTML is generally 70% less than the page using table. Considering the load of the system, the loss of the code will be better solved, which helps maintain the stability of the system.

6. It is more convenient for search engines. The current search engine only analyzes the Page code. Therefore, the page code is smaller and has semantic pages, and the search engine has higher efficiency, users' text information is more easily collected by search engines, and Web websites are more easily referenced by search engines.

7. It is inevitable that we still use the table method in some locations on the page, such as the product list, order list, and submission form. We still use the table method, this is because the implementation of div is not very mature for such forms.

8. The W3C standard is currently the mainstream for website development. As a professional web development team, why not use this technology!

Related Article

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.