Class H4


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

The h4 element represents a fourth-level heading in a document or section. It is used to mark up subsections that are hierarchically below h3 elements. The h4 element is typically used to organize content into smaller subsections and is important for creating a logical document structure. It is typically rendered in a smaller font size than h3 but larger than h5 elements.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple sub-subsection heading H4 simple = h4("Configuration Options"); // H4 with styling H4 styled = h4("Environment Variables") ._class("sub-subsection-title"); // H4 with complex content H4 complex = h4( "4.1 ", strong("Database Configuration"), " ", em("(Required)") ); // H4 with ID H4 withId = h4("Performance Tuning") .id("performance-tuning"); // H4 with styling H4 styled2 = h4("Additional Notes") .style("color: #999; font-weight: normal;"); // H4 with multiple elements H4 multiple = h4( "4.1.1 ", span()._class("detail-title").children("Connection Pool"), " ", small("(Advanced)") ); // H4 with links H4 withLinks = h4( "Related: ", a("/docs/performance").children("Performance Guide") );

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

See Also:
  • Constructor Details

    • H4

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

      public H4(Object... children)
      Creates an H4 element with the specified child nodes.
      Parameters:
      children - The child nodes.
  • Method Details