html

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package html provides fluent, chainable HTML tag builder constructors and utility methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {
	Handle dom.Handle
}

------------------------------------------------------------------------------------------------ Element is a chainable tag builder wrapper around a DOM element handle.

func A

func A() *Element

func Article

func Article() *Element

------------------------------------------------------------------------------------------------ Semantic layout

func Aside

func Aside() *Element

func B

func B() *Element

func Blockquote

func Blockquote() *Element

func Br

func Br() *Element

func Button

func Button() *Element

func Cite

func Cite() *Element

func Code

func Code() *Element

func Dd

func Dd() *Element

func Details

func Details() *Element

func Div

func Div() *Element

------------------------------------------------------------------------------------------------ Structural tags

func Dl

func Dl() *Element

func Dt

func Dt() *Element

func Em

func Em() *Element

func Fieldset

func Fieldset() *Element

func Figcaption

func Figcaption() *Element

func Figure

func Figure() *Element

------------------------------------------------------------------------------------------------ Miscellaneous

func Footer() *Element

func Form

func Form() *Element

------------------------------------------------------------------------------------------------ Form elements

func H1

func H1() *Element

------------------------------------------------------------------------------------------------ Headings

func H2

func H2() *Element

func H3

func H3() *Element

func H4

func H4() *Element

func H5

func H5() *Element

func H6

func H6() *Element
func Header() *Element

func Hr

func Hr() *Element

func I

func I() *Element

func Img

func Img() *Element

------------------------------------------------------------------------------------------------ Media / Void elements

func Init

func Init(tag string) *Element

------------------------------------------------------------------------------------------------ Init creates a new builder instance for the specified HTML tag.

func Input

func Input() *Element

func Label

func Label() *Element

func Legend

func Legend() *Element

func Li

func Li() *Element

func Main

func Main() *Element

func Mark

func Mark() *Element
func Nav() *Element

func Ol

func Ol() *Element

func Option

func Option() *Element

func P

func P() *Element

func Pre

func Pre() *Element

func Section

func Section() *Element

func Select

func Select() *Element

func Small

func Small() *Element

func Span

func Span() *Element

func Strong

func Strong() *Element

------------------------------------------------------------------------------------------------ Inline formatting

func Summary

func Summary() *Element

func Table

func Table() *Element

------------------------------------------------------------------------------------------------ Tables

func Tbody

func Tbody() *Element

func Td

func Td() *Element

func Textarea

func Textarea() *Element

func Th

func Th() *Element

func Thead

func Thead() *Element

func Time

func Time() *Element

func Tr

func Tr() *Element

func Ul

func Ul() *Element

------------------------------------------------------------------------------------------------ Lists

func (*Element) AppendTo

func (e *Element) AppendTo(parent dom.Handle) *Element

------------------------------------------------------------------------------------------------ AppendTo appends this element under a parent element.

func (*Element) Attr

func (e *Element) Attr(key, val string) *Element

------------------------------------------------------------------------------------------------ Attr sets an arbitrary string attribute.

func (*Element) Build

func (e *Element) Build() dom.Handle

------------------------------------------------------------------------------------------------ Build returns the compiled element handle.

func (*Element) Child

func (e *Element) Child(childHandle dom.Handle) *Element

------------------------------------------------------------------------------------------------ Child appends another builder's element as a child.

func (*Element) Class

func (e *Element) Class(val string) *Element

------------------------------------------------------------------------------------------------ Class adds a class name to the element.

func (*Element) HTML

func (e *Element) HTML(val string) *Element

------------------------------------------------------------------------------------------------ HTML sets the inner HTML content of the element.

func (*Element) ID

func (e *Element) ID(val string) *Element

------------------------------------------------------------------------------------------------ ID sets the element's DOM ID attribute.

func (*Element) On

func (e *Element) On(event string, cb js.Value) *Element

------------------------------------------------------------------------------------------------ On registers an event listener callback on the element.

func (*Element) Text

func (e *Element) Text(val string) *Element

------------------------------------------------------------------------------------------------ Text sets the inner text of the element.

Jump to

Keyboard shortcuts

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