Help us shape the future of Go! Take the 2026 Go Developer Survey

elem

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(nodes ...weaver.Node) weaver.Node

A creates the HTML <a> element (or anchor element), which with its href attribute creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.

func Abbr

func Abbr(nodes ...weaver.Node) weaver.Node

Abbr creates the HTML <abbr> element representing an abbreviation or acronym.

func Address

func Address(nodes ...weaver.Node) weaver.Node

Address creates the HTML <address> element indicating that the enclosed HTML provides contact information for a person or people, or for an organization.

func Article

func Article(nodes ...weaver.Node) weaver.Node

Article creates the HTML <article> element representing a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable.

func Aside

func Aside(nodes ...weaver.Node) weaver.Node

Aside creates the HTML <aside> element representing a portion of a document whose content is only indirectly related to the document's main content.

func Audio

func Audio(nodes ...weaver.Node) weaver.Node

Audio creates the HTML <audio> element used to embed sound content in documents.

func B

func B(nodes ...weaver.Node) weaver.Node

B creates the HTML <b> element used to draw the reader's attention to the element's contents, which are not otherwise granted special importance.

func Base

func Base(nodes ...weaver.Node) weaver.Node

Base creates the HTML <base> element specifying the base URL to use for all relative URLs in a document.

func Blockquote

func Blockquote(nodes ...weaver.Node) weaver.Node

Blockquote creates the HTML <blockquote> element indicating that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation.

func Body

func Body(nodes ...weaver.Node) weaver.Node

Body creates the HTML <body> element representing the content of an HTML document. There can be only one <body> element in a document.

func Br

func Br(nodes ...weaver.Node) weaver.Node

Br creates the HTML <br> element representing a line break. It is a void element.

func Button

func Button(nodes ...weaver.Node) weaver.Node

Button creates the HTML <button> element as an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it then performs an action, such as submitting a form or opening a dialog.

func Canvas

func Canvas(nodes ...weaver.Node) weaver.Node

Canvas creates the HTML <canvas> element used to draw graphics, on the fly, via JavaScript.

func Code

func Code(nodes ...weaver.Node) weaver.Node

Code creates the HTML <code> element displaying its contents styled in a fashion intended to indicate that the text is a short fragment of computer code.

func Datalist

func Datalist(nodes ...weaver.Node) weaver.Node

Datalist creates the HTML <datalist> element containing a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.

func Dd

func Dd(nodes ...weaver.Node) weaver.Node

Dd creates the HTML <dd> element providing the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).

func Del

func Del(nodes ...weaver.Node) weaver.Node

Del creates the HTML <del> element representing a range of text that has been deleted from a document.

func Details

func Details(nodes ...weaver.Node) weaver.Node

Details creates the HTML <details> element creating a disclosure widget in which information is visible only when the widget is toggled into an "open" state.

func Dialog

func Dialog(nodes ...weaver.Node) weaver.Node

Dialog creates the HTML <dialog> element representing a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.

func Div

func Div(nodes ...weaver.Node) weaver.Node

Div creates the HTML <div> element as the generic container for flow content. It has no effect on the content or layout until styled in some way using CSS.

func Dl

func Dl(nodes ...weaver.Node) weaver.Node

Dl creates the HTML <dl> element representing a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements).

func Dt

func Dt(nodes ...weaver.Node) weaver.Node

Dt creates the HTML <dt> element specifying a term in a description or definition list, and as such must be used inside a <dl> element.

func Each

func Each[T any](items []T, fn func(T) weaver.Node) weaver.Node

Each creates a node for each element in a slice

func Em

func Em(nodes ...weaver.Node) weaver.Node

Em creates the HTML <em> element marking text that has stress emphasis. The <em> element can be nested, with each level of nesting indicating a greater degree of emphasis.

func Fieldset

func Fieldset(nodes ...weaver.Node) weaver.Node

Fieldset creates the HTML <fieldset> element used to group several controls as well as labels (<label>) within a web form.

func Figcaption

func Figcaption(nodes ...weaver.Node) weaver.Node

Figcaption creates the HTML <figcaption> element representing a caption or legend describing the rest of the contents of its parent <figure> element, providing the <figure> an accessible name.

func Figure

func Figure(nodes ...weaver.Node) weaver.Node

Figure creates the HTML <figure> element representing self-contained content, potentially with an optional caption, which is specified using the <figcaption> element. The figure, its caption, and its contents are referenced as a single unit.

func Footer(nodes ...weaver.Node) weaver.Node

