html中制作四行五列精美表格
时间: 2024-06-01 15:04:11 浏览: 11
以下是制作四行五列精美表格的HTML代码:
```html
<table>
<tr>
<td>第一行第一列</td>
<td>第一行第二列</td>
<td>第一行第三列</td>
<td>第一行第四列</td>
<td>第一行第五列</td>
</tr>
<tr>
<td>第二行第一列</td>
<td>第二行第二列</td>
<td>第二行第三列</td>
<td>第二行第四列</td>
<td>第二行第五列</td>
</tr>
<tr>
<td>第三行第一列</td>
<td>第三行第二列</td>
<td>第三行第三列</td>
<td>第三行第四列</td>
<td>第三行第五列</td>
</tr>
<tr>
<td>第四行第一列</td>
<td>第四行第二列</td>
<td>第四行第三列</td>
<td>第四行第四列</td>
<td>第四行第五列</td>
</tr>
</table>
```
相关问题
用html制作一个精美的表格
好的,以下是一个制作精美表格的 HTML 代码示例:
```html
<table>
<thead>
<tr>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
<th>职业</th>
</tr>
</thead>
<tbody>
<tr>
<td>张三</td>
<td>28</td>
<td>男</td>
<td>工程师</td>
</tr>
<tr>
<td>李四</td>
<td>35</td>
<td>男</td>
<td>设计师</td>
</tr>
<tr>
<td>王五</td>
<td>24</td>
<td>女</td>
<td>产品经理</td>
</tr>
</tbody>
</table>
```
你可以根据需要调整表格的样式和内容,例如添加 CSS 样式、增加行列等。希望这个代码片段能够满足你的需求。
css制作精美的表格
要制作一个精美的表格,你可以使用CSS来美化表格的外观。你可以使用以下代码作为参考:
```
<style type="text/css">
table.gridtable {
font-family: verdana, arial, sans-serif;
font-size: 11px;
color: #333333;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
}
table.gridtable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #dedede;
color: white;
height: 60px;
text-align: center;
font-size: 20px;
font-weight: lighter;
letter-spacing: 2px;
border-radius: 5px;
}
table.gridtable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #ffffff;
height: 30px;
text-align: center;
}
tbody {
font-size: 1em;
padding: 20px;
}
table tr:hover {
background-color: #CCDDFF;
}
</style>
<table class="gridtable">
<tr>
<th>Info Header 1</th>
<th>Info Header 2</th>
<th>Info Header 3</th>
</tr>
<tr>
<td>Text 1A</td>
<td>Text 1B</td>
<td>Text 1C</td>
</tr>
<tr>
<td>Text 2A</td>
<td>Text 2B</td>
<td>Text 2C</td>
</tr>
</table>
```
你可以将上述代码添加到你的HTML文件中,然后根据自己的需要修改表格中的内容和样式。这段代码使用了CSS样式来设置表格的边框、背景颜色、字体和对齐方式,从而使表格看起来更加精美和专业。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.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)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)