Home > Web Front-end > HTML Tutorial > An HTML interview question_html/css_WEB-ITnose

An HTML interview question_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:05
Original
1277 people have browsed it

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.


Reply to the discussion (solution)

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.


Let’s draw it.

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>
Copy after login

colspan rowspan are used to split cells. .

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template