When we use lists in the process of making web pages, we generally use the
<html> <head> <title>一个普通列表</title> </head> <body text="blue"> <dl> <dt>中国城市</dt> <dd>北京 </dd> <dd>上海 </dd> <dd>广州 </dd> <dt>美国城市</dt> <dd>华盛顿 </dd> <dd>芝加哥 </dd> <dd>纽约 </dd> </dl> </body> </html>
We can see that the text in the middle of
will move forward even if we do not indent it. The content in the middle of is automatically indented backwards.Generally, when we make lists, we usually only use the ul and li tags. As for DL, it is rarely used. It also belongs to the tags of the list class. The
<dl> <dt>相当于标题</dt> <dd>相当于标题下的小分类</dd> </dl>
Maybe my words are difficult to understand, it is similar to the following directory tree:
<dl> <dt>第一章基本语法:</dt> <dd>1.注释</dd> <dd>2.函数</dd> <dd>3.属性</dd> </dl> <dl> <dt>第二章:变量</dt> <dd>1.分配的变量</dd> <dd>2.读取的变量</dd> <dd>3.保留的变量</dd> </dl>
The above is the detailed content of Definition of dl, dd and dt tags in html. For more information, please follow other related articles on the PHP Chinese website!