View Full Version : What does this mean?
huisoonsg
06-30-2005, 10:04 PM
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">
ddadmin
06-30-2005, 10:18 PM
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
mwinter
06-30-2005, 10:29 PM
What does Cellpadding, cellspacing and border means??? Anyone knows pls tell me.The HTML Specification (http://www.w3.org/TR/html4/) gives pretty clear definitions for each of these attributes.
Essentially the cellpadding and cellspacing attributes affect cell margins (http://www.w3.org/TR/html4/struct/tables.html#h-11.3.3) - 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 (http://www.w3.org/TR/html4/struct/tables.html#h-11.3.1). Other attributes dictate how borders are rendered.
Though these attributes haven't been deprecated, you can achieve more control using CSS.
<table width="300" border="1" cellspacing="0"
cellpadding="2" border="0">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.
Mike
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.