border-collapse: collapse | separate | inherit
|
Value
|
Description
|
separate
|
Borders are separated; each cell will display its own borders, and this is the default value.
|
collapse
|
Borders are collapsed into a single border.
|
inherit
|
Inherits this property from its parent element.
|
<!DOCTYPE html>
<html> <head> </head> <body> <table border="1" style="border-collapse: collapse;"> <tr> <td>Cell 1</td><td>Cell 2</td><td>Cell 3</td> </tr> <tr> <td>Cell 4</td><td></td><td>Cell 5</td> </tr> </table> </body> </html> |
<!DOCTYPE html>
<html> <head> <style> body{ background-color: black; color: aquamarine; } </style> </head> <body> <table border="1" style="border-collapse: collapse; color: ;"> <tr> <td>Cell 1</td><td>Cell 2</td><td>Cell 3</td> </tr> <tr> <td>Cell 4</td><td></td><td>Cell 5</td> </tr> </table> </body> </html> |