HTML(XHTML)基础知识(五)——【table】

表格

<table>
  <tr>
    <td>单元格1A</td>
    <td>单元格1B</td>
  </tr>
  <tr>
    <td>单元格2A</td>
    <td>单元格2B</td>
  </tr>
</table>

<table>

    可选属性:border,边框宽度;cellpadding,单元格内边距;cellspacing,相邻单元格之间的距离;frame,外边框的显示形式,above、below、border、box、hsides、lhs、rhs、void、vsides;rules,表格内部分隔线绘制方式,all、cols、groups、none、rows;summary;width,表格宽度。

    标准属性:accesskey、class、dir、id、lang、style、tabindex、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

 

<caption>

    标准属性:class、dir、id、lang、style、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

<tr>

    可选属性:align,水平方向对齐方式, center、char、justify、left、right;char,align 为 char 时的参考字符;charoff,align 为 char 时相对 char 偏移的位置;valign,垂直方向对齐方式,baseline、bottom、middle、top。

    标准属性:accesskey、class、dir、id、lang、style、tabindex、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

 

<th>

    可选属性:abbr,为单元格内容指定简短版本;axis,将单元格划入某种概念上的类别,这些类别形成 n 维空间的轴;align,水平方向对齐方式, center、char、justify、left、right;char,align 为 char 时的参考字符;charoff,align 为 char 时相对 char 偏移的位置;valign,垂直方向对齐方式,baseline、bottom、middle、top;colspan,指定单元格应跨越的列数;rowspan,指定单元格应跨越的行数;scope,说明该单元格提供的是针对同一行中其余单元格或针对同一列中其余单元格的标题信息,col、colgroup、row、rowgroup;headers,一组标题单元格 id,相邻 id 值用空格分隔。

    标准属性:accesskey、class、dir、id、lang、style、tabindex、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

<td>

    可选属性:abbr,为单元格内容指定简短版本;axis,将单元格划入某种概念上的类别,这些类别形成 n 维空间的轴;align,水平方向对齐方式, center、char、justify、left、right;char,align 为 char 时的参考字符;charoff,align 为 char 时相对 char 偏移的位置;valign,垂直方向对齐方式,baseline、bottom、middle、top;colspan,指定单元格应跨越的列数;rowspan,指定单元格应跨越的行数;scope,说明该单元格提供的是针对同一行中其余单元格或针对同一列中其余单元格的标题信息,col、colgroup、row、rowgroup。

    标准属性:class、dir、id、lang、style、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

========================================================================

 

<thead>、<tbody>、<tfoot>

    thead、tbody、tfoot 分别指定首行(列)、中间行(列)、末行(列)。

    可选属性:align,水平方向对齐方式, center、char、justify、left、right;char,align 为 char 时的参考字符;charoff,align 为 char 时相对 char 偏移的位置;valign,垂直方向对齐方式,baseline、bottom、middle、top。

    标准属性:class、dir、id、lang、style、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

<colgroup>、<col>

    colgroup 结合 col 指定列的统一样式属性。

    可选属性:align,水平方向对齐方式, center、char、justify、left、right;char,align 为 char 时的参考字符;charoff,align 为 char 时相对 char 偏移的位置;valign,垂直方向对齐方式,baseline、bottom、middle、top;span,指定该 colgroup 元素的属性和样式设置所要应用到的毗邻列的数目;width,指定 colgroup 元素所覆盖到的每一个列的宽度。

    标准属性:class、dir、id、lang、style、title、xml:lang

    事件属性:onblur、onclick、ondblclick、onfocus、onkeydown、onkeypress、onkeyup、onmousedown、onmousemove、onmouseout、onmouseover、onmouseup

 

posted @ 2018-08-07 14:49  RickyShilx  阅读(233)  评论(0编辑  收藏  举报