The <col> Element
Technical summary
col is an empty element that represents one or more columns inside its parent colgroup. It lets authors group column settings, but it does not create cells, headings, or column names.
Write column headings in th and data in td or th. CSS effects and accessibility relationships for column elements differ from those of ordinary elements and cells.
Definition, placement, and HTML requirements
A col represents one or more columns in its parent colgroup when that group belongs to a table. A colgroup with a span attribute must not also contain child col elements.
| Item | Specification requirement | How to read it |
|---|---|---|
| Parent | A colgroup without a span attribute | Put columns inside their group |
| Content | Nothing | Do not put heading or cell text inside |
| End tag | No end tag in HTML | Write <col> only |
| Attributes | Global attributes and span | span is the number of columns represented |
span and column counts
A col without span represents one column. Conforming HTML can specify an integer from 1 through 1000. If a colgroup has child col elements, their span values describe the number of columns in that group.
<colgroup>
<col> <!-- 1 column -->
<col span="2"> <!-- 2 columns -->
</colgroup>
HTML conformance and DOM property behavior are separate rules. HTMLTableColElement.span is an unsigned long whose default is 1. Setting it from script clamps values to the range 1–1000. When the table model forms columns, invalid or zero values are treated as 1, and values above 1000 are limited to 1000.
A group can use colgroup span without child col elements, or it can add child col span values. Do not combine the two methods on the same group.
Table model, parser, and DOM API
The table model builds a grid of rows, columns, and cell slots. col and its span participate in forming columns and column groups, while cells remain DOM children of tr. A cell is not a child of a col.
Conforming HTML puts col inside colgroup. The parser can create an implied colgroup when it encounters col directly under a table, but parser recovery does not make that source markup conforming.
const column = document.querySelector("col");
column instanceof HTMLTableColElement; // true
column.span; // 1 when omitted
column.span = 0;
column.span; // 1
// Table cells are children of tr, not col.
col and colgroup use the same HTMLTableColElement interface. The HTML Standard does not define a column collection property such as table.columns.
CSS column boxes
The CSS table model has boxes for columns, but these boxes do not wrap cells in the DOM. CSS 2.1 limits the properties that apply to columns and column groups, and defines conditions for how they affect cell painting and table width.
| Property | Condition and effect |
|---|---|
background | The column background shows through when the backgrounds of its cells and rows are transparent |
width | Sets a minimum width for the column; it does not guarantee a fixed final width with automatic table layout |
border | Contributes to border conflict resolution when the table uses border-collapse: collapse |
visibility | collapse hides the column and affects table width and spanning cells |
As a result, properties such as color or padding do not affect cell text or spacing in the same way as they affect ordinary elements. Selected WPTs include unresolved differences in CSS column sizing, so measurements are not presented as guarantees for every browser.
Header relationships and accessibility mapping
col does not provide visible heading text or an accessible name for a column. Write headings in th and use scope or headers to express header relationships when the table structure requires them. Do not make color the only way to tell columns apart.
The HTML-AAM Editor's Draft lists no computed role or mapping for col in the platform accessibility APIs covered by the draft. This describes specification mappings. A browser accessibility tree, operating-system API, and screen-reader speech are separate observations.
Facts and evidence
The main normative claims are linked to their source locations. Browser observations are recorded separately below, and unmeasured scope remains listed under Coverage.
| Type | Fact / claim | Scope and conditions | Status | Source |
|---|---|---|---|---|
| SPEC | col is a child of a colgroup without span, has no content, and has no HTML end tag. | Element context, content model, and tag omission | Reviewed | HTML Standard: the col element |
| SPEC | col span represents 1–1000 columns and participates in the table model's column-forming steps. | Separates conforming markup, DOM reflection, and table processing | Reviewed | HTML Standard: col / forming a table |
| SPEC | CSS 2.1 applies background, width, border, and visibility to column boxes under specific conditions. | Table layers, border-collapse, column sizing, and visibility collapse | Reviewed | CSS 2.1: columns |
| SPEC | HTML-AAM does not map col to an ARIA role or the listed platform accessibility APIs. | HTML-AAM 1.0 Editor's Draft element mapping | Reviewed | HTML-AAM: col |
Evidence
- HTML Standard: The
colelement — context, empty content model, end-tag omission, span, and interface - HTML Standard: Forming a table — columns, groups, slots, and cell spans
- HTML Standard: The “in table” insertion mode — parser handling of table children
- CSS 2.1: Columns — applicable properties and column effects
- HTML-AAM:
col— computed role and platform mappings - Web Platform Tests:
col-span-limits.html— span limits, reflection, and table layout - Web Platform Tests:
colgroup-col.html— tentative CSS column and column-group width checks
Implementation evidence
Browser DOM and CSS observations, selected WPTs, and accessibility-tree queries are recorded separately. Each result is limited to its environment and test scope.
| Type | Reproduced scope | Conditions | Status |
|---|---|---|---|
| IMPL | The HTMLTableColElement interface, span, table model, CSS display, and column background for col |
2026-10-19 JST / Chrome UA 155.0.0.0 / viewport 1280×720 / DPR 1.25 / navigator.language=ja. Confirmed title, h1, and main on the four Yugien ja/en and Atlas ja/en pages. Fixture at loopback 127.0.0.1:4201: 16/16 checks passed for the interface, span default/reflection/setter clamp, child behavior, computed display, table model, and column background. Details: docs/atlas/col-evidence-2026-10-19.md. One Chrome environment only. |
Partial observation (Chrome 155 / fixture 16/16) |
| WPT | Selected WPTs for col span limits, reflection, and column width |
2026-10-19 JST / Chrome UA 155.0.0.0 / wpt.live. col-span-limits.html: 3/5 passed, 2 failed. colgroup-col.html: 4/6 passed, 2 failed. Total: 7/11 passed, 4 failed. Failures were differences between expected and measured column widths. Harness status was OK for both tests. The served upstream revision was not pinned. Details: docs/atlas/col-evidence-2026-10-19.md.The test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version. |
Partial run (7/11 selected WPT assertions passed; 4 failed; revision unpinned) |
| AAM | Exposure of a named table, rows, cells, and col in the Chrome browser accessibility tree |
2026-10-19 JST / Chrome UA 155.0.0.0 / viewport 1280×720 / DPR 1.25. The fixture's named table Quarterly plan prices appeared as 1 table, 3 rows, and 9 cells. col did not appear as a separate node; the HTML-AAM Editor's Draft also has no corresponding role. Chrome browser accessibility tree only; platform APIs and screen-reader speech were not measured. Details: docs/atlas/col-evidence-2026-10-19.md. |
Partial observation (Chrome browser accessibility tree / one environment) |
Coverage and open issues
- SPECElement meaning, placement, content model, span, table model, CSS 2.1, and HTML-AAM mapping
- IMPLFixture observations in one Chrome environment. Other browsers, OS builds, printing, and complex rowspan/colspan grids were not measured
- WPTSelected tests only. The wpt.live revision, the full test directory, and other browsers were not checked
- AAMChrome browser accessibility-tree query only. Windows UIA, IAccessible2, ATK, Apple AX, and screen-reader speech were not measured
- ReviewExpert-gap Review is not complete
This Topic has initial coverage. Selected fixture and WPT results are not generalized to every HTML structure, browser, operating system, CSS implementation, or assistive technology.
Related surfaces
For a beginner-friendly example, see How to Use the col Element in Yugien. Column groups are covered in the colgroup Topic, the whole table in the table Topic, and column headings and header associations in the th Topic.