pub struct Dl;Expand description
The <dl> element - description list.
§Purpose
The <dl> element represents an association list consisting of zero or more
name-value groups (term-description pairs). Common uses include glossaries,
metadata, or key-value pairs.
§Content Categories
- Flow Content
- Palpable Content (if it has at least one name-value pair)
§Permitted Content Model
- Zero or more groups of one or more
<dt>elements followed by one or more<dd>elements - Optionally intermixed with
<script>and<template>elements - Can also contain
<div>elements wrapping<dt>and<dd>groups
§Common Use Cases
- Glossaries and definitions
- Metadata or property lists
- FAQ sections (question-answer pairs)
- Product specifications
§Key Attributes
- Global attributes only
§Example
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dt>JavaScript</dt>
<dt>JS</dt>
<dd>A programming language for web browsers</dd>
</dl>§Accessibility
- Screen readers may announce term-description relationships
§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for Dl
impl HtmlElement for Dl
impl CanContain<Dd> for Dl
impl CanContain<Div> for Dl
impl CanContain<Dt> for Dl
impl CanContain<Script> for Dl
impl CanContain<Template> for Dl
impl FlowContent for Dl
impl PalpableContent for Dl
Auto Trait Implementations§
impl Freeze for Dl
impl RefUnwindSafe for Dl
impl Send for Dl
impl Sync for Dl
impl Unpin for Dl
impl UnwindSafe for Dl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more