Home  >  Article  >  Web Front-end  >  Use of HTML list tags dl, ul, ol

Use of HTML list tags dl, ul, ol

高洛峰
高洛峰Original
2017-03-02 15:09:452391browse

This article mainly introduces the use of HTML list tags dl, ul, and ol. It is more suitable for beginners. If you are interested, you can learn it

The code is as follows:

<!-- 
列表标签:<dl>:分层列表 
子标签:<dt>:上层列表项 
<dd>:下层列表项 
------------ 
无序列表标签:<ul> 
子标签:<li> 
------------ 
无序列表标签:<ol> 
子标签:<li> 
--!> 
<html> 
<head> 
<title> 列表标签的练习</title> 
</head> 
<body> 
<dl> 
<dt>标号</dt> 
<dd>1</dd> 
<dd>2</dd> 
<dd>3</dd> 
</dl> 
<hr> 
<ul type="disc"> 
<li>苹果</li> 
<li>香蕉</li> 
<li>橘子</li> 
</ul> 
<hr> 
<ol type="1"> 
<li>苹果</li> 
<li>香蕉</li> 
<li>橘子</li> 
</ol> 
<hr><!--练习标签的嵌套--> 
<dl> 
<dt>四大天王</dt> 
<dd> 
<ol type="1"> 
<li>张学友</li> 
<li>刘德华</li> 
<li>郭富城</li> 
<li>黎明</li> 
</ol> 
</dd> 
</dl> 
</body> 
</html>


For more articles related to the use of HTML list tags dl, ul, and ol, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn