What does Cellpadding, cellspacing and border means??? Anyone knows pls tell me. Thanks a lot.
<table width="300" border="1" cellspacing="0"
cellpadding="2" border="0">
What does Cellpadding, cellspacing and border means??? Anyone knows pls tell me. Thanks a lot.
<table width="300" border="1" cellspacing="0"
cellpadding="2" border="0">
They're simply table formatting attribues. You can try changing the values to see how it affects your table. See this page for more info: http://www.yourhtmlsource.com/tables/basictables.html
The HTML Specification gives pretty clear definitions for each of these attributes.Originally Posted by huisoonsg
Essentially the cellpadding and cellspacing attributes affect cell margins - the amount of space between the edges of cells and their content, and the distance between adjacent cells, respectively. The border attribute affects the width of table borders. Other attributes dictate how borders are rendered.
Though these attributes haven't been deprecated, you can achieve more control using CSS.
As an aside, that snippet is invalid as it contains two identical attributes - border in this case. An attribute can only be included once in any particular starting tag.<table width="300" border="1" cellspacing="0"
cellpadding="2" border="0">
Mike
Bookmarks