摘要:列表无序列表有序列表自定义列表不同类型的有序列表不同类型的无序列表嵌套列表嵌套列表自定义列表参考资料菜鸟教程
一,效果图。
二,代码。
DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>html 列表title>
head>
<body>
<h4>An Unordered listh4>
<ul>
<li>Cofferrli>
<li>teali>
<li>Mideli>
ul>
<ol start="50">
<li>Cooffeeli>
<li>Teali>
<li>Mikeli>
ol>
<dl>
<dt>Cofferdt>
<dd>--black hot drinkdd>
<dt>mikedt>
<dd>--white cold drinkdd>
dl>
<h4>Numbered list:h4>
<ol>
<li>applesli>
<li>bananasli>
<li>lemonsli>
<li>orangeli>
ol>
<h4>letters list:h4>
<ol type="A">
<li>applesli>
<li>bananasli>
<li>lemonsli>
<li>orangeli>
Lowercase letters list:
- apples
- bananas
- lemons
- orange
Roman numbers list:
- apples
- bananas
- lemons
- orange
lowercase Roman numbers list:
- apples
- bananas
- lemons
- orange
Note: The type attribute of the ul tag is deprecated in HTML 4, and is not supported in HTML5. Therefore we have used the style attribute and the CSS list-style-type property, to define different types of unordered lists below:
disc bullets list:
- Apples
- bananas
- lemons
- orange
circle bullets list:
- Apples
- bananas
- lemons
- orange
square bullets list:
- Apples
- bananas
- lemons
- orange
A list inside a list:
- Coffee
- Tea
- black tea
- green tea
- Mike
lists inside a list
- coffee
- tea
- black tea
- green tea
- china
- africa
- mick
A definition List
- coffee
- -black hot drink
- mike
- -white cold drink