On the advantages and disadvantages of DIV+CSS

Source: Internet
Author: User
This article mainly and everybody discusses Div+css's advantage and disadvantage, has the very good reference value, hoped has the help to everybody. Follow the small series together to see it, hope to help everyone.

Div itself is the container nature, you can not only inline table can also embed text and other HTML code, CSS is cascading style sheets abbreviation, the Chinese translation "Cascading style form", in the home page production using CSS technology, can effectively on the layout of the page, fonts, colors, backgrounds, and other effects for more precise control. As long as you make some simple changes to the corresponding code, you can change the different parts of the same page, or the appearance and formatting of pages of all pages.

the DIV+CSS standard has the following advantages:

1, because the CSS layout, not like the table layout is filled with a variety of attributes and numbers, and many CSS files are usually common, which greatly reduce the page code, improve page browsing speed.

2, the structure is clear, the search engine is more friendly. More easily indexed by search engines, with the innate conditions of search engine SEO, with excellent content and some SEO processing, you can get a better ranking of the site.

3, Compatibility is better, in line with the development trend of web standards, can be used in almost all browsers, will not appear in different browsers, the effect of a large gap in the situation.

4, shorten the revision time, because the layout of the site is through the external CSS files to control, as long as the simple modification of a few CSS files can be a lot of Web page style format update at the same time, do not have to page by page to update. You can use a CSS file to control all the Web page styles on the site, and as long as you modify the corresponding line in the CSS file, all pages of the entire site will be changed.

5, strong font control and typesetting ability, CSS control font ability than bad font tag much better, CSS no longer need to use the font tag or transparent 1px image to control the title, change the font color, font style and so on.

6, improve ease of use, using CSS can be structured HTML, for example: P tag is only used to control the paragraph, the H1-H6 tag is only used to control the title, the table tag is used only to display formatted data and so on. You can add more users without having to build a separate version.

7, better extensibility. Your design is not just for web browsers, but also for publishing on other devices, such as PowerPoint.

8, more flexible control page layout, usually the download of the page is in accordance with the order of the Code, and the layout of the tabular code is from the top down, from left to right, cannot be changed. With CSS control, you can arbitrarily change the order in which the code is arranged, such as loading the important right content first.

9, the performance and content of the separation, clean, the design part of the split out in a separate style file, and the main page to place your content, you can reduce the future of the page is not possible.

10, more convenient search engine included, and get a higher evaluation. Instead of nesting tags with HTML that contains only structured content, the search engine will search your content more efficiently and may give you a higher rating (ranking).

11, Table table layout flexibility is not very flexible, you can only follow the table TR TD format. and P you can p ul Li can also ol Li can also ul Li ...

12, table layout, garbage code will be many, some of the modified style and layout of the code mixed together, it is not conducive to intuitive. The DIV is more able to embody the separation of style and structure, and the structure is strong in reconstruction.

13. Some of the previous features that must be implemented through image conversion are now easy to implement with CSS, allowing you to download pages faster.


DIV+CSS has so many advantages, but it also has some bad places:


1, CSS Web site design elements are usually placed in 1 external files, or a few files, it may be quite complex, or even large, if the CSS file call exception, then the entire site will become miserable.

2, Div+css Although not high, but at least more complex than the table positioning, even for the site design experts are also prone to problems, not to mention beginners.

3, although said Div+css solve most of the browser compatibility issues, but also in some browsers to use the exception, such as Firefox browser, in IE display the normal page, to the Firefox browser may be unrecognizable. Of course, this should be a browser problem, but it can be said that for the time being, DIV+CSS has not implemented all browsers unified compatibility.

4, Div+css on the search engine optimization or not, depending on the professional level of web design, rather than div+css itself. DIV+CSS Web design does not guarantee that the search engine optimization, or even more than the HTML site has a more concise code design, not to mention the search engine for the collection and ranking of Web pages is not based on whether the table and CSS positioning to measure, That's why many of the traditional forms of table layouts are sorted in search results, and many web pages that use CSS and Web standards are still ranked behind. Because for the search engine, the website structure, content, related website links and other factors are always the most important index of website optimization.

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.