<dl>, <dt>, <dd> Tags — HTML Technical Interview Questions & Answers

Description lists — terms and their definitions.

<dl>, <dt>, <dd> Tags

  • Description lists — terms and their definitions.
  • <dl> is the <dl> HTML element. HTML uses this tag so the browser (and screen readers) know what the piece is, not only how it looks.
  • Board: <dl>…</dl> Put it in body. Check it in the browser. Attributes go on the opening tag.
  • Trap: wrong nesting or missing a required attribute. CSS can still style it — don’t pick a tag only because of default italics.
  • Interview: name the tag, one attribute if it has a famous one (href, src, alt, for, type), one mistake.

Technical Interview Tip: <dl>: the <dl> HTML element. Example: <dl>…</dl>

Code Examples for <dl>, <dt>, <dd> Tags

<dl>, <dt>, <dd> Tags — working example

<dl>
  <dt>HTML</dt>
  <dd>Structures content</dd>
  <dt>CSS</dt>
  <dd>Styles content</dd>
</dl>

<dl>, <dt>, <dd> Tags — description lists pair terms (dt) with definitions (dd).

How to Explain <dl>, <dt>, <dd> Tags to an Interviewer

What is the <dl> tag?

the <dl> HTML element <dl>…</dl>

One common mistake?

wrong nesting or missing a required attribute