Open In App

HTML <dd> Tag

Improve
Improve
Like Article
Like
Save
Share
Report

HTML is a language full of diverse elements, and one such element is the <dd> tag. This tag, standing for ‘definition description’, is used to provide a description or definition of an item in a description list.

Understanding the <dd> Tag

The <dd> tag is used in conjunction with the <dl> tag, which defines the description list, and the <dt> tag, which defines the terms in the description list. The <dd> tag can contain various elements such as paragraphs, line breaks, images, links, and lists.

Syntax:

<dd> Contents... </dd>

Default CSS:

The default styling for dd tag

dd{
display: block;
margin-left: 40px;
}

Examples of HTML dd Tag

Example 1: The below programs illustrate the <dd> element in HTML.

HTML
<!DOCTYPE html>
<html>   
    <body>
        <h1>GeeksforGeeks</h1>
        <h2>HTML dd Tag</h2>
        <dl>
            <dt>Geeks Classes</dt>
            <dd>It is an extensive classroom programme 
            for enhancing DS and Algo concepts.</dd>
            <br>
            <dt>Fork Python</dt>
            <dd>It is a course designed for beginners 
            in python.</dd>
            <br>
            <dt>Interview Preparation</dt>
            <dd>It is a course designed for preparation
            of interviews in top product based companies.</dd>
       </dl>  
    </body>
</html>                    

Output: 

HTML dd tag example


Example 2: This example uses the <dd> tag with display property. 
 

HTML
<!DOCTYPE html>
<html>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2>HTML dd Tag</h2>
        <dl>
            <dt>Geeks Classes</dt>
            <dd style="display: inline; margin-left: 60px">
               It is an extensive classroom programme 
               for enhancing DS and Algo concepts.
            </dd>
        </dl>
    </body>
</html>                    

Output: 

HTML dd tag example output


Supported Browsers: 

  • Google Chrome
  • Edge 12
  • Internet Explorer
  • Firefox 1
  • Opera
  • Safari

Last Updated : 27 Mar, 2024
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads