


A brief discussion on html table tag _HTML/Xhtml_web page production
Mainly discuss its structure and some important properties. I'm going to introduce it in a slowly improving way.
1) The basic structure is as follows:
imagine it as a cell in word.
says:
2) A title may be a row title or a column title. How to distinguish it? You need to use the scope attribute scope=row/col.
< ;/th> | |
---|---|
4) Give the table Add introduction summary attribute
tr> | |
---|---|
5) Table border model and cell default padding.
Table borders can be displayed in two ways: separated and merged. border-collapse: separate/collapse The default style of IE6 is
separate, which looks three-dimensional. In fact, it's just that each cell has its own independent border. Merging is a shared border.
table { border-collapse: collapse; }
There is a blank space between cells by default. You can use border-spacing to control it. Because IE6 does not support it, it is rarely used. IE6
Use cellspacing.
< /tr> | |
---|---|
6) Add some rows and columns. And add an id to each
Name | Address | ||||
---|---|---|---|---|---|
ewee | | hubei | | 19870102 | |
| 419880103 | | |||
| 19870205 | |
7) Logically divide the table, after dividing the table into multiple logical areas, you can use CSS to better
control the performance.
Copy code
Name | Address | Date of birth | |||||||
---|---|---|---|---|---|---|---|---|---|
ewee | | hubei | | 19870102 | td> | wuhan | | 419880103 | |
yichang | | 19870205 | |