• Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Accessibility

      Build web projects usable for all

    • Web Technology

      Web technology reference for developers

  • Learn
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum New
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  • Log in
  • Sign up for free
  1. 面向开发者的 Web 技术
  2. HTML(超文本标记语言)
  3. HTML 参考
  4. HTML 元素参考
    • English (US)
    • Deutsch
    • Español
    • Français
    • 日本語
    • Русский
    • 正體中文 (繁體)

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

在本文中

  • 尝试一下
  • 属性
  • 使用说明
  • 示例
  • 技术概要
  • 规范
  • 浏览器兼容性
  • 参见
  1. HTML(超文本标记语言)
  2. 指南
  3. 内容分类
  4. 注释
  5. HTML 中使用的日期与时间格式
  6. 约束验证
  7. viewport meta 标记
  8. 响应式图片
  9. 微数据
  10. 微格式
  11. 怪异模式和标准模式
  12. HTML cheatsheet
  13. How to
  14. Define terms with HTML
  15. 使用数据属性
  16. 允许图片和 canvas 跨源使用
  17. 在图像上层添加点击映射
  18. 编写快速加载的 HTML 页面
  19. Add JavaScript
  20. 参考
  21. HTML 元素
    1. 已弃用
    2. 已弃用

    3. 已弃用
    4. 已弃用
    5. 实验性
    6. 已弃用
    7. 已弃用
    8. 已弃用

技术概要

,但可以隐式定义,因为其起始标记不是强制性的。 不可以包含 span 属性。
内容分类 无。
允许的内容 无;这是一个空元素。
标签省略 必须有开始标签,不可以有结束标签。
允许的父元素 只能是
隐式 ARIA 角色 没有对应的角色
允许的 ARIA 角色 没有允许的 role
DOM 接口 HTMLTableColElement

规范

Specification
HTML
# the-col-element

浏览器兼容性

参见

  • 学习区:HTML 表格
  • 、、、、、、:其他与表格相关的元素。
  • background-color:用于设置每列单元格背景颜色的 CSS 属性
  • border:用于控制列单元格边框的 CSS 属性
  • text-align:用于水平对齐各列单元格内容的 CSS 属性
  • vertical-align:用于垂直对齐各列单元格内容的 CSS 属性
  • visibility:隐藏列单元格的 CSS 属性
  • width:用于控制每列默认宽度的 CSS 属性
  • :nth-of-type、:first-of-type、:last-of-type:用于选择所需列单元格的 CSS 伪类
  • Help improve MDN

    Learn how to contribute.

    This page was last modified on 2025年4月13日 by MDN contributors.

    View this page on GitHub • Report a problem with this content
    MDN logo

    Your blueprint for a better internet.

    • MDN on Bluesky
    • MDN on Mastodon
    • MDN on X (formerly Twitter)
    • MDN on GitHub
    • MDN Blog RSS Feed

    MDN

    • About
    • Blog
    • Careers
    • Advertise with us

    Support

    • Product help
    • Report an issue

    Our communities

    • MDN Community
    • MDN Forum
    • MDN Chat

    Developers

    • Web Technologies
    • Learn Web Development
    • MDN Plus
    • Hacks Blog
    • Website Privacy Notice
    • Cookies
    • Legal
    • Community Participation Guidelines

    Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
    Portions of this content are ©1998–2025 by individual mozilla.org contributors. Content available under a Creative Commons license.

    、
    、