Class Hgroup<T extends Hgroup<T>>


public class Hgroup<T extends Hgroup<T>> extends StyledElement<T>
Represents an HTML <hgroup> element for grouping heading elements.

The Hgroup element is used to group a set of heading elements (<h1> through <h6>) and <p> elements when a heading has multiple levels, such as a main heading with subheadings or alternative titles.

The <hgroup> element restricts its content to heading elements and <p> elements. All valid child types implement the HgroupElement marker interface. Use

invalid reference
#addElement(HgroupElement)
to add children.

Usage Example:


 Hgroup headingGroup = new Hgroup();
 headingGroup.addElement(new H1("Main Title"));
 headingGroup.addElement(new P("Subtitle or Tagline"));
 
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • Hgroup

      public Hgroup()
      Creates a new Hgroup element.
  • Method Details

    • removeAllElements

      public void removeAllElements()
      Removes all child elements from this heading group.
      Overrides:
      removeAllElements in class Element<T extends Hgroup<T>>