【参加讨论】
■ <caption> :
<caption> 的作用是为表格标示一个标题列,有如在表格上方加上一没格线的打通列。 当然亦可置于下方,通常用以存放该表格的标题。
<caption> 的参数设定(常用):
例如:<caption align="top" valign="top"></caption>
●align="top"
该表格标题列相对于表格的摆放贴 位置(水平),可选值为: left, center, right, top, middle, bottom,若 align="bottom" 的话标题列便会出现对表格的下方,不管你 的原始码中把 <caption> 放在 <table> 中的头部或尾部。
●valign="top"
该表格标题列相对于表格的摆放位置(上下),可选值为: top, bottom。和 align="top" 或 align="bottom" 是一样的,虽然功能重复了,但如果你要标题列 置于下方及向右或向左贴 ,那末两个参数便可一 用了。当只 一个参数时, 请首选 align,因为 valign 是由 html 3.0 才开始的参数。
例子:
| 始码 |
<center> <table width="350" border="1" cellspacing="0" cellpadding="2" align="center"> <caption>网页速成 八月份访客浏览器使用分析</caption> <tr align="center">
<th>month</th>
<th>% of ie visitor</th>
<th>% of nc visitor</th> </tr> <tr align="center">
<td>august</td>
<td>61%</td>
<td>39%</td> </tr> </table> </center> |
| 显示结果 |
网页速成 八月份访客浏览器使用分析
| month |
% of ie visitor |
% of nc visitor |
| august |
61% |
39% | |
本新闻共
6页,当前在第
6页
1 2 3 4 5 6