#6Tables

作者: 淇漯草 | 来源:发表于2018-08-08 16:56 被阅读0次

The table element defines the table.

The tr element defines a table row.

The td element defines a data cell. These must be enclosed in tr tags, as shown above.

If you imagine a 3x4 table, which is 12 cells, there should be four tr elements to define the rows and three td elements within each of the rows, making a total of 12 td elements.

<body>
  <table>
      <tr>
          <td>Row 1, cell 1</td>
          <td>Row 1, cell 2</td>
          <td>Row 1, cell 3</td>
      </tr>
      <tr>
          <td>Row 2, cell 1</td>
          <td>Row 2, cell 2</td>
          <td>Row 2, cell 3</td>
      </tr>
      <tr>
          <td>Row 3, cell 1</td>
          <td>Row 3, cell 2</td>
          <td>Row 3, cell 3</td>
      </tr>
      <tr>
          <td>Row 4, cell 1</td>
          <td>Row 4, cell 2</td>
          <td>Row 4, cell 3</td>
      </tr>
  </table>
  </body>

相关文章

  • #6Tables

    The table element defines the table. The tr element defin...

网友评论

      本文标题:#6Tables

      本文链接:https://www.haomeiwen.com/subject/mlbtbftx.html