HTML - <dd> Tag



HTML <dd> tag is used to define the description, definition, or value of the preceding data term <dt> in the description list <dl>.

Inside the <dd> tag, we can use put paragraph(<p>), line breaks(<br>), images(<img>), links(<a>), lists(<li>), etc. If the value of the nowrap attribute is set to "yes", then the description text will not wrap. The default value for this attribute is "no".

Syntax

<dt>
   <dd></dd>
   <dd></dd>
   ….
</dt>

Attribute

HTML dd tag supports Global and Event attributes of HTML.

Examples of HTML dd Tag

Bellow examples will illustrate the usage of dd tag. Where, when and how to use dd tag.

Creating Description List Element

In the following program, we are creating a description list using <dl> tag. Then, we create a single data description using the <dd> tag within the <dl> tag to display the list item's data description.

<!DOCTYPE html>
<html lang="en">
<head>
   <title>HTML dd Tag</title>
</head>
<body>
   <!--create a description list-->
   <dl>
      <dt>HTML</dt>
      <dd>
         Hyper Text Markup Language(single data description).
      </dd>
   </dl>
</body>
</html>

Description List Element with nowrap Attribute

In this example, we create a description list using the <dl> tag. Then, we are using the nowrap attribute with the <dd> tag to manage the wrapping of the description text. We are giving the value of the nowarp attribute as "yes", which defines that the data description text will not be wrapped.

<!DOCTYPE html>
<html lang="en">
<head>
   <title>HTML Description lists</title>
</head>
<body>
   <!--create a description list-->
   <dl>
      <dt>Paragraph</dt>
      <dd nowrap="yes">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolorum error illum ipsum perspiciatis voluptatem, ab rem, laboriosam alias voluptatibus deleniti commodi eveniet? Recusandae, accusantium ex facilis enim odio rem in?</dd>
   </dl>
</body>
</html>

Creating Multple Description List Element

In this program, we are using <dd> and <dt> tags to create multiple data descriptions and multiple data terms within the description list <dl> to display the data terms and data description of the preceding data terms.

<!DOCTYPE html>
<html lang="en">
<head>
   <title>HTML Description lists</title>
</head>
<body>
   <!--create a description list-->
   <dl>
      <dt>Name</dt>
      <dd nowrap="yes">Rohan</dd>
      <dt>Age</dt>
      <dd nowrap="yes">22</dd>
      <dt>Address</dt>
      <dd nowrap="no">Vill: Lambhua, City: Sultanur, pin-code: 228152, State: Uttar Pradesh, Country: India</dd>
   </dl>
</body>
</html>

Supported Browsers

Tag Chrome Edge Firefox Safari Opera
dd Yes Yes Yes Yes Yes
html_tags_reference.htm
Advertisements