HTML dl, dt, and dd (maybe this is a tag you haven't used, but they are very useful), dtdd

Source: Internet
Author: User

HTML dl, dt, and dd (maybe this is a tag you haven't used, but they are very useful), dtdd
I. About dl dt dd

Html <dl> <dt> <dd> is a combination of tags. When the outer layer of dt dd is used, the dl package must be used. This combination tag is also called a table tag, similar to a table combination label, we call it a dl table (Extended reading: table tr td, table tr th table layout ).

<Dl> <dt> </dt> <dd> </dl> is a common title + list tag. If no initial CSS style is set for the dl dt dd tag, the content of the default dd list will be indented. (Extended reading: ul li, ol li, and li lists)

Ii. dl dt dd list label syntax

<Dl>
<Dt> List title </dt>
<Dd> list content </dd>
<Dd> list content </dd>
...
</Dl>

Syntax explanation:
Dt and dd are placed in the dl tag, and the tag dt and dd are in the same level under the dl tag. That is, dt cannot be placed in dd, and dd cannot be placed in dt. In dl, dt and dd are at the same level. DD labels can be several. At the same time, the dt label or dd label cannot be used separately without adding dl.

Demonstration of the list of titles and titles
The Code is as follows:

 
 
  1. <Html>
  2. <Body>
  3. <H1> A definition list:
  4. <Dl>
  5. <Dt> css website </dt>
  6. <Dd> the website is www.divcss5.com </dd>
  7. <Dt> div css website </dt>
  8. <Dd> the website is www.divcss5.com </dd>
  9. <Dt> div + css website </dt>
  10. <Dd> the website is www.divcss5.com </dd>
  11. </Dl>
  12. </Body>
  13. </Html>

Demo
 

Expansion and improvement
Dl dt dd is a combination of tags
Standard tag usage. The Code is as follows:

 
 
  1. <Dl>
  2. <Dt> Title 1 </dt>
  3. <Dd> List 1 </dd>
  4. <Dd> List 2 </dd>
  5. </Dl>

<Ul> labels can be placed in the dd at the same time.

 

Iii. Cases of html dl dt dd Application

1. HTML code snippet:
<Dl>
<Dt> welcome to divcss5 </dt>
<Dd> here is an html tutorial. </dd>
<Dd> here is the css module. </dd>
<Dd> here is a css tutorial. </dd>
</Dl>

2. dl dt dd case


The preceding figure shows an example of a tag in the html dl dt dd list.

IV, Summary of dl dt dd labels

In practice, we use the dl dt dd label at most, usually with a title. Under the title, there should be a few simple lists (topic title + corresponding title list) and the following content corresponding to the title. When using simple HTML code, we can learn to use dl dt dd flexibly to understand and master the syntax of tag structure.

In the future, you will experience the convenience of using the dl dt dd tag appropriately in the Development of div + css.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.