是否有用于将"td"分组的标签?或"th"标签? [英] Is there a tag for grouping "td" or "th" tags?

查看:95
本文介绍了是否有用于将"td"分组的标签?或"th"标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在用于分组thtd元素的标签?

Does a tag for grouping th or td elements exist?

我需要这样的东西:

<table>
  <thead>
    <tr>
      <th></th>
      <th></th>
      <GROUP>
        <th></th>
        <th></th>
      </GROUP>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td></td>
      <td></td>
      <GROUP>
        <td></td>
        <td></td>
      </GROUP>
    </tr>
  </tbody>
</table>

否,colcolgroup(必须在第一个元素之前插入)不是解决方案.

No, col and colgroup (which must be inserted before the first element) are not a solution.

推荐答案

是否存在用于对th或td元素进行分组的标签?

Does exists a tag for grouping th or td element?

是的,它叫做colgroup.

Yes, it's called colgroup.

不想使用colgroup?抱歉,这就是在HTML中对表格列进行分组的方式.使用或不使用提供给您的工具.

Don't want to use a colgroup? Sorry, that's how grouping table columns is done in HTML. Use the tools given to you, or don't.

这篇关于是否有用于将"td"分组的标签?或"th"标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