Welcome to Doors2Stores "Bringing understanding and awareness of eBay Stores"

eBay Store owners dedicated to sharing knowledge
and resources for a better shopping community
Understanding Tables - Table Attributes
Once you understand the basic table tags, now you can start setting up your table with attributes.  I will use various examples below, giving you the html code in blue and the results below each example.  The basic Table Attribute tags are:
<table border="#"> sets width of border around table cells
<table cellspacing="#"> sets amount of space between table cells
<table cellpadding="#"> sets amount of space between a cell's border and its contents
<table width="#" or "%"> sets width of table in pixels or as a percentage of document width
<table align="?"> sets alignment of table on the page (left, right or center)
<td align="?"> sets alignment of the information (text or image) within the cell (left, right or center)
<tr valign="?"> sets vertical alignment for cell(s) (top, middle or bottom)

Quick Tip: When the alignment is not set, it is automatically "left".
For these examples, I am going to use a table with two rows and two cells (columns).

Table - centered, width 80%, border 3, cellspacing 5 and cellpadding 10

<table align="center" width="80%" border="3" cellspacing="5" cellpadding="10">
    <tr>
        <td>
Row 1, Cell 1</td>
        <td>
Row 1, Cell 2</td>
    </tr>
    <tr>
        <td>
Row 2, Cell 1</td>
        <td>
Row 2, Cell 2</td>
    </tr>
</table>


RESULTS

Row 1, Cell 1 Row 1, Cell 2
Row 2, Cell 1 Row 2, Cell 2

Table - centered, width 70%, border 1, cellspacing 0 and cellpadding 10, top cells aligned center, bottom right cell aligned right

<table align="center" width="70%" border="1" cellspacing="0" cellpadding="10">
    <tr>
        <td align="center">
Row 1, Cell 1 </td>
        <td align="center">
Row 1, Cell 2 </td>
    </tr>
    <tr>
        <td>
Row 2, Cell 1</td>
        <td align="right">
Row 2, Cell 2</td>
    </tr>
</table>


RESULTS

Row 1, Cell 1 Row 1, Cell 2
Row 2, Cell 1 Row 2, Cell 2
 
Return