React Props Table Generator - Online Component Documentation
Enter a list of component props with types and defaults, and get a Markdown table ready for your Readme or Storybook.
UD5 Toolkit
empty-cells Property DemoInteractive demonstration of how empty-cells controls the visibility of empty table cell borders and backgrounds. Edit cells, toggle modes, and see the real-time difference between show and hide.
| Name | Math | English | Science |
|---|---|---|---|
| Alice | 85 | 92 | |
| Bob | 78 | 88 | |
| Charlie | 90 | ||
| Diana | 76 | 85 | 91 |
| Name | Math | English | Science |
|---|---|---|---|
| Alice | 85 | 92 | |
| Bob | 78 | 88 | |
| Charlie | 90 | ||
| Diana | 76 | 85 | 91 |
/* Table with empty-cells: show (default) */
table {
empty-cells: show;
border-collapse: separate;
border-spacing: 6px;
}
/* Table with empty-cells: hide */
table {
empty-cells: hide;
border-collapse: separate;
border-spacing: 6px;
}
empty-cells property only works with border-collapse: separate (the default).
When border-collapse: collapse is active, empty-cells has no effect — both tables will look identical.
Toggle the "Collapse Borders" switch above to see this in action. Also note: a cell containing or any whitespace is not considered empty.
The empty-cells CSS property controls whether borders and backgrounds are rendered around empty table cells (cells with no visible content). It applies to <td> and <th> elements within a table that uses border-collapse: separate. This property is part of the CSS 2.1 specification and is supported by all modern browsers.
It accepts two keyword values:
show (default) — Empty cells display their borders and backgrounds normally, just like filled cells.hide — Empty cells' borders and backgrounds are completely hidden, making the cell appear invisible (though it still occupies space in the layout).A cell is considered empty only if it contains absolutely no content — no text, no child elements, no , and no whitespace characters (including spaces and line breaks). Even a single or a zero-width space makes the cell "non-empty," and empty-cells: hide will not hide it. The browser checks the cell's inner content; if textContent.trim() is '', it's empty.
No. The empty-cells property only takes effect when border-collapse: separate is set (which is the default for HTML tables). In collapse mode, borders are merged into a single border between adjacent cells, and the concept of individual cell borders doesn't apply — so empty-cells is ignored entirely. Use the toggle switch in the demo above to verify this behavior.
Use the CSS declaration empty-cells: hide; on your <table> element, and ensure border-collapse: separate; is active. For even more control, you could use JavaScript to detect empty cells and apply visibility: hidden; or remove them from the DOM entirely. However, empty-cells: hide is the simplest, native CSS solution for hiding borders and backgrounds of empty cells while preserving table structure.
Common scenarios include:
empty-cells has excellent browser support. It is supported in all major browsers including Chrome, Firefox, Safari, Edge, and Opera — going back to IE8+. It's a stable CSS 2.1 feature that you can safely use in production without vendor prefixes or fallbacks.
No. empty-cells is a discrete property — it only accepts keyword values (show or hide) with no intermediate states, so CSS transitions and animations cannot interpolate between them. The change is instantaneous. If you need a smooth fade effect for hiding empty cells, you would need to use JavaScript with opacity or visibility transitions instead.
Enter a list of component props with types and defaults, and get a Markdown table ready for your Readme or Storybook.
Paste your Markdown and automatically generate a linked table of contents based on headings. Insert at the top. Local magic.
Reduce your HTML file size by stripping whitespace, comments, and optional closing tags. Secure browser‑based.
Highlight elements with aria‑describedby and see the linked description text. Verify a11y annotations.
See how <datalist> works across browsers. Test with many options. Copy the minimal markup. Simple native autocomplete.
Combine TTS with text highlighting. See each word colored as it is spoken. For e‑learning content creation. Local.
Check if your site has a service worker registered and if it can load offline. Quick PWA readiness assessment.
Paste text and quickly highlight potential proper nouns (capitalized sequences). Aid for editing or anonymization. Simple regex-based, local.
Generate continuous white, pink, or brown noise for sleep or concentration. Adjustable volume with offline support via Web Audio API. No downloads needed.
Play continuous white, pink, or brown noise directly in your browser. Includes a timer for sleep and volume control for office concentration.
Paste any text and have it read aloud while each spoken word is highlighted. Improve reading focus. Web Speech API.
Play white, pink, or brown noise to aid focus, sleep, or tinnitus relief. Infinite loop and volume control. Works in background; no downloads.
Upload a text file to detect its character encoding (UTF-8, ISO-8859-1, etc.) and BOM presence. Runs entirely in your browser.
Test the Fullscreen API: request fullscreen on a colored div, detect changes, and copy the JavaScript boilerplate.
See the View Transitions API in action. Cross‑fade and morph between two states. Copy the JavaScript starter code.
Visually configure scroll‑snap containers and items. Adjust alignment, stop behavior, and padding. Copy the clean CSS instantly.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Adjust opacity visually with a slider and see the different CSS representations (opacity property vs RGBA/HSLA). Copy best option.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Design a button or card that glows on hover. Adjust shadow color, spread, and transition. Copy the CSS. Rich UI.
Convert currencies using a built‑in table of approximate fixed rates. Useful for quick estimates without live data. Local.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Paste CSV data and instantly get a formatted MediaWiki table code. Ideal for Wikipedia editors and internal wikis.
Paste an HTML `<table>` snippet and instantly get a clean Markdown table. Supports colspan and alignment hints. Local.
Adjust margin, border, padding, and content sizes interactively and see the rendered box model. Get the exact CSS. Teach or learn layout.
Create a glowing or rotating border animation around an element. Copy the CSS keyframes. Pure CSS magic.
Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.