当前位置:编程学习 > html/css >>

HTML标签详解(3)

答案:表格
1.定义表格 <table>..........</table> 
【1】设定边框的厚度 -- border
<table border=点数> 
【2】设定格线的宽度 -- cellspacing
<table cellspacing=点数> 
【3】设定资料与格线的距离 -- cellpadding
<table cellpadding=点数> 
【4】调整表格宽度 -- width
<table width=点数或百分比> 
【5】调整表格高度 -- height
<table height=点数或百分比> 
【6】设定表格背景色彩 -- bgcolor
<table bgcolor=#rrggbb> 
【7】设定表格边框色彩 -- bordercolor
<table bordercolor=#rrggbb>
2.显示格线 <table border>
3.表格标题
<caption>..........</caption> 
表格标题位置 -- align
<caption align="#"> #号可为 top:表标题置于表格上方(预设值)
bottom:表标题置于表格下方
4.定义列 <tr>
5.定义栏位 《1》<td>:靠左对齐
《2》<th>:靠中对齐ⅱ粗体 
【1】水平位置 -- align <th align="#">
#号可为 left:向左对齐
center:向中对齐 right:向右对齐
【2】垂直位置 -- align <th align="#"> #号可为
top:向上对齐 middle:向中对齐
bottom:向下对齐 
【3】栏位宽度 -- width
<th width=点数或百分比> 
【4】栏位垂直合并 -- rowspan
<th rowspan=欲合并栏位数> 
【5】栏位横向合并 -- colspan
<th colspan=欲合并栏位数>

上一个:HTML标签详解(4)
下一个:HTML标签详解(2)

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,