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






'border-collapse' Example

    
<html>
<body>
<table id="myEle" 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="myEle.style.borderCollapse='separate'">separate</button>
<button onclick="myEle.style.borderCollapse='collapse'">collapse</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'border-collapse' Syntax and Note
2.'border-collapse' Possible Values
3.'border-collapse' is applied to