Class Ol


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

The ol element represents an ordered list of items. It contains li elements that represent individual list items. The list items are typically numbered automatically by the browser, and the numbering can be customized using the type and start attributes.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple ordered list Ol ol1 = ol( li("First item"), li("Second item"), li("Third item") ); // Ordered list with custom numbering Ol ol2 = ol( li("Item A"), li("Item B"), li("Item C") ).type("A").start(1); // Reversed ordered list Ol ol3 = ol( li("Last item"), li("Middle item"), li("First item") ).reversed(true); // Nested ordered list Ol ol4 = ol( li("Main item 1"), li( ol( li("Sub item 1.1"), li("Sub item 1.2") ) ), li("Main item 2") );

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

See Also: