Class HtmlDocument

java.lang.Object
com.oorian.html.HtmlDocument

public abstract class HtmlDocument extends Object
Abstract base class for generating complete HTML documents.

HtmlDocument provides the structural foundation for building HTML pages by managing the document skeleton (DOCTYPE, html, head, body) and delegating content creation to subclasses via the createHead(Head) and createBody(Body) template methods.

Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • HtmlDocument

      public HtmlDocument()
      Creates a new HtmlDocument with empty page attributes and child elements.
  • Method Details

    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • toString

      protected final void toString(StringBuilder sb)
    • createHead

      protected abstract void createHead(Head head)
      Creates and populates the head section of the HTML document.
      Parameters:
      head - The Head element to populate with meta tags, styles, scripts, and other head content.
    • createBody

      protected abstract void createBody(Body body)
      Creates and populates the body section of the HTML document.
      Parameters:
      body - The Body element to populate with page content.