Today, a friend suddenly asked me about this topic on MSN. I suddenly thought that in the forum, many people have posted questions about the use of DIV and TABLE forms. Here I want to sort out my ideas! About the form After using the WEB standard, it is not to exclude the use of tables. Tables are not useless, but on the contrary, it is a big meal. The reason why it is often mentioned in many articles about CSS layout "Why is it unwise to use table typesetting" is often mentioned in the sentence "Why is it unwise to use table typesetting" By the way, it may be that everyone has a wrong understanding of him. Pay attention to "using table typesetting" here is "unwise". It means that we have used it for many years, and it is unwise to use tables to type. The tables are ultimately It is a way to display "data". You can imagine EXCEL. The form is used. Sometimes the information is displayed using the form to make it clear and easy to read, so the form is used, such as the company employee contact form, product and Model correspondence table, etc. So what is called a table meal, the opinions actually have risen to a higher level, that is, if you can flexibly use tables to display customer data and survey data like a professional market analysis company, then you are truly using tables. Advantages. Therefore, for the long-term use, it should be changed to "Using tables as web page layout, it is unreasonable to layout page elements, and tables are used to display data." About other elements According to my experience, I divide some elements in the XHTML standard into three categories: The first category is what I call auxiliary layout design elements: The second category I call structured elements or information elements here refers to TABLE, UL, PRE, CODE elements are a way of displaying and organizing information. For example, TABLE is obviously used to display table information, UL is used. To display serialized information, when you need to use tables or lists, it is wise to use these two methods to display them. The third category refers to A meta, which is entirely intended to implement some functions, such as META keyword filling in keywords, and A who makes links. Therefore, using WEB standards to create a website is actually a process of rationalizing information integration. You should use the elements in the place and use them as appropriate. Don’t just use the table as a layout tool.
Here I am referring to DIV, SPAN, etc. The main function of this type of element is to layout the entire page. Flexible use of various attributes of these elements can make your page colorful.
Then the correct design idea that meets the standards is:
Use layout elements such as DIV to create page design layout, positioning, color blocks, pictures, etc. Use elements such as TABLE, UL, etc. to display the data that needs to be displayed on the page. Of course, DIV also plays a role in organizing data. Using DIV's ID attributes can It is very convenient to use a DIV as a data block you named