Home >Web Front-end >HTML Tutorial >An HTML interview question_html/css_WEB-ITnose
Now there is a 3*3 table. How can I add a vertical line to the middle table and divide it into two tables? The other things remain unchanged. I only use HTML knowledge. Please give me some answers.
Use colgroup?
This question is awkward, or you don’t understand it.
At the beginning, there was only one table (table), where is the table in the middle? Is it a cell (td)?
Also add a vertical line? Is this painting? With one move, it becomes two tables?
In summary, the test point should be to split the cells.
3*3 table, the middle td is split into 2 columns, and the td of the corresponding column colspan 2.
It means the third floor. How to split the cells? How should I write the code?
means the third floor. How to split cells? How should the code be written?
This question is very strange, or maybe you don’t understand it.
I started talking about a table, but where is the table in the middle? Yes Cell (td)?
Also add vertical lines? Is this painting? With one move, it becomes two tables?
In summary, the test point should be to split the cells.
3*3 table, the middle td is split into 2 columns, and the td of the corresponding column colspan 2.
It’s very simple
<table border="1"> <tr> <td>1-1</td> <td colspan="2">1-2</td> <td>1-3</td> </tr> <tr> <td>2-1</td> <td>A</td> <td>B</td> <td>2-3</td> </tr> <tr> <td>3-1</td> <td colspan="2">3-2</td> <td>3-3</td> </tr></table>
colspan rowspan are used to split cells. .