Class Blockquote


@Marshalled(typeName="blockquote") public class Blockquote extends HtmlElementMixed<Blockquote>
DTO for an HTML <blockquote> element.

The blockquote element represents a section that is quoted from another source. It is typically rendered as an indented block of text to distinguish it from the surrounding content. The cite attribute can be used to provide a link to the source of the quotation.

Examples:

// Simple blockquote Blockquote quote1 = blockquote().text("The only way to do great work is to love what you do."); // Blockquote with citation Blockquote quote2 = blockquote() .cite("https://example.com/source") .text("Innovation distinguishes between a leader and a follower."); // Blockquote with nested content Blockquote quote3 = blockquote() .cite("https://example.com/article") .children( p().text("This is a longer quotation that spans multiple paragraphs."), p().text("It can contain various HTML elements.") );

The following convenience methods are provided for constructing instances of this bean:

See Also:
  • Constructor Details

    • Blockquote

      public Blockquote()
      Creates an empty Blockquote element.
    • Blockquote

      public Blockquote(Object... children)
      Creates a Blockquote element with the specified child nodes.
      Parameters:
      children - The child nodes. Must not be null.
  • Method Details

    • cite

      public Blockquote cite(String value)
      cite attribute.

      Specifies the URL of the source document or message from which the quotation was taken. This provides context and attribution for the quoted content.

      The URL should point to the original source of the quoted material.

      Parameters:
      value - The URL of the source document for the quotation. Can be null to unset the attribute.
      Returns:
      This object.