Class B


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

The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood. It is used to stylistically offset text from the normal prose without conveying any special importance or emphasis. The b element is typically rendered in bold by browsers, but the visual styling should be controlled with CSS rather than relying on the default browser styling.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Product name in a sentence B product = b("Widget Pro"); // Keywords in text B keywords = b("HTML", b("CSS"), " and ", b("JavaScript")); // Names or titles B name = b("Dr. Jane Smith"); // Stylistic offset without emphasis B offset = b("Important note").class_("highlight"); // Text that needs visual distinction B distinct = b("User ID: 12345"); // Mixed content with bold text B mixed = b( "Welcome to ", b("Our Website"), " - the best place for ", b("quality products") ); // Bold text with styling B styled = b("Amazing Widget") .class_("product-name") .style("color: blue;");

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

See Also:
  • Constructor Details

    • B

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

      public B(Object... children)
      Creates a B element with the specified child nodes.
      Parameters:
      children - The child nodes.