怎么用html制作一个10行4列的表格
时间: 2024-03-21 15:40:46 浏览: 23
可以按照如下的 HTML 代码来制作一个 10 行 4 列的表格:
```
<table>
<tr>
<th>列1</th>
<th>列2</th>
<th>列3</th>
<th>列4</th>
</tr>
<tr>
<td>行1-列1</td>
<td>行1-列2</td>
<td>行1-列3</td>
<td>行1-列4</td>
</tr>
<tr>
<td>行2-列1</td>
<td>行2-列2</td>
<td>行2-列3</td>
<td>行2-列4</td>
</tr>
<tr>
<td>行3-列1</td>
<td>行3-列2</td>
<td>行3-列3</td>
<td>行3-列4</td>
</tr>
<tr>
<td>行4-列1</td>
<td>行4-列2</td>
<td>行4-列3</td>
<td>行4-列4</td>
</tr>
<tr>
<td>行5-列1</td>
<td>行5-列2</td>
<td>行5-列3</td>
<td>行5-列4</td>
</tr>
<tr>
<td>行6-列1</td>
<td>行6-列2</td>
<td>行6-列3</td>
<td>行6-列4</td>
</tr>
<tr>
<td>行7-列1</td>
<td>行7-列2</td>
<td>行7-列3</td>
<td>行7-列4</td>
</tr>
<tr>
<td>行8-列1</td>
<td>行8-列2</td>
<td>行8-列3</td>
<td>行8-列4</td>
</tr>
<tr>
<td>行9-列1</td>
<td>行9-列2</td>
<td>行9-列3</td>
<td>行9-列4</td>
</tr>
<tr>
<td>行10-列1</td>
<td>行10-列2</td>
<td>行10-列3</td>
<td>行10-列4</td>
</tr>
</table>
```
这段代码会创建一个包含一个表头和 10 行数据的表格,表头为 4 列,每行数据也是 4 列。你可以根据需要修改表格的行数和列数,以及表格中每个单元格的内容。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)