A table is an awkward label in XHTML. This section only describes how to use tables. Before CSS becomes popular, tables are widely used for positioning. In XHTML, table is not recommended for positioning. W3C hopes that CSS can replace & lt; table & gt; in positioning. But in fact, the use of CSS layout often requires a lot of hand-written code work (the commonly used Web Design Soft table is an awkward label in XHTML, this section only to understand.
Before CSS became popular, table was widely used in positioning. In XHTML, table is not recommended for locating. W3C hopes CSS can replace
Position in positioning. But in fact, using CSS layout often requires a lot of hand-written code work (commonly used web design software such as Dreamweaver does not support p display perfectly ),
Many websites still use the homepage layout, for example, Google's More products page uses table to locate the problem. However, I personally recommend that you start to use CSS to locate Web pages, because this is the development direction of Web. Of course, replacing table with CSS in the early stage may cause a lot of trouble. Table label
In XHTML, the label for creating a table is
When writing code, we must first use
Label the table into one row, and then use
Tags divide each row into one grid. It is very difficult and inefficient to create a table with full handwriting code. In the web page creation software, creating a table is as simple as Word. You only need to select simple attributes such as columns and columns. However, we may encounter the possibility that the automatically created table does not meet the requirements and needs to be adjusted in code mode. Therefore, we still need to know the specific syntax of XHTML table labels. Border attribute of a table
Labels can have the border attribute. If you do not set the value of the border attribute, the browser will not display the border of the table by default. Table exerciseLet's create a label with four rows and two columns. The Code is as follows:
A grid |
A grid |
A grid |
A grid |
A grid |
A grid |
A grid |
A grid |
The result is as follows: note that there are four pairs |
Corresponding to the following four rows. No
There are two more
Cell. Therefore, it becomes a table with four rows and two columns. One grid, one grid, one grid Such a table is sufficient to list information such as data, but the table to be located is usually more complex. Once again, we do not recommend using table for positioning, so here we just briefly introduce
|