Class Html


@Bean(typeName="html") public class Html extends HtmlElementContainer
DTO for an HTML <html> element.

The html element represents the root of an HTML document. It contains all other HTML elements and serves as the top-level container for the entire document. The lang attribute is commonly used to specify the primary language of the document for accessibility and SEO purposes.

Examples:

// Basic HTML document structure Html html1 = html( head( title("My Web Page"), meta().charset("utf-8") ), body("Hello, World!") ).lang("en"); // HTML with manifest for offline support Html html2 = html( head( title("Offline App") ), body("This app works offline!") ).lang("en").manifest("app.manifest"); // HTML with custom attributes Html html3 = html( head( title("Página en Español") ), body("¡Hola, Mundo!") ).lang("es")._class("no-js");

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

See Also: