Benefits of setting up a standard WEB page with DIV + CSS

Source: Internet
Author: User

Using DIV + CSS to build a W3C-compliant website has many benefits for programmers. We can see the following eight advantages.

I. Using div for program nesting, especially using code like php, can reduce the amount of code that is as heavy as in table, page nesting can reduce the problems caused by table code.

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.