If you want to modify the table layout, consider using colspan
and rowspan
. Below is a straightforward example:
<table width="100%">
<tr>
<td colspan="9">first line</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td rowspan="2">
4
</td>
<td rowspan="2">
5
</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td rowspan="2">
4
</td>
<td rowspan="2">
5
</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td rowspan="2">
4
</td>
<td rowspan="2">
5
</td>
<td>6</td>
<td>7</td>
<td rowspan="2">8</td>
<td rowspan="2">9</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>6</td>
<td>7</td>
</tr>
</table>
<style>
table, th, td {
border: 1px solid black;
text-align:center;
}
</style>
The outcome can be viewed here:
https://i.sstatic.net/s5025.png
To further customize the appearance, try adjusting the width, height, text-align, or background for each tr/td element.