Comparison of advantages and disadvantages of transition from Table to Css

Source: Internet
Author: User

The voice of CSS layout advocates is being overwritten by the voice of "advantages of table layout. CSS is hard to learn. In fact, CSS is no more difficult than other Web technologies. The problem is that web designers who are already quite experienced in table design have to give up their mindset and use CSS instead.

I used table layout for many years. When I first started using CSS layout, I also encountered a problem. "It's easy to use tables." I think. However, it is because I have used tables and I know how to handle them skillfully. Any changes, even a small one, will make me feel troublesome, not to mention such drastic changes.

Recalling my first learning to use table layout, there are also a lot of problems surrounding me. Let's look back at those rowspans, colspans, and blank GIF images. To be fair, the two layout methods make table layout more difficult.

Another old idea is that the CSS design page (number of bytes) is very large, which is larger than the table design page. The reason is: Because you put all the styles of the entire site in one file, when a user accesses a page, the style sheet containing the whole site style needs to be downloaded, so the page is very large.

So why do you need to put all styles in a CSS file? No one limits you to use only one CSS file. You can create a separate sub-style table file for the detailed styles in some chapters. In my experience, I have never used a single style sheet file, from a simple manual site to a large database driver and a multi-functional system website, no home page has more code than table design. The tables, tr, and td tags occupy a lot of space. immediately take action and use the CSS layout method to cut down your file size.

When you use table layout, you lose the semantics of the tag. The standard web method layout separates the content and presentation layer, which brings huge benefits. When you lock your design with a table, once you need to change it, you must find this page, analyze the table structure, and modify it one page at a time, CSS files can easily change the design of the entire site. With CSS, you don't have to consider device independence, and you don't have to consider choosing your own style.

I also heard about the "benefit" of a table: designing forms. However, forms can be used to arrange tables in any way. Is it for Netscape4? I have never heard of a reason to support such an old browser. The benefits of most mainstream browsers are far greater than those of a few browsers that do not support Style Sheets (CSS also supports plain text ).

The views of those "supertables" supporters come down to one point: "tables are easier. "This is nonsense! If you are satisfied with an inefficient method, you can do whatever you want. If you want to break through the restrictions to make the page content more generic, easy to use, and less code, then try to change. Of course, if you are new to web design and start from scratch, you will not have these problems.

"The car doesn't just push", "This is just a tool in the designer's toolbox. "This is the opinion of some commentators. The table layout is like a screw on an old-fashioned wooden handle. You can still use it to drill into a wall. I would rather use electric screws to make CSS la s more efficient, instead of blisters on my hands.

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.