CSS <display-internal> Data Type
The <display-internal> data type is a display keyword for boxes that only work inside a particular layout, such as table-row, table-cell or ruby-text.
Description
The <display-internal> CSS data type represents the keywords for internal display types: boxes that only make sense inside a particular parent layout model, such as table rows and cells, or the parts of a ruby annotation. They are values of the display property and let other elements mimic the structure of HTML tables and ruby text.
The table keywords match the HTML table elements: table-row-group (tbody), table-header-group (thead), table-footer-group (tfoot), table-row (tr), table-cell (td), table-column-group (colgroup), table-column (col) and table-caption (caption). The ruby keywords are ruby-base, ruby-text, ruby-base-container and ruby-text-container.
If an internal box appears without the parent it needs, the browser creates anonymous wrapper boxes to complete the structure, so a lone table-cell is wrapped in an anonymous row and table. A classic use is display: table-cell with vertical-align: middle to centre content vertically, although flexbox and grid are usually better choices today. For accessibility, remember that these values change appearance only: they do not give elements table semantics.
Examples:
.table { display: table; width: 100%; }
.row { display: table-row; }
.cell { display: table-cell; padding: 8px; border: 1px solid #ccc; }
.caption { display: table-caption; }
Syntax
<display-internal> = table-row-group | table-header-group | table-footer-group | table-row | table-cell
| table-column-group | table-column | table-caption
| ruby-base | ruby-text | ruby-base-container | ruby-text-containerValues
- table-row-groupBehaves like a tbody element.
- table-header-groupBehaves like a thead element.
- table-footer-groupBehaves like a tfoot element.
- table-rowBehaves like a tr element.
- table-cellBehaves like a td element.
- table-column-groupBehaves like a colgroup element.
- table-columnBehaves like a col element.
- table-captionBehaves like a caption element.
- ruby-baseBehaves like an rb element.
- ruby-textBehaves like an rt element.
- ruby-base-containerBehaves like an rbc element (anonymous container of ruby bases).
- ruby-text-containerBehaves like an rtc element.
Example
Browser Support
The following information will show you the current browser support for the CSS display-internal data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.
Desktop





Tablets & Mobile





