<html> <head> <title>Div example</title> </head> <body> <style type="text/css"> .matrix { cell-spacing: 0px; border-spacing: 0px; border-collapse: collapse; border: 1px solid #cccccc; } .matrix td { height: 50px; width: 50px; border: 1px solid #cccccc; background-color:#00ff00; } .matrix td.cell_a { background-color:#ff0000; } .matrix td.cell_b { background-color:#0000ff; } </style> <table summary="" class="matrix"> <tr> <td class="cell_a" ></td> <td class="cell_a" ></td> <td class="cell_a" ></td> </tr> <tr> <td class="cell_b" ></td> <td></td> <td></td> </tr> </table> </body> </html>