Monday, December 31, 2018

This page will focus on HTML cellpadding feature.
It's old; and very simplistic. But it still works effectively today.
Cellpadding is primarily used with TABLES. and it separates them to the desired level.
(usually "cellpadding="1" is sufficiant. or, somewhere thereabouts.)


Let's start by showing a sequence with no cellpadding.
table border="0" cellpadding="0" cellspacing="3"






Example 2
Now, while keeping the cellpadding at Zero
Let's make the table border visible for demonstration purposes only.
table border="1" cellpadding="0" cellspacing="3"





Example 3
Now, let us widen the cellpadding to "3".
table border="0" cellpadding="3" cellspacing="3"





Example 4
We'll put the cellpadding at 1, and expose the table border.
table border="1" cellpadding="1" cellspacing="3"
generally, it's preferred to keep the table border at "0". (invisible)





Example 5
Let's exaggerate the cellpadding by using "8"
table border="0" cellpadding="8" cellspacing="3"





Example 6
We usually prefer keeping the table border at ZERO.
But just for fun, we'll make a wider table border. and average cellpadding
table border="3" cellpadding="2" cellspacing="3"





Example 7
table border="0" cellpadding="2" cellspacing="3"





Example 8
table border="0" cellpadding="0" cellspacing="3"






Example 9
table border="0" cellpadding="8" cellspacing="3"
(I'm also increasing the width from 90% to 99%)







here's an average arrangement with no table border, and 2 cellpadding.
table border="0" cellpadding="2" cellspacing="3"







finally, here's what happens when more cellspacing is used.
NOTE the differenct between cellpadding and cellspacing.
Let's set the cellspacing to "30".
table border="0" cellpadding="2" cellspacing="30"

It seems to keep the overall size static while narrowing the entire ROWS themselves.
(While cellpadding maintains its size, and the whole table shifts outward)
according to HTML.com,
CELLPADDING sets the amount of space between the contents of the cell and the cell wall.
CELLPADDING is usually more effective than CELLSPACING for spreading out the contents of the table.
(therefore; we've placed virtually no emphasis on cellspacing).
This entire page primarily emphasizes cellpadding.
...except for the cellspacing example below:











No comments:

Newer Post Older Post Home