Class Wbr


@Marshalled(typeName="wbr") public class Wbr extends HtmlElementVoid<Wbr>
DTO for an HTML <wbr> element.

The wbr element represents a word break opportunity. It is used to indicate where a line break may occur in text, allowing the browser to break long words or URLs at appropriate points when necessary. The wbr element is a void element that does not contain any content and is typically used within long words, URLs, or other text that might overflow their container. It provides a hint to the browser about where it's acceptable to break the text.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple word break Wbr simple = wbr(); // Wbr with styling Wbr styled = wbr() .class_("word-break"); // Wbr with ID Wbr withId = wbr() .id("word-break-1"); // Wbr with styling Wbr styled2 = wbr() .style("display: inline;"); // Wbr in long word P longWord = p( "This is a very long word: ", "supercalifragilisticexpialidocious", wbr(), " that might need to break." ); // Wbr in URL P longUrl = p() .children( "Visit: ", "https://www.example.com/very/long/path/to/resource", wbr(), " for more information." ); // Wbr in code P code = p() .children( "Function: ", "veryLongFunctionName", wbr(), "()" );

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

See Also:
  • Constructor Details

    • Wbr

      public Wbr()
      Creates an empty Wbr element.