On the <dl>
The article discusses the <dl> element in HTML and its features. It highlights that a <dt> can be followed by multiple <dd> elements and can be grouped in a <div> for styling. Additionally, it mentions the use of ARIA for labeling and clarifies the terminology around description lists.
- ▪A <dt> can be followed by multiple <dd> elements.
- ▪You can group <dt> and <dd> elements in a <div> for styling purposes.
- ▪The term 'description lists' has been used since an HTML5 draft in 2008.
Opening excerpt (first ~120 words) tap to expand
On the <dl> (via) I learned a few new-to-me things about the <dl> element from this article by Ben Meyer: A <dt> can be followed by multiple <dd> You can optionally group the <dt> and <dd> elements in a <div> for styling - but only a <div>. You can label them using ARIA. They've been called "description lists", not "definition lists", since an HTML5 draft in 2008. So this is valid: <h2 id="credits">Credits</h2> <dl aria-labelledby="credits"> <div> <dt>Author</dt> <dd>Jeffrey Zeldman</dd> <dd>Ethan Marcotte</dd> </div> </dl> Here's a useful note from Adrian Roselli on screen reader support for description lists.
Excerpt limited to ~120 words for fair-use compliance. The full article is at Simon Willison's Weblog.