'border-collapse' Example : border collapse : CSS Attributes and Javascript Style Properties HTML CSS TUTORIALS


HTML CSS TUTORIALS » CSS Attributes and Javascript Style Properties » border collapse »

 

'border-collapse' Example



    
<html>
<body>
<table id="myTable" border="1" style="border-collapse:collapse">
<tr>
   <td>column 1</td>
   <td>column 2</td>
   <td>column 3</td>
</tr>
<tr>
   <td>cell 1</td>
   <td>cell 2</td>
   <td>cell 3</td>
</tr>
<tr>
   <td>cell 1</td>
   <td>cell 2</td>
   <td>cell 3</td>
</tr>
</table>
<button onclick="myTable.style.borderCollapse='separate'">separate</button>
<button onclick="myTable.style.borderCollapse='collapse'">collapse</button>
</body>
</html>

    
      
      



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo CSS Attributes and Javascript Style Properties
» border collapse