使用ol,添加图书销售排行榜
如果想在网页中展示有前后顺序的信息列表,怎么办呢?如,当当网上的书籍热卖排行榜,如下图所示。这类信息展示就可以使用<ol>
标签来制作有序列表来展示。
语法:
<ol> <li>信息</li> <li>信息</li> ...... </ol>
举例:
下面是一个热点课程下载排行榜:
<ol> <li>前端开发面试心法 </li> <li>零基础学习html</li> <li>JavaScript全攻略</li> </ol>
<ol>
在网页中显示的默认样式一般为:每项<li>
前都自带一个序号,序号默认从1
开始,如下图所示:
任务
任务:我来试试,亲自感受一下有序标签的使用
在右部编辑器中的第 8
行输入
<ol> <li>我的第一个列表信息。</li> <li>我的第一个列表信息。</li> </ol>
附图: