Column Combinator (||)
W3C CSS Snapshot 2026
The experimental column combinator matches table cells by the columns they belong to. Check browser support before using it.
On this page
Syntax and values
| Value or syntax | What it does |
|---|---|
col.selected || td | Matches cells in a column with the selected class in browsers that implement the combinator. |
Try the example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Column Combinator (||)</title>
<style>
col.selected || td { background: #def5f5; }
</style>
</head>
<body>
<table><colgroup><col class="selected"><col></colgroup><tbody><tr><td>Room 2</td><td>9 a.m.</td></tr></tbody></table>
</body>
</html>
What to expect A browser with support highlights Room 2. A browser without support ignores the rule and still shows the table.