表格标记

表格标记<table>

标题标记<caption>

表头标记<th>

表格行标记<tr>(一组tr表示一行)

单元格标记<td>(又称列标记,可以有多列)

border表示添加边框,默认是1就可以

代码大致如下:

  <body>

  <table width = "318" height = "167" border = "1"

align = "center">

<caption>学生考试成绩单</caption>

<tr>

<td align = "center" valign = "middle">姓名</td>

<td align = "center" valign = "middle">语文</td>

<td align = "center" valign = "middle">数学</td>

<td align = "center" valign = "middle">英文</td>

</tr>

<tr>

<td align = "center" valign = "middle">张三</td>

<td align = "center" valign = "middle">89</td>

<td align = "center" valign = "middle">92</td>

<td align = "center" valign = "middle">87</td>

</tr>

 </table>

</body>

效果如图显示:

 

posted @ 2021-04-20 22:16  广东陈奕迅  阅读(24)  评论(0编辑  收藏  举报