- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <dd> Tag
The 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, etc.
The <dd> elements include the global attributes.
Following is the global attribute that we can use within the <dd> tag −
- nowrap −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
Following is the syntax of the <dd> tag −
<dt> <dd></dd> <dd></dd> …. </dt>
Example
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 Description lists</title> </head> <body> <!--create a description list--> <dl> <dt>HTML</dt> <dd>Hyper Text Markup Language(single data description).</dd> </dl> </body> </html>
When we run the above code, it will generate an output consisting of the text displayed on the webpage.
Example
The following is another example of the HTML <dd> tag. Here, we are creating multiple data descriptions using <dd> tags within <dl> tags to display the data details of the data word.
<!DOCTYPE html> <html lang="en"> <head> <title>HTML Description lists</title> </head> <body> <!--create a description list--> <dl> <dt>CSS</dt> <dd>Cascading Style Sheet.</dd> <dd>It is used give the styles of the web pages.</dd> <dd>It manages the padding, margin, color, size of the HTML contents.</dd> </dl> </body> </html>
On running the above code, the output window will pop up, consisting of text displayed on the webpage.
Example
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>
When we run the above code, it will generate an output displaying the text on the webpage.
Example
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>
On running the above code, it will generate an output displaying the text on the webpage.