First, Format:
<table>
<caption> title of the table </caption>
<tr>
<th> title bar </th>
<th> title bar </th>
<th> title bar </th>
</tr>
<tr>
<td> first column </td>
<td> second column </td>
<td> third column </td>
</tr>
<tr>
<td> first column </td>
<td> second column </td>
<td> third column </td>
</tr>
<tr>
<td> first column </td>
<td> second column </td>
<td> third column </td>
</tr>
</table>
<table></table> to declare the start and end of a table
<tr>...</tr> the rows used to set the table
<th>...</th> to set the title field
<td>...</td> columns used to set the table
Ii. Properties of the table
Properties under the 1.<table> tab
Property Name Property Value Description
Border pixels | Setting the outer line of the table
cellspacing pixels/Percent setting storage grid line width
cellpadding pixels/percent set the distance between the data and the border
Width pixels/percent setting table widths
Height pixel/percent setting table heights
Align left table aligned (default)
Center table go to Middle
Right on grid
BgColor the background color of the English/16 binary table
Background the background image of the URL table
bordercolor English/16 color of the border
Bordercolorlight bright color of the same border
Bordercolordark dark color of the same border
Common Properties under the 2.<tr><th><td> tab
Property Name Property Value Description
Width pixels/percent setting widths
Height pixel/percent setting altitude
bgcolor English/16 Data bar color settings
Align (horizontal) left data aligned
Center Center Data Alignment
Right aligns data
valign (vertical) Top data is snapped to the top
Middle Data center Alignment
Bottom data is aligned by the bottom
NoWrap not wrapping in cells
3. Merging cells
Property Name Property Value Description
Colspan numbers to both sides of the field
rowspan Digit down-scale field
Example: <th colspan= "2" > merging the current cell and the right cell
<TD rowspan= "5" > merges the current cell and the four cells below the current cell
Common Properties under the 4.<caption> tab
Property Name Property Value Description
Align Top title above table
Bottom title below the table
This article is from the "Raffaele" blog, make sure to keep this source http://raffaele.blog.51cto.com/6508076/1553943
HTML Learning Note 3-table