Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<h1") TagClose = []byte("</h1>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new h1 element with the given child nodes. Example: h1.New(text.Text("Page Title")) Renders: <h1>Page Title</h1>
func RawText ¶
func RawText(str string) *element
RawText Creates a new h1 element with raw text content. Uses text.RawText which is not HTML-escaped. Example: h1.RawText("<span class=\"logo\">Fluent</span>") Renders: <h1><span class="logo">Fluent</span></h1>
func RawTextf ¶
RawTextf Creates a new h1 element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: h1.RawTextf("<span class=\"logo\">%s</span>", app) Renders: <h1><span class="logo">Fluent</span></h1>
func Static ¶
func Static(str string) *element
Static Creates a new h1 element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: h1.Static("Dashboard") Renders: <h1>Dashboard</h1>