Documentation
¶
Overview ¶
Package dd provides constructors and methods for the HTML <dd> element.
The <dd> HTML element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>). Used within definition lists to explain terms, provide details, or give values. Commonly used for glossaries, metadata displays, key-value pairs, and FAQ sections. Must follow a <dt> element within a <dl> parent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<dd") TagClose = []byte("</dd>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New creates a new dd element with child nodes. Example: dd.New(text.Text("A large feline inhabiting Bodmin Moor.")) Renders: <dd>A large feline inhabiting Bodmin Moor.</dd>
func RawText ¶
func RawText(str string) *element
RawText creates a new dd element with raw text content. Uses text.RawText which is not HTML-escaped. Example: dd.RawText("A large feline inhabiting Bodmin Moor.") Renders: <dd>A large feline inhabiting Bodmin Moor.</dd>
func RawTextf ¶
RawTextf creates a new dd element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: dd.RawTextf("A large feline inhabiting %s.", "Bodmin Moor") Renders: <dd>A large feline inhabiting Bodmin Moor.</dd>
func Static ¶
func Static(str string) *element
Static creates a new dd element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: dd.Static("A large feline inhabiting Bodmin Moor.") Renders: <dd>A large feline inhabiting Bodmin Moor.</dd>