After DIV + CSS is used, is Table still used?

Source: Internet
Author: User
The webpage that meets the webpage standard is made by DIV + Css. Are the tables we used before still usable? Are you sure you want to give up?

Many people are confused about the use of DIV and TABLE tables!

About tables

After the WEB standard is used, it does not mean to exclude the use of tables. Tables are not chicken ribs, but on the contrary, they are a big meal, the reason why "it is unwise to use table layout" is often mentioned in many articles about CSS layout is that you may have incorrect understanding of it, note that "using table formatting" is "unwise. we have been using tables for many years. It is unwise to use tables for formatting. In the final analysis, a table is a way to display "data". You can imagine Excel, the table is used for this purpose. Sometimes the information is displayed in the table so that we can read the table clearly and easily, so we can use the table, such as the company employee contact table, and the product and model table.

In fact, the opinions of the so-called table dinner have risen to a level. That is to say, if you can flexibly use tables to display customer data, survey data, and other messages like professional market analysis companies, the advantage of the table is actually used.

Therefore, if the sentence is used for a long time, it should be changed to "using tables as web page layout, the layout of page elements is unreasonable, and tables are used to display data ".

Other elements

Based on my experience, I have divided some elements of the XHtml standard into three categories:

The first type is what I call the secondary layout design element:

Here I am referring to DIV, SPAN, etc. The main function of these elements is to layout the entire page. The flexible use of the various attributes of these elements can enrich your page.

The second type is structured or information.

TABLE, UL, PRE, and CODE elements are used to display and organize information. For example, TABLE is obviously used to display TABLE information, UL is used to display columnar information. It is wise to use these two methods to display the information in tables or lists.

The third category refers to A meta, which is completely designed to implement some functions, such as the META keyWord with the keyWord, and the link.

The correct design method is:

Use DIV and other layout elements to create the design layout, positioning, color block, and image of the page.

Use such elements as TABLE and UL to display data on the page

Of course, DIV also plays a role in data sorting. Using the ID attribute of DIV, you can easily use a DIV as a data block with your name.

Therefore, using WEB standards to create websites is actually a process of rational integration of information, where the elements to be used are still correct. Do not use tables as layout tools.

<
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.