Detailed table label

1. There is no tbody tag in the table tag, the browser will automatically add it

2. The thead, tfoot and tbody elements may not be used in the layout of the general table. In this way, the browser will automatically give a tbody tag when parsing.

 

 

Complete table form:

<table border="1">
  <thead>
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
  </thead>
  <tfoot>
    <tr>
      <td>Sum</td>
      <td>$180</td>
    </tr>
  </tfoot>
  <tbody>
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$80</td>
    </tr>
  </tbody>
</table>

 

Commonly used and simple tables (browser parsing will automatically add a tbody tag to the table):

<table border="1">
    <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>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324927462&siteId=291194637