HTML learning (11) Form

HTML tables defined by the <table> tag, following is a table of two rows and three columns:

<table>

<tr>

  <td>11</td>

  <td>12</td>

  <td>13</td>

</tr>

<tr>

  <td>21</td>

  <td>22</td>

  <td>23</td>

</tr>

</table>

tr - table row represents a table row, td - table data indicates the data table, each row represents a few td has several columns.

Table border attribute border <table border = "1"> If the attribute is not defined border, the border is not displayed.

Header <th>, most browsers will display the header text in bold centered:

<table border="1" align="left"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
Header 1 Header 2
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

 

 

Guess you like

Origin www.cnblogs.com/1016391912pm/p/11528881.html