Class Small<T extends Small<T>>


public class Small<T extends Small<T>> extends PhrasingContentElement<T>
Represents an HTML <small> element that renders text in a smaller font size.

The <small> element makes text render one font size smaller than the surrounding text (for example, from large to medium, or from small to x-small). It is semantically used for side comments, fine print, copyright notices, legal text, and other small-print content that is less important than the main content.

Features:

  • Renders text in smaller font size
  • Semantic representation of fine print and legal text
  • Commonly used for copyright notices and disclaimers
  • Inline element that doesn't break text flow
  • Supports text content and nested HTML elements
  • Can be nested for progressively smaller text

Usage:


 // Copyright notice
 Paragraph footer = new Paragraph();
 Small copyright = new Small("© 2007 Corvus Engineering. All rights reserved.");
 footer.addElement(copyright);

 // Legal disclaimer
 Paragraph legal = new Paragraph();
 legal.addText("*Terms and conditions apply. ");
 Small disclaimer = new Small("See full terms at example.com/terms");
 legal.addElement(disclaimer);

 // Fine print with constructor
 Small finePrint = new Small("Results may vary. Not guaranteed.");

 // Empty for dynamic content
 Small dynamic = new Small();
 dynamic.addText("Additional details");

 // Mixed content
 Paragraph note = new Paragraph();
 note.addText("Price: $99.99 ");
 Small tax = new Small("(plus applicable taxes)");
 note.addElement(tax);
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • Small

      public Small()
      Constructs a new empty Small element.

      Creates an HTML <small> element with no initial content. Text can be added later using the inherited text methods.

    • Small

      public Small(String text)
      Constructs a new Small element with the specified text.

      Creates an HTML <small> element containing the specified text, which will be rendered in a smaller font size than surrounding text.

      Parameters:
      text - the text to display in smaller font