Advantages of Div + CSS standards

Source: Internet
Author: User
1. Greatly reduce page code, increase page browsing speed, and reduce bandwidth costs;

2. Clear structure, easy to search by search engines, and naturally optimized Seo
 
3. Shorten the revision time. You can simply modify several CSS files to redesign a site with hundreds of pages.
 
4. Powerful font control and layout capabilities. CSS controls font capabilities are much better than poor font labels. With CSS, we no longer need to use font labels or transparent 1 px GIF images to control titles, change the font color, font style, and so on.

5. CSS is very easy to write. You can easily write CSS like writing HTML code.

6. improve ease of use. CSS can be used to structure html. For example, <p> labels are only used to control paragraphs, heading labels are only used to control titles, and table labels are only used to display formatted data. You can add more users without creating independent versions.

7. It can be designed and released everywhere. Your design is not only used for Web browsers, but can also be published on other devices, such as Powerpoint.

8. better control of the page layout. Needless to say.

9. Separation of performance and content. Remove the design part and place it in an independent style file. You can reduce the possibility of invalid web pages in the future.

10. It is easier for search engines to search. Replace nested tags with HTML that only contains structured content. The search engine will search for your content more effectively and may give you a higher rating (ranking ).

11. table layout is not flexible. You can only follow the table tr TD format. And Div you can Div h1-h6 P span ul Li and other tag combinations to write ...... But it must comply with the standard syntax.

12. In addition, if you are not a master of javascrput, you do not have to write the ID. You only need to use the class. When the client programmer writes the program and needs to adjust it, you can use its ID to control it.

13. There will be a lot of spam code in the table layout. Some modified styles and layout code are mixed together, which is not intuitive. While Div can better reflect the separation of style and structure, and the restructuring of the structure is strong.

14. It can be used in almost all browsers.

15. Previously, some functions that had to be implemented through image conversion can now be easily implemented with CSS to download pages faster.

16. Make the page font more beautiful and easier to orchestrate, so that the page is truly pleasing to the eye.

17. You can easily control the page layout.

18. You can update the style formats of many web pages at the same time without updating them one page at a time. You can use a CSS file to control all the webpage styles on the site. As long as you modify the corresponding lines in the CSS file, all the pages of the whole site will change accordingly.

Supplement:

  1. Search Engine affinity:Search engines do not care about the design or composition of a page. It is impossible for a search engine to "enjoy" the design of beautiful and novel pages, nor to "exclude" the color with ugly pages. They just leave without knowing what they need. If a page contains a large number of tables to describe the architecture, how much will it take for a search engine to get really useful information?
Based on my own experience, in general, the size ratio of the style structure and content information of the page described by the table architecture may reach or higher. While the CSS + Div architecture page, although it seems that downloading a complex CSS on the client also occupies almost the same bandwidth, the search engine can easily bypass this CSS, instead, directly capture the content in the div. This is the advantage of Div. The bandwidth is slightly occupied, which is totally insignificant. What's more, a redundant table design architecture will occupy more bandwidth if the code is poorly written.

  2. Page reconstruction:The most typical example of this application is the various blog programs. For example, my LBS system and popular pjblog and WP and MT under PHP all adopt the DIV + CSS architecture. The separation of content and style leads us to redefine the specific position and style of each Div element when restructuring the page layout (replacing the skin. It is too troublesome to modify the original table to change almost all content injection channels.

Supplement B:(In terms of procedures)

1. Using Div to nest programs, 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.

2. Using Div for designing and using Ajax 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 effect, Firefox and other browsers have made a lot of Optimization on 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 to search. The current search engine only analyzes the Page code. Therefore, the page code is smaller and has semantic pages, and the search engine is more efficient, 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.