Class Em<T extends Em<T>>


public class Em<T extends Em<T>> extends PhrasingContentElement<T>
Represents an HTML <em> (emphasis) element.

The <em> element is used to define text that should be emphasized, typically rendered in italics by browsers. This element conveys semantic meaning, indicating stress emphasis on its content, as opposed to the <i> element which is used for text in an alternate voice or mood without conveying emphasis.

Features:

  • Semantic emphasis of text content
  • Typically rendered in italic style by default
  • Supports all standard HTML text element attributes
  • Can be nested to indicate stronger emphasis

Usage:


 // Create emphasized text
 Em em = new Em("important text");

 // Create empty emphasis element and add content later
 Em em = new Em();
 em.addText("emphasized content");
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • Em

      public Em()
      Constructs an empty <em> element.

      Creates an emphasis element without initial content. Text or other elements can be added later using inherited methods from

      invalid reference
      TextElement
      .

    • Em

      public Em(String text)
      Constructs an <em> element with the specified text content.
      Parameters:
      text - the text content to be emphasized; may be null or empty