实训9.4.前端:表格tr,td,th,表格属性

<table border="1" cellspacing="10" cellpadding="10" bgcolor="red">

<tr>

  <th align="left">首列</th>

</tr>

<tr>

  <td></td>//行里的单元格

</tr>//

</table>

注释:

table是表格,最外面包括着的标签。

tr是行,有几个就是几行,包括着td标签

td是列,行里的单元格

th是加粗行的列的开头,同td的位置一样,都是被td

bordertable属性,代表边框,数字为0,就没有边框,数字越大,边框越宽

cellspacing是单元格之间的间距

cellpadding是单元格和外边框的距离

bgcolor是背景颜色

align是位置

 

 

详细

https://blog.csdn.net/Allisa_yan/article/details/88427861

原文地址:https://www.cnblogs.com/xtxt1127/p/11470194.html