Footer creates the HTML <footer> element representing a footer for its nearest ancestor sectioning content or sectioning root element.

func Form

func Form(nodes ...weaver.Node) weaver.Node

Form creates the HTML <form> element representing a document section containing interactive controls for submitting information.

func Fragment

func Fragment(nodes ...weaver.Node) weaver.Node

Fragment returns multiple elements as is without a wrapper element

func H1

func H1(nodes ...weaver.Node) weaver.Node

H1 creates the HTML <h1> element representing the highest section level heading.

func H2

func H2(nodes ...weaver.Node) weaver.Node

H2 creates the HTML <h2> element representing a second-level section heading.

func H3

func H3(nodes ...weaver.Node) weaver.Node

H3 creates the HTML <h3> element representing a third-level section heading.

func H4

func H4(nodes ...weaver.Node) weaver.Node

H4 creates the HTML <h4> element representing a fourth-level section heading.

func H5

func H5(nodes ...weaver.Node) weaver.Node

H5 creates the HTML <h5> element representing a fifth-level section heading.

func H6

func H6(nodes ...weaver.Node) weaver.Node

H6 creates the HTML <h6> element representing the lowest section level heading.

func Head(nodes ...weaver.Node) weaver.Node

Head creates the HTML <head> element containing machine-readable information (metadata) about the document, like its title, scripts, and style sheets.

func Header(nodes ...weaver.Node) weaver.Node

Header creates the HTML <header> element representing introductory content, typically a group of introductory or navigational aids.

func Hr

func Hr(nodes ...weaver.Node) weaver.Node

Hr creates the HTML <hr> element representing a thematic break between paragraph-level elements.

func Html

func Html(nodes ...weaver.Node) weaver.Node

Html creates the HTML <html> element representing the root (top-level element) of an HTML document. All other elements must be descendants of this element.

func I

func I(nodes ...weaver.Node) weaver.Node

I creates the HTML <i> element representing a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomic designations, among others.

func If

func If(condition bool, thenFunc func() weaver.Node) weaver.Node

If returns the node provided by the closure when the condition is true

func IfElse

func IfElse(condition bool, thenFunc func() weaver.Node, elseFunc func() weaver.Node) weaver.Node

IfElse returns the node provided by the first closure when the condition is true, otherwise it calls the else closure

func Iframe

func Iframe(nodes ...weaver.Node) weaver.Node

Iframe creates the HTML <iframe> element representing a nested browsing context, embedding another HTML page into the current one.

func Img

func Img(nodes ...weaver.Node) weaver.Node

Img creates the HTML <img> element embedding an image into the document.

func Input

func Input(nodes ...weaver.Node) weaver.Node

Input creates the HTML <input> element used to create interactive controls for web-based forms in order to accept data from the user.

func Ins

func Ins(nodes ...weaver.Node) weaver.Node

Ins creates the HTML <ins> element representing a range of text that has been added to a document.

func Label

func Label(nodes ...weaver.Node) weaver.Node

Label creates the HTML <label> element representing a caption for an item in a user interface.

func Legend

func Legend(nodes ...weaver.Node) weaver.Node

Legend creates the HTML <legend> element representing a caption for the content of its parent <fieldset>.

func Li

func Li(nodes ...weaver.Node) weaver.Node

Li creates the HTML <li> element used to represent an item in a list.

func Link(nodes ...weaver.Node) weaver.Node

Link creates the HTML <link> element specifying relationships between the current document and an external resource.

func Main

func Main(nodes ...weaver.Node) weaver.Node

Main creates the HTML <main> element representing the dominant content of the <body> of a document.

func Mark

func Mark(nodes ...weaver.Node) weaver.Node

Mark creates the HTML <mark> element representing text which is marked or highlighted for reference or notation purposes.

func Meta

func Meta(nodes ...weaver.Node) weaver.Node

Meta creates the HTML <meta> element representing metadata that cannot be represented by other HTML meta-related elements.

func Meter

func Meter(nodes ...weaver.Node) weaver.Node

Meter creates the HTML <meter> element representing either a scalar value within a known range or a fractional value.

func Nav(nodes ...weaver.Node) weaver.Node

Nav creates the HTML <nav> element representing a section of a page whose purpose is to provide navigation links.

func Ol

func Ol(nodes ...weaver.Node) weaver.Node

Ol creates the HTML <ol> element representing an ordered list of items — typically rendered as a numbered list.

func Optgroup

