Class H4<T extends H4<T>>

All Implemented Interfaces:
HgroupElement

public class H4<T extends H4<T>> extends PhrasingContentElement<T> implements HgroupElement
Represents an HTML <h4> (level 4 heading) element.

The <h4> element defines a fourth-level heading in HTML documents. Headings range from <h1> (most important) to <h6> (least important), with <h4> representing a sub-subsection heading. Headings help structure content hierarchically and improve both accessibility and SEO.

Features:

  • Fourth-level heading in document hierarchy
  • Helps organize content into logical sections
  • Improves document accessibility and navigation
  • Supports both text content and inline elements

Usage:


 // Create a heading with text
 H4 heading = new H4("Subsection Title");

 // Create empty heading and add content later
 H4 heading = new H4();
 heading.addText("Technical Details");
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • H4

      public H4()
      Constructs an empty <h4> element.

      Creates a level 4 heading without initial text content. Text or inline elements can be added later using inherited methods.

    • H4

      public H4(String text)
      Constructs an <h4> element with the specified text content.
      Parameters:
      text - the heading text; may be null or empty