Class U


@Marshalled(typeName="u") public class U extends HtmlElementMixed<U>
DTO for an HTML <u> element.

The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation. It is used to mark up text that should be underlined, such as proper names in Chinese text, misspelled words, or text that needs to be distinguished from the surrounding content. The u element is typically rendered with an underline and is commonly used for indicating proper names, misspellings, or other annotations.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple underlined text U simple = u("This text is underlined"); // U with styling U styled = u("Styled underlined text") .class_("underlined"); // U with complex content U complex = u( "The ", strong("proper name"), " is underlined." ); // U with ID U withId = u("Text with ID") .id("underlined-text"); // U with styling U styled2 = u("Custom underlined text") .style("color: #666; text-decoration: underline;") .children("Custom styled underlined text"); // U with multiple elements U multiple = u() .children( "The ", u().children("proper name"), " is ", u().children("underlined"), " for emphasis." ); // U with links U withLinks = u() .children( "See ", a().href("/help/underline").children("underline guide"), " for more information." );

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

See Also:
  • Constructor Details

    • U

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

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