Favorites

CSS <display-internal> Data Type

<display-internal>
CSS Data TypeThis data type is supported by all modern browsers.
Updated 21st November 2026

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.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

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-container

Values

  • 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

<div class="wrap">
<h1>CSS &lt;display-internal&gt; examples</h1>
<div class="card">
<div class="table">
<div class="caption">Built from div elements with display: table-*</div>
<div class="head"><div class="row"><div class="cell">Type</div><div class="cell">Example</div></div></div>
<div class="body">
<div class="row"><div class="cell">&lt;length&gt;</div><div class="cell">12px</div></div>
<div class="row"><div class="cell">&lt;time&gt;</div><div class="cell">300ms</div></div>
</div>
</div>
</div>
</div>
/* Base demo layout */
* { box-sizing: border-box; }

body {
  margin: 24px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: #f5f7fb;
  color: #102a43;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
}

h1 {
  font-size: 20px;
  margin: 0 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
}

.label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  color: #486581;
  margin-top: 10px;
  word-break: break-word;
}

.note {
  font-size: 13px;
  color: #486581;
  margin-top: 14px;
}

/*  examples */
.table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.caption {
  display: table-caption;
  caption-side: bottom;
  padding-top: 8px;
  font-size: 12px;
  color: #486581;
}

.head { display: table-header-group; font-weight: 700; background: #e0e7ff; }
.body { display: table-row-group; }
.row { display: table-row; }

.cell {
  display: table-cell;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
}
Open in editor

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.

This data type is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.