Class Sub


@Bean(typeName="sub") public class Sub extends HtmlElementMixed
DTO for an HTML <sub> element.

The sub element represents subscript text. It is used to display text that should be rendered below the baseline, typically in a smaller font size. The sub element is commonly used for mathematical formulas, chemical formulas, footnotes, and other annotations that need to be displayed as subscript.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Chemical formula Sub chemical = sub("H", sub("2"), "O"); // Mathematical formula Sub math = sub( "x", sub("2"), " + y", sub("2"), " = z", sub("2") ); // Footnote reference Sub footnote = sub("1"); // Subscript with styling Sub styled = sub("n") ._class("subscript"); // Multiple subscripts Sub multiple = sub( "A", sub("i,j"), " = B", sub("k") );

See Also: