Tutorials

CSS 'border-spacing' Property Explained

  • Published
  • 2 min read
  • CSS
  • HTML
  • Web Design
CSS 'border-spacing' Property Explained
In this article
  1. CSS 'border-spacing' Property Examples
  2. Browser Support For 'border-spacing' Property
  3. CSS Syntax of the 'border-spacing' Property
  4. Usage of the 'border-spacing' Property
  5. Property Values of the 'border-spacing' Property

Corrected . The browser-support table was rebuilt from MDN browser-compat-data (unprefixed support, desktop browsers), checked 3 October 2026. Editorial approval is still pending.

The CSS 'border-spacing' property specifies the distance between the borders of adjacent table cells. Unlike table elements' cell padding attribute (now considered outdated HTML), 'border-spacing' applies only to CSS-styled tables with border-collapse set to separate. This property allows designers to control the spacing between table cells, enhancing table data's visual layout and readability.

CSS 'border-spacing' Property Examples

See the Pen CSS 'border-spacing' Property by Webzstore (@webzstore) on CodePen.

The 'border-spacing' property is essential for controlling the spacing between cells in CSS-styled tables, contributing to tabular data's aesthetic and functional presentation on web pages.

Browser Support For 'border-spacing' Property

Unprefixed support for the border-spacing property (selected supported implementation, desktop browsers)
BrowserVersionReleased
Chrome1Dec 2008
Edge12Jul 2015
Firefox1Nov 2004
Safari1Jun 2003
Opera4Jun 2000

Source: MDN browser-compat-data 8.1.4, checked 3 October 2026. Prefixed support and implementations that were later removed are not counted, and some browsers list partial support or extra values. See the MDN reference for border-spacing for the full compatibility details, including mobile browsers.

CSS Syntax of the 'border-spacing' Property

border-spacing: length | initial | inherit;
  • A single length value applies to both horizontal and vertical spacing.
  • Two length values specify the horizontal (first value) and vertical (second value) spacing, respectively.

Usage of the 'border-spacing' Property

Use 'border-spacing' to adjust the space between table cell borders. This property is particularly useful for creating more visually appealing tables by providing adequate space between cells, thus improving legibility and overall design. It can be specified using one or two values, where the first value defines the horizontal spacing, and the second value (if present) represents the vertical spacing.

Property Values of the 'border-spacing' Property

  • Length: Specifies the spacing between borders in length units (e.g., px, em).
  • Initial: Resets the 'border-spacing' to its default value.
  • Inherit: Inherits the 'border-spacing' from the parent element (useful for nested tables).

Share this article

Written by

Webzstore Team

Webzstore has helped businesses since 2010. Today, we bring websites, digital marketing and enquiry follow-up into practical plans built around the work each business needs.

Related services

Talk about your website or marketing

Book a Free 30-Minute Call

More tutorials

All tutorials

Privacy choices

Choose what this website may load. Your choice is saved on this device for up to 180 days. Privacy Policy

Turning a choice off stops further use of that optional service on this site. It does not take back information already sent, and we cannot delete cookies that other services set in your browser.