dl

package
v0.3.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TagOpen  = []byte("<dl")
	TagClose = []byte("</dl>")
)

Byte constants for HTML rendering.

Functions

func New

func New(nodes ...node.Node) *element

New Creates a new dl element with the given child nodes (typically <dt> and <dd> elements). Example: dl.New(dt.New(text.Text("Term")), dd.New(text.Text("Description"))) Renders: <dl><dt>Term</dt><dd>Description</dd></dl>

func Pair added in v0.3.0

func Pair(term string, desc string) *element

Pair Creates a description list with a single term-description pair. Example: dl.Pair("Name", "Alice") Renders: <dl><dt>Name</dt><dd>Alice</dd></dl>

Types

type Element

type Element = element

Element is an exported alias for the private element type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL