Class Dl


@Bean(typeName="dl") public class Dl extends HtmlElementContainer
DTO for an HTML <dl> element.

The dl element represents a description list (also known as a definition list or association list). It is used to group terms (dt elements) with their descriptions (dd elements), creating a list of term-description pairs. The dl element is commonly used for glossaries, metadata lists, or any other content where you need to associate terms with their definitions or descriptions.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple description list Dl simple = dl( dt("HTML"), dd("HyperText Markup Language"), dt("CSS"), dd("Cascading Style Sheets") ); // Description list with styling Dl styled = dl( dt("API"), dd("Application Programming Interface"), dt("DOM"), dd("Document Object Model") )._class("glossary"); // Description list with multiple descriptions Dl multiple = dl( dt("JavaScript"), dd("A programming language for web development."), dd("It runs in web browsers and on servers."), dt("Python"), dd("A high-level programming language."), dd("Known for its simplicity and readability.") ); // Description list with complex content Dl complex = dl( dt("Web Standards"), dd( "Standards developed by the ", a("https://w3.org", "W3C"), " to ensure web compatibility." ), dt("Responsive Design"), dd( "Design approach that adapts to different ", strong("screen sizes"), " and devices." ) ); // Description list with ID Dl withId = dl( dt("Framework"), dd("A collection of pre-written code for common tasks."), dt("Library"), dd("A collection of reusable code modules.") ).id("tech-terms"); // Description list with styling Dl styled2 = dl( dt("Frontend"), dd("The client-side part of a web application."), dt("Backend"), dd("The server-side part of a web application.") ).style("border: 1px solid #ccc; padding: 10px;");

The following convenience methods are provided for constructing instances of this bean:

See Also: