列表和表格

1.列表

  1. 有序列表  ol声明表 li声明项 如:代码

    <ol start="50">
    <li>咖啡</li>
    <li>牛奶</li>
    <li>茶</li>
    </ol> 结果为:

    1. 咖啡
    2. 牛奶

         2.无序列表 ul声明表 li声明项

    无序列表的type有3个值 1.disc ,默认值,实心圆 2.square 实心方 3.circle 空心圆

         3.定义列表 dl声明表 dt声明项 dd声明项的内容 如:代码

<dl>
<dt>计算机</dt>
<dd>用来计算的仪器 ... ...</dd>
<dt>显示器</dt>
<dd>以视觉方式显示信息的装置 ... ...</dd>
</dl>结果为:

计算机
用来计算的仪器 ... ...
显示器
以视觉方式显示信息的装置 ... ....
2.列表
table 声明表格
tr  声明行
td 声明单元格
th 定义表头
如:代码:

<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>

效果

MonthSavings
January $100

更复杂的 HTML 表格也可能包括 caption、col、colgroup、thead、tfoot 以及 tbody 元素。

表格属性很多:

  1. colspan 跨行
  2. rowsopan跨列
  3. border 边框粗细,为0时看不见
posted @ 2019-07-14 18:17  我是一个呵呵呵  阅读(459)  评论(0)    收藏  举报