DEV Community

Cover image for HTML tags | dl-dt-dd
Carlos Espada
Carlos Espada

Posted on β€’ Edited on

1

HTML tags | dl-dt-dd

They are used to represent a list of descriptions. With <dl> (description list) we group the elements in a list, with <dt> (description term) we specify each term that we want to define and with <dd> (description details) we provide a description or definition for the <dt> corresponding.

It is often used for glossaries or to display data in the form of key-value pairs.

The possible combinations are:

  • A term + a definition (a <dt> followed by a <dd>)
  • Multiple terms + one definition (multiple <dt> followed by a <dd>)
  • One term + multiple definitions (one <dt> followed by multiple <dd>)
  • Multiple terms + multiple definitions (multiple <dt> followed by multiple <dd> in key-value format)

<dt>/<dd> pairs can be grouped within a <div> to use microdata, give global attributes to a group, or simply to assign styles.

These tags should not be used simply to create indentation in the content (the <dd> usually brings it by default), to achieve that effect you must use CSS.

<dl> has no implicit ARIA role, <dt> has term, and <dd> has definition.

Due to the different behavior that assistive technologies have when advertising this type of content, it is very important to ensure that the content of each item on the list is written in a way that communicates its relationship with the other items on the list in the group.

  • Type: block / block / block
  • Self-closing: No / No / No
  • Semantic value: No / No / No

Definition and example <dt> - Definition and example <dt> - Definition and example <dd> | Support

Quadratic AI

Quadratic AI – The Spreadsheet with AI, Code, and Connections

  • AI-Powered Insights: Ask questions in plain English and get instant visualizations
  • Multi-Language Support: Seamlessly switch between Python, SQL, and JavaScript in one workspace
  • Zero Setup Required: Connect to databases or drag-and-drop files straight from your browser
  • Live Collaboration: Work together in real-time, no matter where your team is located
  • Beyond Formulas: Tackle complex analysis that traditional spreadsheets can't handle

Get started for free.

Watch The Demo πŸ“Šβœ¨

Top comments (0)

πŸ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay