Class Caption<T extends Caption<T>>


public class Caption<T extends Caption<T>> extends PhrasingContentElement<T>
Represents an HTML <caption> element for table captions.

The Caption element defines a title or caption for an HTML table. It must be the first child of a <table> element and appears above the table by default. Only one caption is allowed per table.

Features:

  • Provides a title or description for tables
  • Must be first child of table element
  • Typically displayed above the table
  • Improves table accessibility

Usage:


 Table table = new Table();
 table.setCaption("Monthly Sales Report");
 // Or:
 table.setCaption(new Caption("Monthly Sales Report"));
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • Caption

      public Caption()
      Constructs an empty <caption> element.
    • Caption

      public Caption(String text)
      Constructs a <caption> element with text content.
      Parameters:
      text - the caption text