Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Defines properties for a single column or a span of columns within a colgroup. Use it to set column widths, apply background colors, or highlight specific columns in a table.
The <col> element is a void element (self-closing) that must be placed inside a <colgroup>. It represents one or more columns in the table and allows you to apply styles to all cells in those columns without repeating attributes on each cell.
The most common uses are setting consistent column widths and applying background colors to entire columns for visual grouping or emphasis.
span to apply the same properties to several consecutive columnsThis demo shows alternating column backgrounds applied through individual <col> elements, creating a striped column effect that helps users track data vertically.
<table> <caption>Team Schedule</caption> <colgroup> <col /> <col style="background: oklch(from var(--color-interactive) l c h / 0.05);" /> <col /> <col style="background: oklch(from var(--color-interactive) l c h / 0.05);" /> </colgroup> <thead> <tr> <th scope="col">Name</th> <th scope="col">Monday</th> <th scope="col">Tuesday</th> <th scope="col">Wednesday</th> </tr> </thead> <tbody> <tr> <td>Alice</td><td>9am-5pm</td><td>Remote</td><td>9am-5pm</td> </tr> <!-- More rows... --> </tbody></table>
span AttributeThe span attribute applies the same properties to multiple consecutive columns from a single <col> element, avoiding repetition.
<colgroup> <col style="width: 25%;" /> <col span="4" style="width: 18.75%;" /></colgroup><!-- First col covers 1 column at 25% width, second col covers 4 columns each at 18.75% -->
| Attribute | Value | Description |
|---|---|---|
span |
Positive integer (default: 1) | Number of consecutive columns this element covers |
Set fixed pixel widths, percentages, or auto to control column sizing.
<colgroup> <col style="width: 150px;" /> <col style="width: auto;" /> <col style="width: 100px;" /></colgroup><!-- Fixed-auto-fixed column layout -->
Apply a subtle background to draw attention to a specific column, such as a recommended option in a comparison table.
<colgroup> <col /> <col /> <col style="background: oklch(95% 0.05 140);" /> <col /></colgroup><!-- Third column highlighted -->
The CSS specification restricts which properties work on <col> elements.
background, width, border (with collapsed borders), visibility: collapsepadding, text-align, color, font propertiesFor unsupported properties, target cells directly with CSS selectors or use VB's data-numeric attribute for right-aligned numeric columns.
/* When col doesn't support the property you need, target cells directly: */td:nth-child(3),th:nth-child(3) { text-align: end; font-weight: bold;} /* Or use VB's data-numeric attribute for right-aligned numeric columns: *//* th data-numericAmount</th> <td data-numeric>$1,234.56</td> */
<col> is primarily for styling and does not convey semantic meaning to assistive technologies<th scope="col">, not from <col><colgroup> - parent container for col elements<table> - the table container; see data-numeric for VB's built-in right-alignment<th> - column headers that provide semantic meaning<td> - data cells within columns