--- title: go-html description: HLCRF DOM compositor with grammar pipeline integration for type-safe server-side HTML generation and optional WASM client rendering. --- # go-html `go-html` is a pure-Go library for building HTML documents as type-safe node trees and rendering them to string output. It provides a five-slot layout compositor (Header, Left, Content, Right, Footer -- abbreviated HLCRF), a responsive multi-variant wrapper, a server-side grammar analysis pipeline, a Web Component code generator, and an optional WASM module for client-side rendering. **Module path:** `forge.lthn.ai/core/go-html` **Go version:** 1.26 **Licence:** EUPL-1.2 ## Quick Start ```go package main import html "forge.lthn.ai/core/go-html" func main() { page := html.NewLayout("HCF"). H(html.El("nav", html.Text("nav.label"))). C(html.El("article", html.El("h1", html.Text("page.title")), html.Each(items, func(item Item) html.Node { return html.El("li", html.Text(item.Name)) }), )). F(html.El("footer", html.Text("footer.copyright"))) output := page.Render(html.NewContext()) } ``` This builds a Header-Content-Footer layout with semantic HTML elements (`
`, `
`, `