When do I use a table after using div?

Source: Internet
Author: User
Today, a friend on MSN suddenly asked me this topic, suddenly thought in fact in the forum, about the use of div and table tables Many people sent a post asked, here I want to tidy up my ideas!

About tables

The use of web standards, not to exclude the use of the table, the table is not a chicken, but just the opposite is a feast, the reason for many articles on CSS layout is often mentioned why the use of table typesetting is not wise this sentence, may be that everyone's understanding of his mistake, Note here that it is unwise to use table typesetting. Refers to that we have used for many years, the form of typesetting is not wise, the form of the bottom of the table is a way to display data, you can imagine that the table is the use of this, and sometimes the information used in the table display so that we can be clear and easy to read, Therefore, the use of forms, such as company staff contact form, product and model corresponding table.

So the so-called table meal, in fact, the idea went up to a level, that is, if you can like professional market analysis companies, flexible use of tables to display customer data and survey data, and so on, that is the real advantage of the table.

Therefore, the use of the sentence for a long time, you should use the table as a Web page layout, the page elements are not reasonable, the table is used to display data.

about other elements

I use my experience here to divide some elements of the XHTML standard into three broad categories:

The first kind is what I call the auxiliary layout design element: Here I refer to the Div,span and so on, this kind of element's main function is uses in the Layout entire page, the nimble use these element's various attributes, may let your page performance richly colorful.

The second Class I call a structured element or an informational element. This refers to the Table,ul,pre,code class element is a kind of information display and collation, such as table is obviously used to display tabular information, UL is used to display the information, when the need to use a table or list, It's wise to show it in these two ways.

The third category refers to the Ameta, completely to achieve some functions, such as filling in the keyword Metakeyword, as well as a link to a. Then the correct standard design idea is: the use of div and other layout elements to make the layout of the page design, positioning, color blocks, pictures and other use table, Such elements as UL to display the page needs to display data of course, Div also play the role of data, use div id attribute can be very convenient to a div as a data block of your name

Therefore, the use of web standards to create a Web site, is actually a process of rationalization of information, where to use what elements or replicable is not mistaken, do not use the table as a layout tool on the line







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.