CSS border-spacing Property Last Updated : 26 Aug, 2024 Comments Improve Suggest changes 1 Likes Like Report The border-spacing Property is used to set the distance between the borders of neighboring cells in the Table. This property works only when the border-collapse property is set to no-collapse separate.Default Value: 2pxSyntax: border-spacing: length|initial|inherit; Property values: length-length: It is used to set the distance between the borders of adjacent cells. It does not allow negative values. If two values are defined, the first value defines the horizontal space and the second value defines the vertical spacing.If only one value is given then it defines the both horizontal and vertical spacing between the adjacent borders of cells.initial: It sets the property to its default value.Syntax: border-spacing:initial;Example: html <!DOCTYPE html> <html> <head> <title>border-spacing property</title> <style> table, th, td { border: 2px solid green; text-align: center; } #geeks { border-collapse: separate; background-color: transparent; border-spacing: initial; } h1 { color: green; } </style> </head> <body> <center> <h1>GeeksforGeeks</h1> <h2>The border-spacing Property</h2> <h3>border-spacing: initial;</h3> <table style="width:70%" id="geeks"> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Harsh</td> <td>Agarwal</td> <td>15</td> </tr> <tr> <td>Manas</td> <td>Chhabra</td> <td>27</td> </tr> <tr> <td>Ramesh</td> <td>Chandra</td> <td>28</td> </tr> </table> </center> </body> </html> Output: Supported Browsers: The browser supported by css border-spacing property are listed below: Google Chrome 1.0Edge 12.0Internet Explorer 8.0Firefox 1.0Opera 4.0Safari 1.0 Create Quiz Comment M manaschhabra2 Follow 1 Improve M manaschhabra2 Follow 1 Improve Article Tags : Misc Web Technologies CSS CSS-Properties Explore CSS Introduction 3 min read CSS Syntax 3 min read CSS Selectors 6 min read CSS Comments 2 min read CSS Colors 5 min read CSS Borders 5 min read CSS Margins 4 min read CSS Height and Width 4 min read CSS Outline 4 min read CSS Fonts 4 min read Like