Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<h4") TagClose = []byte("</h4>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new h4 element with the given child nodes. Example: h4.New(text.Text("Detailed Point")) Renders: <h4>Detailed Point</h4>
func RawText ¶
func RawText(str string) *element
RawText Creates a new h4 element with raw text content. Uses text.RawText which is not HTML-escaped. Example: h4.RawText("<small>Detail</small> Heading") Renders: <h4><small>Detail</small> Heading</h4>
func RawTextf ¶
RawTextf Creates a new h4 element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: h4.RawTextf("<small>%s</small>", subtitle) Renders: <h4><small>A deeper look</small></h4>
func Static ¶
func Static(str string) *element
Static Creates a new h4 element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: h4.Static("Overview") Renders: <h4>Overview</h4>