Article introduction of Wulin.com (www.vevb.com): XHTML tutorial: dl, dt, dd defines the tags of the list class.
When we make lists, we usually only use ul and li tags. As for dl, dt, and dd, they are rarely used. These three tags are tags that define list classes. Let me tell you the general usage below. Let's break down the code of this list first:1234<dl><!-Definition List (Definition List)-> <dt></dt><!-Definition Term (Definition Item)-> <dd></dd><!-Definition Description (Definition Description)-></dl>
Looking at the above code, we found that there is no <li> tag here, but consists of three tags DL, DT, and DD. According to the appearance and the previous list, we can know that DL is a container of this list, just like a box. The difference is that this time the box is not only a single small box with a unified standard. Instead, there are two different contents, how do we understand DT and DD? Semantically, DT is the name, the title, and DD is the explanation, the content. DT and DD are both boxes, DD only interprets one of the DTs above, and cannot be explained further or downward. When DT does not exist, then DD has no meaning. I have not found the exact literature on whether DT must follow it. However, based on my understanding of the definition list, I think that if there is only DT and no DD in the data, then this cannot be a definition list, and just use the UL unordered list. But when there are only one or a few of them in the data that do not have DD, and most of them have DD, then Yuanzi believes that this form can exist.
Let's take a look at another example:
123456<dl> <dt>Sorted List</dt> <dt>Sorted List</dt> <dt>Sorted List</dt> <dt>Sorted List</dt> <dt>Sorted List</dt></dl>
The above is obviously inappropriate. This form is an unordered list. Why do you need to use a defined list? It doesn't make sense in terms of semantics.
Can a DT carry multiple DDs? example:
12345678<dl> <dt>Domestic TV station</dt> <dd>Central set</dd> <dd>Central set</dd> <dd>Central set</dd> <dd>Central set</dd> <dd>Central set</dd> <dd>Foreign TV station</dt> <dd>American Online</dd></dl>
I personally think the above form is feasible. Regarding the question of whether a DT can carry multiple DDs, I have not found any documentation on this point. And there are still many such DT with multiple DDs in some well-known websites. My opinion on this is that it is OK to have multiple DDs in different situations, but generally I think this approach is still lacking. From an explanation point of view, do multiple DDs indicate multiple explanations? Or if you want to explain the content in segments, you don’t need to let DD be the dog catching rats. Many paragraph tags can be embedded in a DD. Furthermore, from the perspective of style applications, multiple DDs are loose as a whole, and their design is insufficiently extensible. For example, when we want to click DT to hide the corresponding DD effect, this method of multi-DD is not so easy to implement. Therefore, if it is not a special purpose, try not to use one DT with multiple DDs as much as possible. Instead, put the content in DD. If it is segmented, let the paragraph label be used, and if it is segmented, let the orderly or unordered list be expressed. What about your opinion?
Finally, I would like to give you a better example for your reference:
12345678<dl><dt > "Spirited Away"</dt><dd>The plot tells the story of a 10-year-old girl Chihiro moving from the city to the countryside with her parents. Unexpectedly, an accident happened to the family while moving. They enter a peculiar world controlled by the soup house owner witch - where people who do not work will be turned into animals. </dd><dt>"Tongkat"</dt><dd>The two sisters who moved to the countryside with their father found a TOTORO under a big tree next to their home, which was only visible to good children. There are many incredible and interesting stories happening in the meantime. </dd></dl>