Class Ul


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

The ul element represents an unordered list of items. It is used to group a collection of items that do not have a numerical ordering and whose order in the list is not meaningful. The ul element contains li (list item) elements, and is commonly used for navigation menus, feature lists, and other collections where the order of items is not important.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple unordered list Ul simple = ul( li("First item"), li("Second item"), li("Third item") ); // Navigation menu Ul navigation = ul( li(a("/home", "Home")), li(a("/about", "About")), li(a("/contact", "Contact")) )._class("nav-menu"); // Feature list Ul features = ul( li("Fast performance"), li("Easy to use"), li("24/7 support") )._class("feature-list"); // List with styling Ul styled = ul( li("Styled item 1"), li("Styled item 2") )._class("custom-list").style("list-style-type: square;"); // Nested list Ul nested = ul( li("Main item 1"), li( "Main item 2", ul( li("Sub item 1"), li("Sub item 2") ) ) ); // List with complex content Ul complex = ul( li( strong("Important"), " item with ", em("emphasis") ), li("Simple item") );

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

See Also: