html表格及其属性

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/iceSony/article/details/51582171

<table>表格属性align  cellspacing  cellpadding  width  height  border  (frame控制表格边框最外面四条线框 role控制单元格之间的分割线)

表格的显示位置:<table align=center>

单元格之间的间距:<table cellspacing=2px>

单元格内与边框距离:<table cellpadding=2px>

<caption>标题属性:

align表示放在表格的位置 例如:<caption align=”top“>标题放在单元格最上面

<caption align=”top“,align=“bottom”align=left align=right>;

<tr>表行属性:bgcolor  align  valign  width  height

<tr bgcolor=red>;

<tr align=top align=middle align=bottom>;(tr的align设置了表格<td>垂直方向对齐方式)

<tr valign=left valign=center valign=left>;(tr的valign设置了表格<td>水平方向对齐方式)

<td>表格属性:bgcolor  align  valign  width  height  (rowspan  colspan)

<td rowspan=2>设置表格所占行数

<td colspan=2>设置表格所占列数

猜你喜欢

转载自blog.csdn.net/iceSony/article/details/51582171