Documentation
¶
Overview ¶
Package colgroup provides constructors and methods for the HTML <colgroup> element.
The <colgroup> HTML element defines a group of columns within a table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<colgroup") TagClose = []byte("</colgroup>") AttrSpan = []byte(" span=\"") )
Byte constants for HTML rendering.
Functions ¶
func Cols ¶ added in v0.3.0
Cols creates a colgroup from col elements, enforcing correct nesting at compile time. Example: colgroup.Cols(col.New(), col.Span(2)) Renders: <colgroup><col /><col span="2" /></colgroup>
func New ¶
New creates a new colgroup element with the given child nodes (typically <col> elements). Example: colgroup.New(col.New(), col.Span(2)) Renders: <colgroup><col /><col span="2" /></colgroup>
func Span ¶ added in v0.3.0
func Span(span int) *element
Span creates a colgroup that spans the given number of columns without requiring individual col children. Use this shorthand when all columns in the group share the same styling. Example: colgroup.Span(3) Renders: <colgroup span="3"></colgroup>