The difference between dl and ul in html: 1. The dl tag is used to define a description list; the ul tag is used to define an unordered list; 2. The dl tag is used in conjunction with the dt and dd tags to default to a hierarchical relationship. There is no hierarchical relationship between the ul tag and the li tag, which are unordered by default.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
What is the difference between dl and ul in html
Use the
The example is as follows:
<html> <body> <h2>一个定义列表:</h2> <dl> <dt>计算机</dt> <dd>用来计算的仪器 ... ...</dd> <dt>显示器</dt> <dd>以视觉方式显示信息的装置 ... ...</dd> </dl> <h4>无序列表:</h4> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </body> </html>
Output result:
##Recommended tutorial: "html video tutorial 》
The above is the detailed content of What is the difference between dl and ul in html?. For more information, please follow other related articles on the PHP Chinese website!