Specifying cellspacing and cellpadding of table in CSS?

Sheonarayan
Posted by Sheonarayan under CSS 3 category on | Points: 40 | Views : 1161
In earlier version of HTML (4), we used to specify cellpadding and cellspacing to control the space between border and cells of the HTML table.

In HTML5, cellspacing and cellpadding attributes have been deprecated and it is suggested to use CSS to control the spacing.

The CSS for this is below
<style>
table, tr, td, th{
padding:0px;
border:0px;
margin:0px;
border-spacing:0px;
}
</style>


Hope this helps.

Comments or Responses

Login to post response