6.3表格的结构标签

1.表首样式

 <thead align="center或left或right" bgcolor="颜色" valign="top或middle或bottom">

一般写于<table>标签中的开头

在这里插入图片描述
2.设置主体样式

 <tbody align="center或left或right" bgcolor="颜色" valign="top或middle或bottom">

一般写于<thead>标签后

在这里插入图片描述3.设置表尾样式

 <tfoot align="center或left或right" bgcolor="颜色" valign="top或middle或bottom">

在这里插入图片描述

注:

  1. 使用<thead>,<tbody><tfoot>其中一个就必须全用,且顺序不能动
  2. 当打印一份很长的表格时,<thead><tfoot>可以打印在每张页面上
  3. <thead>内必须又有<tr>标签

猜你喜欢

转载自blog.csdn.net/P_ning/article/details/89377503
6.3