thead

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package thead provides constructors and methods for the HTML <thead> element.

The <thead> HTML element defines a set of rows defining the head of the columns of the table.

Index

Constants

This section is empty.

Variables

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

Byte constants for HTML rendering.

Functions

func New

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

New creates a new thead element with child tr elements. Example: thead.New(tr.New(th.Text("Name"), th.Text("Age"))) Renders: <thead><tr><th>Name</th><th>Age</th></tr></thead>

func Rows added in v0.3.0

func Rows(rows ...*tr.Element) *element

Rows creates a thead from tr elements, enforcing correct nesting at compile time. Example: thead.Rows(tr.New(th.Text("Name"), th.Text("Age"))) Renders: <thead><tr><th>Name</th><th>Age</th></tr></thead>

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