Class Html


public class Html extends HtmlBuilder<Html>
Most of the XHTML tags and attributes are available as methods. A rule of thumb is that most tags are zero parameter methods and attribute methods are single parameter.

Example:

 new Html(writer) {{
        html().head();
        title().text("Hello").end();
        h1().id("title").text("World").end();
        done();
 }};
 

If you would like to extend an HTML builder DO NOT INHERIT FROM THIS CLASS.

Instead inherit from HtmlBuilder and parameterize with the name of your custom builder.

  • Constructor Details

  • Method Details

    • getSelf

      protected Html getSelf()
      Needed for fluent style and Java parameterization limitations. Almost all public methods should return whatever this method returns.

      Most implementations only have to do:

       return this;
       
      Specified by:
      getSelf in class MarkupBuilder<Html>
      Returns:
      the current builder which is usually this object.