- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set width between table cells with CSS
The border-spacing specifies the width between table cells. It can take either one or two values; these should be units of length.
Example
You can try to run the following code to set the width of table cells:
<html> <head> <style> table.one { border-collapse:separate; width:300px; border-spacing:15px 40px; } </style> </head> <body> <table class = "one" border = "2"> <caption>The border-spacing property</caption> <tr><td> India </td></tr> <tr><td> UK </td></tr> </table> <br /> </body> </html>
- Related Articles
- Set border width with CSS
- Set the width of the rule between columns with CSS
- Set the border image width with CSS
- Set the width of image border with CSS
- Set the width of an image with CSS
- Set the width of the outline with CSS
- Set the width of a box with CSS
- Set the width of a button with CSS
- Set the width of a tab character with CSS
- Set the maximum width that a box can be with CSS
- Set the minimum width that a box can be with CSS
- How to set table width in HTML?
- Set min-width and max-width of an element using CSS
- Set the height and width of an image using percent with CSS
- Set a border between two lines with CSS

Advertisements