HTML Tables Tutorial

Page 5 - <table> border


The following shows the difference between a table without the border attribute and with the attribute set to a value of one. By default a table does not have a border. How you will use your table determines whether or not you will want a border.
<table>
   <tr>
      <td>Cell #1</td>
      <td>Cell #2</td>
   </tr>
   <tr>
      <td>Cell #3</td>
      <td>Cell #4</td>
   </tr>
</table>
=
Cell #1 Cell #2
Cell #3 Cell #4

<table border="1">
   <tr>
      <td>Cell #1</td>
      <td>Cell #2</td>
   </tr>
   <tr>
      <td>Cell #3</td>
      <td>Cell #4</td>
   </tr>
</table>
=
Cell #1 Cell #2
Cell #3 Cell #4

 

 
MPF.com Site Map