首页 > 试题广场 >

下列哪些元素可以作为table元素的子元素?

[不定项选择题]
下列哪些元素可以作为table元素的子元素?
  • caption
  • col
  • tr
  • tbody
col 为表格中一个或多个列定义属性值
发表于 2020-03-09 10:54:15 回复(0)
caption是表格的标题
发表于 2019-09-20 07:26:36 回复(0)
col 元素是仅包含属性的空元素。
发表于 2019-09-03 18:56:29 回复(0)
col是作为colgroup(定义表格中的列)的子元素存在的!
发表于 2019-08-19 10:54:04 回复(0)
所以,为啥没有B
发表于 2020-10-19 16:11:32 回复(0)
<table width="100%" border="1">
  <col align="left" />
  <col align="left" />
  <col align="right" />
  <tr>
    <th>ISBN</th>
    <th>Title</th>
    <th>Price</th>
  </tr>
  <tr>
    <td>3476896</td>
    <td>My first HTML</td>
    <td>$53</td>
  </tr>
</table>

不知道为何不是子元素

发表于 2019-08-16 11:38:48 回复(0)
caption是标题
tbody是内容
tfoot是页脚
发表于 2021-08-31 14:19:33 回复(0)
col 元素为表格中的三个列规定了不同的对齐方式:
<table width="100%" border="1"><col align="left" /><col align="left" /><col align="right" /><tr>
    <th>ISBN</th>
    <th>Title</th>
    <th>Price</th>
  </tr>
  <tr>
    <td>3476896</td>
    <td>My first HTML</td>
    <td>$53</td>
  </tr>
</table>
发表于 2020-02-23 17:03:16 回复(0)
table的子元素可以是caption, col, tr, tbody
发表于 2021-10-22 17:00:34 回复(0)
看多了这个w3c网站了。。。
发表于 2020-01-04 12:11:18 回复(0)
我在菜鸟教程看到col也是可以作为其子元素的,不知道为啥答案没有它!!!

发表于 2022-03-01 21:01:17 回复(3)
col是作为colgroup(定义表格中的列)的子元素存在的
发表于 2023-10-11 20:23:35 回复(0)
tr不是直接属于table的子元素吧
发表于 2022-08-26 13:58:36 回复(0)
caption是表格的标题
发表于 2022-02-15 14:59:06 回复(0)
caption是表格的标题
tr是表格行
tbody是定义表的核心内容
发表于 2021-09-21 22:14:01 回复(0)
table可以直接包含tr
发表于 2019-09-30 10:44:46 回复(0)