func Optgroup(nodes ...weaver.Node) weaver.Node

Optgroup creates the HTML <optgroup> element creating a grouping of options within a <select> element.

func Option

func Option(nodes ...weaver.Node) weaver.Node

Option creates the HTML <option> element used to define an item contained in a <select>, an <optgroup>, or a <datalist> element.

func P

func P(nodes ...weaver.Node) weaver.Node

P creates the HTML <p> element representing a paragraph.

func Pre

func Pre(nodes ...weaver.Node) weaver.Node

Pre creates the HTML <pre> element representing preformatted text which is to be presented exactly as written in the HTML file.

func Progress

func Progress(nodes ...weaver.Node) weaver.Node

Progress creates the HTML <progress> element displaying an indicator showing the completion progress of a task, typically displayed as a progress bar.

func Script

func Script(nodes ...weaver.Node) weaver.Node

Script creates the HTML <script> element used to embed executable code or data; this is typically used to embed or refer to JavaScript code.

func Section

func Section(nodes ...weaver.Node) weaver.Node

Section creates the HTML <section> element representing a generic standalone section of a document.

func Select

func Select(nodes ...weaver.Node) weaver.Node

Select creates the HTML <select> element representing a control that provides a menu of options.

func Small

func Small(nodes ...weaver.Node) weaver.Node

Small creates the HTML <small> element representing side-comments and small print, like copyright and legal text, independent of its styled presentation.

func Span

func Span(nodes ...weaver.Node) weaver.Node

Span creates the HTML <span> element as a generic inline container for phrasing content.

func Strong

func Strong(nodes ...weaver.Node) weaver.Node

Strong creates the HTML <strong> element indicating that its contents have strong importance, seriousness, or urgency.

func Style

func Style(nodes ...weaver.Node) weaver.Node

Style creates the HTML <style> element containing style information for a document, or part of a document.

func Sub

func Sub(nodes ...weaver.Node) weaver.Node

Sub creates the HTML <sub> element specifying inline text which should be displayed as subscript for solely typographical reasons.

func Summary

func Summary(nodes ...weaver.Node) weaver.Node

Summary creates the HTML <summary> element specifying a summary, caption, or legend for a <details> element's disclosure box.

func Sup

func Sup(nodes ...weaver.Node) weaver.Node

Sup creates the HTML <sup> element specifying inline text which is to be displayed as superscript for solely typographical reasons.

func TBody

func TBody(nodes ...weaver.Node) weaver.Node

TBody creates the HTML <tbody> element encapsulating a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).

func TFoot

func TFoot(nodes ...weaver.Node) weaver.Node

TFoot creates the HTML <tfoot> element defining a set of rows summarizing the columns of the table.

func THead

func THead(nodes ...weaver.Node) weaver.Node

THead creates the HTML <thead> element defining a set of rows defining the head of the columns of the table.

func Table

func Table(nodes ...weaver.Node) weaver.Node

Table creates the HTML <table> element representing tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.

func Td

func Td(nodes ...weaver.Node) weaver.Node

Td creates the HTML <td> element defining a cell of a table that contains data.

func Text

func Text(text string) weaver.Node

Text returns HTML-escaped text

func TextArea

func TextArea(nodes ...weaver.Node) weaver.Node

TextArea creates the HTML <textarea> element representing a multi-line plain-text editing control.

func Th

func Th(nodes ...weaver.Node) weaver.Node

Th creates the HTML <th> element defining a cell as header of a group of table cells.

func Time

func Time(nodes ...weaver.Node) weaver.Node

Time creates the HTML <time> element representing a specific period in time.

func Title

func Title(title string) weaver.Node

Title creates the HTML <title> element defining the document's title that is shown in a browser's title bar or a page's tab.

func Tr

func Tr(nodes ...weaver.Node) weaver.Node

Tr creates the HTML <tr> element defining a row of cells in a table.

func U

func U(nodes ...weaver.Node) weaver.Node

U creates the HTML <u> element representing text that should be stylistically different from normal text, typically rendered as underlined.

func Ul

func Ul(nodes ...weaver.Node) weaver.Node

Ul creates the HTML <ul> element representing an unordered list of items.

func UnsafeRawText

func UnsafeRawText(text string) weaver.Node

UnsafeRawText returns unescaped text directly into the output

func Video

func Video(nodes ...weaver.Node) weaver.Node

Video creates the HTML <video> element embedding a media player which supports video playback into the document.

Types

This section is empty.

Jump to

Keyboard shortcuts

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