Class Italic<T extends Italic<T>>


public class Italic<T extends Italic<T>> extends I<T>
Represents an HTML italic text element, extending the <i> element.

The Italic class is a convenience wrapper around the I element, providing a more descriptive class name for text in an alternate voice or mood, such as technical terms, foreign phrases, or thoughts. Unlike <em>, which conveys emphasis, <i> is used for stylistic offset without semantic emphasis.

Features:

  • Alternative, more descriptive name for the I element
  • Renders text in italic style by default
  • Used for technical terms, foreign phrases, and stylistic offset
  • Differs from <em> which conveys semantic emphasis

Usage:


 // Create italic text
 Italic term = new Italic("ad hoc");

 // Use in a paragraph
 P paragraph = new P();
 paragraph.addText("The ");
 paragraph.addElement(new Italic("sine qua non"));
 paragraph.addText(" of success is hard work.");
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • Italic

      public Italic()
      Constructs an empty <i> element.

      Creates an italic element without initial content. Text can be added later using inherited methods from the I class.

    • Italic

      public Italic(String text)
      Constructs an <i> element with the specified text content.
      Parameters:
      text - the text to render in italic style; may be null or empty