Class Blockquote<T extends Blockquote<T>>


public class Blockquote<T extends Blockquote<T>> extends StyledContainerElement<T>
Represents an HTML <blockquote> element for block-level quotations.

The Blockquote element indicates that the enclosed text is an extended quotation from another source. Browsers typically indent blockquote content. The optional cite attribute can specify the source URL of the quotation.

Features:

  • Semantic markup for block-level quotations
  • Optional cite attribute for source URL
  • Typically rendered with indentation
  • Can contain other block-level elements

Usage:


 Blockquote quote = new Blockquote("https://example.com/source");
 quote.addChild(new Paragraph("This is a quotation from another source."));
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Q
  • Cite
  • invalid reference
    StyledElement
  • Constructor Details

    • Blockquote

      public Blockquote()
      Constructs an empty <blockquote> element.
    • Blockquote

      public Blockquote(String url)
      Constructs a <blockquote> element with a source URL.
      Parameters:
      url - the URL of the quotation source
  • Method Details

    • setCite

      public final T setCite(String url)
      Sets the URL of the source of the quotation.

      If the URL starts with "/" (absolute path within the application), the servlet context path will be automatically prepended.

      Parameters:
      url - The URL of the quotation source.
      Returns:
      This element for method chaining.