首页 > 编程 > HTML > 正文

HTML表格_动力节点Java学院整理

2019-10-26 17:19:58
字体:
来源:转载
供稿:网友

在html中绘制表格使用table标签

tr表示行 td表示列 th表示表头,表头通常用于列名字。

下面是一个列子。

<html> <head> <title>Table in html</title> </head> <body> <p>水平表头</p> <table border="1"> <tr> <th>Name</th> <th>Age</th> <th>Gender</th> </tr> <tr> <td>zdd</td> <td>30</td> <td>male</td> </tr> </table> <p>垂直表头</p> <table border="1"> <tr> <th>Name</th> <td>autumn</td> </tr> <tr> <th>Age</th> <td>30</td> </tr> <tr> <th>Gender</th> <td>famale</td> </tr> </table> </body></html>

效果图

水平表头

Name
Age
Gender
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表