Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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>Advertisements