4 ms·
I love seeing a Definition List (DL/DT/DD html tags) in the wild. Often more hassle than its worth to make them appear the way you want, but semantically pleasi
by scelerat 10mo ago
I love seeing a Definition List (DL/DT/DD html tags) in the wild. Often more hassle than its worth to make them appear the way you want, but semantically pleasing and underused.
- TheRealPomax 10mo agocombine it with a <details> and <summary> inside the <dd> and a little CSS checkbox toggle for JS-less "show all details"/"hide all details" and it's pure gold.
- tempaccsoz5 10mo agoTheir structure in the markup can be a bit confusing imo - something more like a <figcaption> inside a <figure> or a <legend> inside a <fieldset> would be much nicer imo. The spec even mentions [0] that you're allowed to use <div>s to group dt/dd pairs for styling purposes. [0]: https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element https://html.spec.whatwg.org/multipage/grouping-content.html...