Class Sub


@Marshalled(typeName="sub") public class Sub extends HtmlElementMixed<Sub>
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:
  • Constructor Details

    • Sub

      public Sub()
      Creates an empty Sub element.
    • Sub

      public Sub(Object... children)
      Creates a Sub element with the specified child nodes.
      Parameters:
      children - The child nodes. Must not be null.