Documentation
¶
Overview ¶
Package godom provides a comprehensive and fluent API for creating and manipulating DOM structures in Go.
The GoDOM library is inspired by the gomponents library, but it offers a unique take on DOM manipulation in Go. Instead of merely creating strings of HTML, GoDOM focuses on maintaining a live DOM-like structure, making it easier to manipulate, extend, and integrate with other Go packages.
Core Concepts:
1. **Elements**: At the heart of the library are Elements, which represent individual HTML elements. Elements can be nested, allowing for the creation of complex DOM structures. 2. **Attributes**: Attributes allow for the modification of Elements, adding things like classes, IDs, and other HTML attributes. 3. **Helpers**: The library provides helper functions for every HTML5 tag and attribute, making it easy to build any HTML structure. 4. **Utilities**: GoDOM provides utilities that allow for conditional rendering of elements and attributes, delayed rendering, and more.
Usage:
To create and render a simple HTML structure:
```go doc := Div(Class("container"))(
H1()(Content("Hello, GoDOM!")), P()(Content("This is a simple example.")),
) var buf bytes.Buffer doc.Render(&buf) fmt.Println(buf.String()) ``` The GoDOM library can be extended with the template and util packages for more functionality.
For more complex examples and use cases, refer to the README and other package documentations.
Index ¶
- Variables
- func A(attrs ...types.Attribute) types.ElementFactory
- func Abbr(attrs ...types.Attribute) types.ElementFactory
- func AbbrAttr(abbreviation string) types.Attribute
- func Accept(accept string) types.Attribute
- func AcceptCharset(characterSets ...string) types.Attribute
- func AccessKey(key rune) types.Attribute
- func Action(url string) types.Attribute
- func Address(attrs ...types.Attribute) types.ElementFactory
- func Allow(policy string) types.Attribute
- func Alt(text string) types.Attribute
- func Area(attrs ...types.Attribute) types.ElementFactory
- func Article(attrs ...types.Attribute) types.ElementFactory
- func Aside(attrs ...types.Attribute) types.ElementFactory
- func Async() types.Attribute
- func Audio(attrs ...types.Attribute) types.ElementFactory
- func Autocomplete(on bool) types.Attribute
- func Autofocus() types.Attribute
- func Autoplay() types.Attribute
- func B(attrs ...types.Attribute) types.ElementFactory
- func BDI(attrs ...types.Attribute) types.ElementFactory
- func BDO(attrs ...types.Attribute) types.ElementFactory
- func Base(attrs ...types.Attribute) types.Element
- func Blockquote(attrs ...types.Attribute) types.ElementFactory
- func Body(attrs ...types.Attribute) types.ElementFactory
- func Br(attrs ...types.Attribute) types.Element
- func Button(attrs ...types.Attribute) types.ElementFactory
- func Canvas(attrs ...types.Attribute) types.ElementFactory
- func Caption(attrs ...types.Attribute) types.ElementFactory
- func Charset(charset string) types.Attribute
- func Checked() types.Attribute
- func Cite(attrs ...types.Attribute) types.ElementFactory
- func CiteAttr(url string) types.Attribute
- func Class(classes ...string) types.Attribute
- func Code(attrs ...types.Attribute) types.ElementFactory
- func Col(attrs ...types.Attribute) types.Element
- func ColGroup(attrs ...types.Attribute) types.ElementFactory
- func ColSpan(columns int) types.Attribute
- func Cols(width int) types.Attribute
- func Content(content string) types.Element
- func ContentAttr(charset string) types.Attribute
- func ContentEditable(editable bool) types.Attribute
- func Controls() types.Attribute
- func Coords(coords string) types.Attribute
- func CrossOrigin(coords string) types.Attribute
- func DD(attrs ...types.Attribute) types.ElementFactory
- func DL(attrs ...types.Attribute) types.ElementFactory
- func DT(attrs ...types.Attribute) types.ElementFactory
- func Data(attrs ...types.Attribute) types.ElementFactory
- func DataAttr(url string) types.Attribute
- func DataList(attrs ...types.Attribute) types.ElementFactory
- func Data_(key, value string) types.Attribute
- func DateTime(datetime time.Time) types.Attribute
- func Default() types.Attribute
- func Defer() types.Attribute
- func Del(attrs ...types.Attribute) types.ElementFactory
- func Details(attrs ...types.Attribute) types.ElementFactory
- func Dfn(attrs ...types.Attribute) types.ElementFactory
- func Dialog(attrs ...types.Attribute) types.ElementFactory
- func Dir(direction string) types.Attribute
- func DirName(direction string) types.Attribute
- func Disabled() types.Attribute
- func Div(attrs ...types.Attribute) types.ElementFactory
- func Doctype() types.Element
- func Download(filename ...string) types.Attribute
- func Draggable(draggable bool) types.Attribute
- func Em(attrs ...types.Attribute) types.ElementFactory
- func Embed(attrs ...types.Attribute) types.Element
- func EncType(encoding string) types.Attribute
- func FieldSet(attrs ...types.Attribute) types.ElementFactory
- func FigCaption(attrs ...types.Attribute) types.ElementFactory
- func Figure(attrs ...types.Attribute) types.ElementFactory
- func Footer(attrs ...types.Attribute) types.ElementFactory
- func For(elements ...string) types.Attribute
- func Form(attrs ...types.Attribute) types.ElementFactory
- func FormAction(url string) types.Attribute
- func FormEncType(encoding string) types.Attribute
- func FormID(formID string) types.Attribute
- func FormMethod(method string) types.Attribute
- func FormNoValidate() types.Attribute
- func FormTarget(target string) types.Attribute
- func Group(children ...types.Element) types.Element
- func H1(attrs ...types.Attribute) types.ElementFactory
- func H2(attrs ...types.Attribute) types.ElementFactory
- func H3(attrs ...types.Attribute) types.ElementFactory
- func H4(attrs ...types.Attribute) types.ElementFactory
- func H5(attrs ...types.Attribute) types.ElementFactory
- func H6(attrs ...types.Attribute) types.ElementFactory
- func HR(attrs ...types.Attribute) types.Element
- func HRef(url string) types.Attribute
- func HRefLang(languageCode string) types.Attribute
- func HTML(attrs ...types.Attribute) types.ElementFactory
- func HTTPEquiv(equiv string) types.Attribute
- func Head(attrs ...types.Attribute) types.ElementFactory
- func Header(attrs ...types.Attribute) types.ElementFactory
- func Headers(headers ...string) types.Attribute
- func Height(pixels int) types.Attribute
- func Hidden() types.Attribute
- func High(high int) types.Attribute
- func I(attrs ...types.Attribute) types.ElementFactory
- func ID(id string) types.Attribute
- func IFrame(attrs ...types.Attribute) types.Element
- func Img(attrs ...types.Attribute) types.Element
- func Input(attrs ...types.Attribute) types.Element
- func Ins(attrs ...types.Attribute) types.ElementFactory
- func Integrity(hash string) types.Attribute
- func IsMap() types.Attribute
- func Kbd(attrs ...types.Attribute) types.ElementFactory
- func Kind(kind string) types.Attribute
- func Label(attrs ...types.Attribute) types.ElementFactory
- func LabelAttr(label string) types.Attribute
- func Lang(lang string) types.Attribute
- func Legend(attrs ...types.Attribute) types.ElementFactory
- func Li(attrs ...types.Attribute) types.ElementFactory
- func Link(attrs ...types.Attribute) types.Element
- func List(dataListID string) types.Attribute
- func Loading(loading string) types.Attribute
- func LongDesc(url string) types.Attribute
- func Loop() types.Attribute
- func Low(low int) types.Attribute
- func Main(attrs ...types.Attribute) types.ElementFactory
- func Map(attrs ...types.Attribute) types.ElementFactory
- func Mark(attrs ...types.Attribute) types.ElementFactory
- func Max[T MinMaxType](max T) types.Attribute
- func MaxLength(length int) types.Attribute
- func Media(mediaQuery string) types.Attribute
- func Meta(attrs ...types.Attribute) types.Element
- func Meter(attrs ...types.Attribute) types.ElementFactory
- func Method(method string) types.Attribute
- func Min[T MinMaxType](min T) types.Attribute
- func MinLength(length int) types.Attribute
- func Multiple() types.Attribute
- func Muted() types.Attribute
- func Name(name string) types.Attribute
- func Nav(attrs ...types.Attribute) types.ElementFactory
- func NoModule(noModule bool) types.Attribute
- func NoScript(attrs ...types.Attribute) types.ElementFactory
- func NoValidate() types.Attribute
- func OL(attrs ...types.Attribute) types.ElementFactory
- func Object(attrs ...types.Attribute) types.ElementFactory
- func OnAbort(script string) types.Attribute
- func OnAfterPrint(script string) types.Attribute
- func OnBeforePrint(script string) types.Attribute
- func OnBeforeUnload(script string) types.Attribute
- func OnBlur(script string) types.Attribute
- func OnCanPlay(script string) types.Attribute
- func OnCanPlayThrough(script string) types.Attribute
- func OnChange(script string) types.Attribute
- func OnClick(script string) types.Attribute
- func OnContextMenu(script string) types.Attribute
- func OnCopy(script string) types.Attribute
- func OnCueChange(script string) types.Attribute
- func OnCut(script string) types.Attribute
- func OnDoubleClick(script string) types.Attribute
- func OnDrag(script string) types.Attribute
- func OnDragEnd(script string) types.Attribute
- func OnDragEnter(script string) types.Attribute
- func OnDragLeave(script string) types.Attribute
- func OnDragOver(script string) types.Attribute
- func OnDragStart(script string) types.Attribute
- func OnDrop(script string) types.Attribute
- func OnDurationChange(script string) types.Attribute
- func OnEmptied(script string) types.Attribute
- func OnEnded(script string) types.Attribute
- func OnError(script string) types.Attribute
- func OnFocus(script string) types.Attribute
- func OnHashChange(script string) types.Attribute
- func OnInput(script string) types.Attribute
- func OnInvalid(script string) types.Attribute
- func OnKeyDown(script string) types.Attribute
- func OnKeyPress(script string) types.Attribute
- func OnKeyUp(script string) types.Attribute
- func OnLoad(script string) types.Attribute
- func OnLoadStart(script string) types.Attribute
- func OnLoadedData(script string) types.Attribute
- func OnLoadedMetaData(script string) types.Attribute
- func OnMessage(script string) types.Attribute
- func OnMouseDown(script string) types.Attribute
- func OnMouseMove(script string) types.Attribute
- func OnMouseOut(script string) types.Attribute
- func OnMouseOver(script string) types.Attribute
- func OnMouseUp(script string) types.Attribute
- func OnOffline(script string) types.Attribute
- func OnOnline(script string) types.Attribute
- func OnPageHide(script string) types.Attribute
- func OnPageShow(script string) types.Attribute
- func OnPaste(script string) types.Attribute
- func OnPause(script string) types.Attribute
- func OnPlay(script string) types.Attribute
- func OnPlaying(script string) types.Attribute
- func OnPopState(script string) types.Attribute
- func OnProgress(script string) types.Attribute
- func OnRateChange(script string) types.Attribute
- func OnReset(script string) types.Attribute
- func OnResize(script string) types.Attribute
- func OnScroll(script string) types.Attribute
- func OnSearch(script string) types.Attribute
- func OnSeeked(script string) types.Attribute
- func OnSeeking(script string) types.Attribute
- func OnSelect(script string) types.Attribute
- func OnStalled(script string) types.Attribute
- func OnStorage(script string) types.Attribute
- func OnSubmit(script string) types.Attribute
- func OnSuspend(script string) types.Attribute
- func OnTimeUpdate(script string) types.Attribute
- func OnToggle(script string) types.Attribute
- func OnUnload(script string) types.Attribute
- func OnVolumeChange(script string) types.Attribute
- func OnWaiting(script string) types.Attribute
- func OnWheel(script string) types.Attribute
- func Open() types.Attribute
- func OptGroup(attrs ...types.Attribute) types.ElementFactory
- func Optimum(optimum int) types.Attribute
- func Option(attrs ...types.Attribute) types.ElementFactory
- func Output(attrs ...types.Attribute) types.ElementFactory
- func P(attrs ...types.Attribute) types.ElementFactory
- func Param(attrs ...types.Attribute) types.Element
- func Pattern(pattern string) types.Attribute
- func Picture(attrs ...types.Attribute) types.ElementFactory
- func Ping(urls ...string) types.Attribute
- func Placeholder(placeholder string) types.Attribute
- func Poster(url string) types.Attribute
- func Pre(attrs ...types.Attribute) types.ElementFactory
- func Preload(preload string) types.Attribute
- func Progress(attrs ...types.Attribute) types.ElementFactory
- func Q(attrs ...types.Attribute) types.ElementFactory
- func RP(attrs ...types.Attribute) types.ElementFactory
- func RT(attrs ...types.Attribute) types.ElementFactory
- func ReadOnly() types.Attribute
- func ReferrerPolicy(policy string) types.Attribute
- func Rel(relationship string) types.Attribute
- func Required() types.Attribute
- func Reversed() types.Attribute
- func RowSpan(rows int) types.Attribute
- func Rows(rows int) types.Attribute
- func Ruby(attrs ...types.Attribute) types.ElementFactory
- func S(attrs ...types.Attribute) types.ElementFactory
- func SVG(attrs ...types.Attribute) types.ElementFactory
- func Samp(attrs ...types.Attribute) types.ElementFactory
- func Sandbox(restrictions ...string) types.Attribute
- func Scope(scope string) types.Attribute
- func Script(attrs ...types.Attribute) types.ElementFactory
- func Section(attrs ...types.Attribute) types.ElementFactory
- func Select(attrs ...types.Attribute) types.ElementFactory
- func Selected() types.Attribute
- func Shape(shape string) types.Attribute
- func Size(size int) types.Attribute
- func Sizes(sizes string) types.Attribute
- func Small(attrs ...types.Attribute) types.ElementFactory
- func Source(attrs ...types.Attribute) types.Element
- func Span(attrs ...types.Attribute) types.ElementFactory
- func SpanAttr(columns int) types.Attribute
- func Spellcheck(check bool) types.Attribute
- func Src(url string) types.Attribute
- func SrcDoc(elements ...types.Element) types.Attribute
- func SrcLang(lang string) types.Attribute
- func SrcSet(urlList string) types.Attribute
- func Start(start int) types.Attribute
- func Step[T NumOrString](step T) types.Attribute
- func Strong(attrs ...types.Attribute) types.ElementFactory
- func Style(attrs ...types.Attribute) types.ElementFactory
- func StyleAttr(style string) types.Attribute
- func Sub(attrs ...types.Attribute) types.ElementFactory
- func Summary(attrs ...types.Attribute) types.ElementFactory
- func Sup(attrs ...types.Attribute) types.ElementFactory
- func TBody(attrs ...types.Attribute) types.ElementFactory
- func TD(attrs ...types.Attribute) types.ElementFactory
- func TFoot(attrs ...types.Attribute) types.ElementFactory
- func TH(attrs ...types.Attribute) types.ElementFactory
- func THead(attrs ...types.Attribute) types.ElementFactory
- func TR(attrs ...types.Attribute) types.ElementFactory
- func TabIndex(idx int) types.Attribute
- func Table(attrs ...types.Attribute) types.ElementFactory
- func Target(target string) types.Attribute
- func Template(attrs ...types.Attribute) types.ElementFactory
- func TextArea(attrs ...types.Attribute) types.ElementFactory
- func Time(attrs ...types.Attribute) types.ElementFactory
- func Title(attrs ...types.Attribute) types.ElementFactory
- func TitleAttr(title string) types.Attribute
- func Track(attrs ...types.Attribute) types.Element
- func Translate(translate bool) types.Attribute
- func Type(typ string) types.Attribute
- func TypeMustMatch(mustMatch bool) types.Attribute
- func U(attrs ...types.Attribute) types.ElementFactory
- func UL(attrs ...types.Attribute) types.ElementFactory
- func UseMap(mapName string) types.Attribute
- func Value[T NumOrString](value T) types.Attribute
- func Var(attrs ...types.Attribute) types.ElementFactory
- func Video(attrs ...types.Attribute) types.ElementFactory
- func WBr(attrs ...types.Attribute) types.Element
- func Width(pixels int) types.Attribute
- func Wrap(wrap string) types.Attribute
- func XMLNS(namespace string) types.Attribute
- type MinMaxType
- type NumOrString
Constants ¶
This section is empty.
Variables ¶
var FormAttr = FormID
Functions ¶
func A ¶
func A(attrs ...types.Attribute) types.ElementFactory
The A tag defines a hyperlink, which is used to link from one page to another.
func Abbr ¶
func Abbr(attrs ...types.Attribute) types.ElementFactory
The Abbr tag defines an abbreviation or an acronym.
func AbbrAttr ¶
The AbbrAttr attribute specifies an abbreviated version of the content in a header cell.
This attribute is allowed for: - TH
func Accept ¶
The Accept attribute specifies a filter for what file types the user can pick from the file input dialog box.
This attribute is allowed for: - Input
func AcceptCharset ¶
The AcceptCharset attribute specifies the character encodings that are to be used for the form submission.
This attribute is allowed for: - Form
func AccessKey ¶
The AccessKey attribute specifies a shortcut key to activate/focus an element.
This is a global types.Attribute.
func Action ¶
The Action attribute specifies where to send the form-data when a form is submitted.
This attribute is allowed for: - Form
func Address ¶
func Address(attrs ...types.Attribute) types.ElementFactory
The Address tag defines the contact information for the author/owner of a document or an article.
func Allow ¶
The Allow attribute specifies a feature policy for the IFrame
This attribute is allowed for: - IFrame
func Alt ¶
The Alt attribute specifies an alternate text for the Element.
This attribute is allowed for: - Area - Img - Input
func Area ¶
func Area(attrs ...types.Attribute) types.ElementFactory
The Area tag defines an area inside an image map.
func Article ¶
func Article(attrs ...types.Attribute) types.ElementFactory
The Article tag specifies independent, self-contained content.
func Aside ¶
func Aside(attrs ...types.Attribute) types.ElementFactory
The Aside tag defines some content aside from the content it is placed in.
func Async ¶
The Async flag specifies that the Script is downloaded in parallel to parsing the page, and executed as soon as it is available (before parsing completes)
This flag is allowed for: - Script
func Audio ¶
func Audio(attrs ...types.Attribute) types.ElementFactory
The Audio tag is used to embed sound content in a document, such as music or other audio streams.
func Autocomplete ¶
The Autocomplete attribute specifies whether a form should have autocomplete on or off
This attribute is allowed for: - Form - Input
func Autofocus ¶
The Autofocus flag specifies that an Element should automatically get focus when the page loads.
This flag is allowed for: - Button - Input - Select - TextArea
func Autoplay ¶
The Autoplay flag specifies that the audio or video will start playing as soon as it is ready.
This flag is allowed for: - Audio - Video
func B ¶
func B(attrs ...types.Attribute) types.ElementFactory
The B tag specifies bold text without any extra importance.
func BDI ¶
func BDI(attrs ...types.Attribute) types.ElementFactory
The BDI tag isolates a part of text that might be formatted in a different direction from other text outside it.
func BDO ¶
func BDO(attrs ...types.Attribute) types.ElementFactory
The BDO tag is used to override the current text direction.
func Blockquote ¶
func Blockquote(attrs ...types.Attribute) types.ElementFactory
The Blockquote tag specifies a section that is quoted from another source.
func Body ¶
func Body(attrs ...types.Attribute) types.ElementFactory
The Body tag defines the document's body.
func Button ¶
func Button(attrs ...types.Attribute) types.ElementFactory
The Button tag defines a clickable button.
func Canvas ¶
func Canvas(attrs ...types.Attribute) types.ElementFactory
The Canvas tag is used to draw graphics, on the fly, via scripting (usually JavaScript).
func Caption ¶
func Caption(attrs ...types.Attribute) types.ElementFactory
The Caption tag defines a table caption.
func Charset ¶
The Charset attribute specifies the character encoding for the HTML document.
This attribute is allowed for: - Meta
func Checked ¶
The Checked flag specifies that an Input element should be pre-selected when the page loads.
This flag is allowed for: - Input
func Cite ¶
func Cite(attrs ...types.Attribute) types.ElementFactory
The Cite tag defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.).
func CiteAttr ¶
The CiteAttr attribute specifies the source of the quotation or a URL to a document that explains the reason why the text inside a Del tag was deleted.
This attribute is allowed for: - Blockquote - Del - Ins - Q
Note: This attribute will render to `cite="<url>"`
func Class ¶
The Class attribute specifies one or more classnames for an element (refers to a class in a style sheet)
This is a global types.Attribute.
func Code ¶
func Code(attrs ...types.Attribute) types.ElementFactory
The Code tag is used to define a piece of computer code. The content inside is displayed in the browser's default monospace font.
func ColGroup ¶
func ColGroup(attrs ...types.Attribute) types.ElementFactory
The ColGroup tag specifies a group of one or more columns in a table for formatting.
func ColSpan ¶
The ColSpan attribute specifies the number of columns a cell should span
This attribute is allowed for: - TD - TH
func Cols ¶
The Cols attribute specifies the visible width of a TextArea
This attribute is allowed for: - TextArea
func ContentAttr ¶
The ContentAttr attribute specifies the value associated with the http-equiv or name attribute.
This attribute is allowed for: - Meta
func ContentEditable ¶
The ContentEditable attribute specifies whether the content of an element is editable or not.
This is a global types.Attribute.
func Controls ¶
The Controls flag specifies that audio or video controls should be displayed.
This flag is allowed for: - Audio - Video
func Coords ¶
The Coords attribute specifies the coordinates of the area.
This attribute is allowed for: - Area
func CrossOrigin ¶
The CrossOrigin allows images from third-party sites that allow cross-origin access.
This attribute is allowed for: - Img - Link - Script
func DD ¶
func DD(attrs ...types.Attribute) types.ElementFactory
The DD tag is used to describe a term/name in a description list.
func DL ¶
func DL(attrs ...types.Attribute) types.ElementFactory
The DL tag defines a description list.
func DT ¶
func DT(attrs ...types.Attribute) types.ElementFactory
The DT tag defines a term/name in a description list.
func Data ¶
func Data(attrs ...types.Attribute) types.ElementFactory
The Data tag is used to add a machine-readable translation of a given content.
func DataAttr ¶
The DataAttr specifies the URL of the resource to be used by the Object.
This attribute is allowed for: - Object
func DataList ¶
func DataList(attrs ...types.Attribute) types.ElementFactory
The DataList tag specifies a list of pre-defined options for an <input> element.
func Data_ ¶
The Data_ attributes are used to store custom data private to the page or application.
This is a global types.Attribute.
func DateTime ¶
The DateTime attribute specifies the date and time of when the text was deleted/changed.
This attribute is allowed for: - Del - Ins - Time
func Default ¶
The Default flag specifies that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate.
This flag is allowed for: - Track
func Defer ¶
The Defer flag specifies that the script is downloaded in parallel to parsing the page, and executed after the page has finished parsing.
This flag is allowed for: - Script
func Del ¶
func Del(attrs ...types.Attribute) types.ElementFactory
The Del tag defines text that has been deleted from a document.
func Details ¶
func Details(attrs ...types.Attribute) types.ElementFactory
The Details tag specifies additional details that the user can open and close on demand.
func Dfn ¶
func Dfn(attrs ...types.Attribute) types.ElementFactory
The Dfn tag stands for the "definition element", and it specifies a term that is going to be defined within the content.
func Dialog ¶
func Dialog(attrs ...types.Attribute) types.ElementFactory
The Dialog tag defines a dialog box or subwindow.
func Dir ¶
The Dir attribute specifies the text direction for the content in an Element
This is a global types.Attribute.
func DirName ¶
The DirName attribute specifies t that the text direction will be submitted.
This attribute is allowed for: - Input - TextArea
func Disabled ¶
The Disabled flag specifies that an element should be disabled.
This flag is allowed for: - Button - FieldSet - Input - OptGroup - Option - Select - TextArea
func Div ¶
func Div(attrs ...types.Attribute) types.ElementFactory
The Div tag defines a division or a section in an HTML document.
func Download ¶
The Download attribute specifies that the target will be downloaded when a user clicks on the hyperlink.
This attribute is allowed for: - A - Area
func Draggable ¶
The Draggable attribute specifies whether an Element is draggable or not.
This is a global types.Attribute.
func Em ¶
func Em(attrs ...types.Attribute) types.ElementFactory
The Em tag is used to define emphasized text. The content inside is typically displayed in italic.
func Embed ¶
The Embed tag defines a container for an external resource, such as a web page, a picture, a media player, or a plug-in application.
func EncType ¶
The EncType attribute specifies how the form-data should be encoded when submitting it to the server.
This attribute is allowed for: - Form
func FieldSet ¶
func FieldSet(attrs ...types.Attribute) types.ElementFactory
The FieldSet tag is used to group related elements in a form.
func FigCaption ¶
func FigCaption(attrs ...types.Attribute) types.ElementFactory
The FigCaption tag defines a caption for a Figure element.
func Figure ¶
func Figure(attrs ...types.Attribute) types.ElementFactory
The Figure tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.
func Footer ¶
func Footer(attrs ...types.Attribute) types.ElementFactory
The Footer tag defines a footer for a document or section.
func For ¶
The For attribute specifies the id of the Form Element the Label or Option should be bound to.
This attribute is allowed for: - Label - Output
func Form ¶
func Form(attrs ...types.Attribute) types.ElementFactory
The Form tag is used to create an HTML form for user input.
func FormAction ¶
The FormAction attribute specifies where to send the form-data when a form is submitted.
This attribute is allowed for: - Button - Input
func FormEncType ¶
The FormEncType attribute specifies how form-data should be encoded before sending it to a server.
This attribute is allowed for: - Button - Input
func FormID ¶
The FormID attribute specifies which form the button belongs to.
This attribute is allowed for: - Button - FieldSet - Input - Label - Meter - Object - Output - Select - TextArea
Note: This attribute will render to `form="<formID>"`
func FormMethod ¶
The FormMethod attribute specifies how to send the form-data (which HTTP method to use).
This attribute is allowed for: - Button - Input
func FormNoValidate ¶
The FormNoValidate flag specifies that the form-data should not be validated on submission.
This attribute is allowed for: - Button - Input
func FormTarget ¶
The FormTarget attribute specifies where to display the response after submitting the form.
This attribute is allowed for: - Button - Input
func Group ¶
Group is a wrapper that can hold 0...N children. This allows to hold a full document or can be used in places where multiple elements are required, but only a single types.Element is allowed.
func H1 ¶
func H1(attrs ...types.Attribute) types.ElementFactory
The H1 tag is used to define a level 1 HTML Heading
func H2 ¶
func H2(attrs ...types.Attribute) types.ElementFactory
The H2 tag is used to define a level 2 HTML Heading
func H3 ¶
func H3(attrs ...types.Attribute) types.ElementFactory
The H3 tag is used to define a level 3 HTML Heading
func H4 ¶
func H4(attrs ...types.Attribute) types.ElementFactory
The H4 tag is used to define a level 4 HTML Heading
func H5 ¶
func H5(attrs ...types.Attribute) types.ElementFactory
The H5 tag is used to define a level 5 HTML Heading
func H6 ¶
func H6(attrs ...types.Attribute) types.ElementFactory
The H6 tag is used to define a level 6 HTML Heading
func HRef ¶
The HRef attribute specifies the URL of the page the link goes to.
This attribute is allowed for: - A - Area - Base - Link
func HRefLang ¶
The HRefLang attribute specifies the language of the linked document.
This attribute is allowed for: - A - Area - Link
func HTML ¶
func HTML(attrs ...types.Attribute) types.ElementFactory
The HTML tag represents the root of an HTML document.
func HTTPEquiv ¶
The HTTPEquiv attribute provides an HTTP header for the information/value of the content attribute.
This attribute is allowed for: - Meta
func Head ¶
func Head(attrs ...types.Attribute) types.ElementFactory
The Head element is a container for metadata (data about data) and is placed between the HTML tag and the Body tag.
func Header ¶
func Header(attrs ...types.Attribute) types.ElementFactory
The Header element represents a container for introductory content or a set of navigational links.
func Headers ¶
The Headers attribute specifies one or more header cells a cell is related to
This attribute is allowed for: - TD - TH
func Height ¶
The Height attribute specifies the height of an Element.
This attribute is allowed for: - Canvas - Embed - IFrame - Img - Input - Object - Video
func Hidden ¶
The Hidden flag specifies the range that is considered to be a high value.
This is a global types.Attribute.
func High ¶
The High attribute specifies the range that is considered to be a high value.
This attribute is allowed for: - Meter
func I ¶
func I(attrs ...types.Attribute) types.ElementFactory
The I tag defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.
func Ins ¶
func Ins(attrs ...types.Attribute) types.ElementFactory
The Ins tag defines a text that has been inserted into a document.
func Integrity ¶
The Integrity attribute allows a browser to check the fetched script to ensure that the code is never loaded if the source has been manipulated.
This attribute is allowed for: - Script
func IsMap ¶
The IsMap flag specifies an image as a server-side image map.
This attribute is allowed for: - Img
func Kbd ¶
func Kbd(attrs ...types.Attribute) types.ElementFactory
The Kbd tag is used to define keyboard input. The content inside is displayed in the browser's default monospace font.
func Kind ¶
The Kind attribute specifies the kind of text track.
This attribute is allowed for: - Track
func Label ¶
func Label(attrs ...types.Attribute) types.ElementFactory
The Label tag defines a label for several elements: - Input - Meter - Progress - Select - Textarea
func LabelAttr ¶
The LabelAttr attribute specifies a label for an OptGroup, Option or Track.
This attribute is allowed for: - OptGroup - Option - Track
func Lang ¶
The Lang attribute specifies the language of the Element's content.
This is a global types.Attribute.
func Legend ¶
func Legend(attrs ...types.Attribute) types.ElementFactory
The Legend tag defines a caption for the FieldSet element.
func Link ¶
The Link tag defines the relationship between the current document and an external resource.
func List ¶
The List attribute refers to a DataList element that contains pre-defined options for an Input element
This attribute is allowed for: - Input
func Loading ¶
The Loading attribute specifies whether a browser should load an Element immediately or to defer loading of iframes until some conditions are met.
This attribute is allowed for: - IFrame - Img
func LongDesc ¶
The LongDesc attribute specifies a URL to a detailed description of an image.
This attribute is allowed for: - Img
func Loop ¶
The Loop flag specifies that the audio or video will start over again, every time it is finished.
This attribute is allowed for: - Audio - Video
func Low ¶
The Low attribute specifies the range that is considered to be a low value.
This attribute is allowed for: - Meter
func Main ¶
func Main(attrs ...types.Attribute) types.ElementFactory
The Main tag specifies the main content of a document.
func Map ¶
func Map(attrs ...types.Attribute) types.ElementFactory
The Map tag is used to define an image map. An image map is an image with clickable areas.
func Mark ¶
func Mark(attrs ...types.Attribute) types.ElementFactory
The Mark tag defines text that should be marked or highlighted.
func Max ¶
func Max[T MinMaxType](max T) types.Attribute
The Max attribute specifies the maximum value for an Input or Meter element.
This attribute is allowed for: - Input - Meter - Progress
func MaxLength ¶
The MaxLength attribute specifies the maximum number of characters allowed in an Input element.
This attribute is allowed for: - Input - TextArea
func Media ¶
The Media attribute specifies what media/device the linked document is optimized for.
This attribute is allowed for: - A - Area - Link - Source - Style
func Meta ¶
The Meta tag defines metadata about an HTML document. Metadata is data (information) about data.
func Meter ¶
func Meter(attrs ...types.Attribute) types.ElementFactory
The Meter tag defines a scalar measurement within a known range, or a fractional value. This is also known as a gauge.
func Method ¶
The Method attribute specifies the HTTP method to use when sending form-data.
This attribute is allowed for: - Form
func Min ¶
func Min[T MinMaxType](min T) types.Attribute
The Min attribute specifies a minimum value for an Input or Meter element
This attribute is allowed for: - Input - Meter
func MinLength ¶
The MinLength attribute specifies the minimum number of characters required in an Input element.
This attribute is allowed for: - Input
func Multiple ¶
The Multiple flag specifies that a user can enter more than one value in an Input element.
This attribute is allowed for: - Input - Select
func Muted ¶
The Muted flag specifies that the audio output should be muted.
This flag is allowed for: - Audio - Video
func Name ¶
The Name attribute specifies a name for an Element.
This flag is allowed for: - Button - FieldSet - Form - IFrame - Input - Map - Meta - Object - Output - Param - Select - TextArea
func Nav ¶
func Nav(attrs ...types.Attribute) types.ElementFactory
The Nav tag defines a set of navigation links.
func NoModule ¶
The NoModule attribute specifies that the script should not be executed in browsers supporting ES2015 modules.
This flag is allowed for: - Script
func NoScript ¶
func NoScript(attrs ...types.Attribute) types.ElementFactory
The NoScript tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn't support script.
func NoValidate ¶
The NoValidate flag specifies that the form should not be validated when submitted.
This attribute is allowed for: - Form
func OL ¶
func OL(attrs ...types.Attribute) types.ElementFactory
The OL tag defines an ordered list. An ordered list can be numerical or alphabetical.
func Object ¶
func Object(attrs ...types.Attribute) types.ElementFactory
The Object tag defines a container for an external resource.
func OnAbort ¶
The OnAbort attribute specifies a script to be run on abort.
This is a global types.Attribute.
func OnAfterPrint ¶
The OnAfterPrint attribute specifies a script to be run after the document is printed.
This is a global types.Attribute.
func OnBeforePrint ¶
The OnBeforePrint attribute specifies a script to be run before the document is printed.
This is a global types.Attribute.
func OnBeforeUnload ¶
The OnBeforeUnload attribute specifies a script to be run when the document is about to be unloaded.
This is a global types.Attribute.
func OnBlur ¶
The OnBlur attribute specifies a script to be run the moment that the Element loses focus.
This is a global types.Attribute.
func OnCanPlay ¶
The OnCanPlay attribute specifies a script to be run when a file is ready to start playing.
This is a global types.Attribute.
func OnCanPlayThrough ¶
The OnCanPlayThrough attribute specifies a script to be run when a file can be played all the way to the end without pausing for buffering.
This is a global types.Attribute.
func OnChange ¶
The OnChange attribute specifies a script to be run the moment when the value of the Element is changed.
This is a global types.Attribute.
func OnClick ¶
The OnClick attribute specifies a script to be run on a mouse click on the Element.
This is a global types.Attribute.
func OnContextMenu ¶
The OnContextMenu attribute specifies a script to be run when a context menu is triggered.
This is a global types.Attribute.
func OnCopy ¶
The OnCopy attribute specifies a script to be run when the user copies the content of an element.
This is a global types.Attribute.
func OnCueChange ¶
The OnCueChange attribute specifies a script to be run when the cue changes in a Track element.
This is a global types.Attribute.
func OnCut ¶
The OnCut attribute specifies a script to be run when the user cuts the content of an element.
This is a global types.Attribute.
func OnDoubleClick ¶
The OnDoubleClick attribute specifies a script to be run on a mouse double-click on the Element.
This is a global types.Attribute.
func OnDrag ¶
The OnDrag attribute specifies a script to be run when an element is dragged.
This is a global types.Attribute.
func OnDragEnd ¶
The OnDragEnd attribute specifies a script to be run at the end of a drag operation.
This is a global types.Attribute.
func OnDragEnter ¶
The OnDragEnter attribute specifies a script to be run when an element has been dragged to a valid drop target.
This is a global types.Attribute.
func OnDragLeave ¶
The OnDragLeave attribute specifies a script to be run when an element leaves a valid drop target.
This is a global types.Attribute.
func OnDragOver ¶
The OnDragOver attribute specifies a script to be run when an element is being dragged over a valid drop target.
This is a global types.Attribute.
func OnDragStart ¶
The OnDragStart attribute specifies a script to be run at the start of a drag operation.
This is a global types.Attribute.
func OnDrop ¶
The OnDrop attribute specifies a script to be run when dragged element is being dropped.
This is a global types.Attribute.
func OnDurationChange ¶
The OnDurationChange attribute specifies a script to be run when the length of the media changes.
This is a global types.Attribute.
func OnEmptied ¶
The OnEmptied attribute specifies a script to be run when something bad happens and the file is suddenly unavailable.
This is a global types.Attribute.
func OnEnded ¶
The OnEnded attribute specifies a script to be run when the media has reach the end.
This is a global types.Attribute.
func OnError ¶
The OnError attribute specifies a script to be run when an error occurs.
This is a global types.Attribute.
func OnFocus ¶
The OnFocus attribute specifies a script to be run the moment when the Element gets focus.
This is a global types.Attribute.
func OnHashChange ¶
The OnHashChange attribute specifies a script to be run when there has been changes to the anchor part of the URL.
This is a global types.Attribute.
func OnInput ¶
The OnInput attribute specifies a script to be run when an Element gets user input.
This is a global types.Attribute.
func OnInvalid ¶
The OnInvalid attribute specifies a script to be run when an Element is invalid.
This is a global types.Attribute.
func OnKeyDown ¶
The OnKeyDown attribute specifies a script to be run when a user is pressing a key.
This is a global types.Attribute.
func OnKeyPress ¶
The OnKeyPress attribute specifies a script to be run when a user presses a key.
This is a global types.Attribute.
func OnKeyUp ¶
The OnKeyUp attribute specifies a script to be run when a user releases a key.
This is a global types.Attribute.
func OnLoad ¶
The OnLoad attribute specifies a script to be run after the page is finished loading.
This is a global types.Attribute.
func OnLoadStart ¶
The OnLoadStart attribute specifies a script to be run just as the file begins to load before anything is actually loaded.
This is a global types.Attribute.
func OnLoadedData ¶
The OnLoadedData attribute specifies a script to be run when media data is loaded.
This is a global types.Attribute.
func OnLoadedMetaData ¶
The OnLoadedMetaData attribute specifies a script to be run when meta data (like dimensions and duration) are loaded.
This is a global types.Attribute.
func OnMessage ¶
The OnMessage attribute specifies a script to be run when the message is triggered.
This is a global types.Attribute.
func OnMouseDown ¶
The OnMouseDown attribute specifies a script to be run when a mouse button is pressed down on an element.
This is a global types.Attribute.
func OnMouseMove ¶
The OnMouseMove attribute specifies a script to be run when the mouse pointer is moving while it is over an element.
This is a global types.Attribute.
func OnMouseOut ¶
The OnMouseOut attribute specifies a script to be run when the mouse pointer moves out of an element.
This is a global types.Attribute.
func OnMouseOver ¶
The OnMouseOver attribute specifies a script to be run when the mouse pointer moves over an element.
This is a global types.Attribute.
func OnMouseUp ¶
The OnMouseUp attribute specifies a script to be run when a mouse button is released over an element.
This is a global types.Attribute.
func OnOffline ¶
The OnOffline attribute specifies a script to be run when the browser starts to work offline.
This is a global types.Attribute.
func OnOnline ¶
The OnOnline attribute specifies a script to be run when the browser starts to work online.
This is a global types.Attribute.
func OnPageHide ¶
The OnPageHide attribute specifies a script to be run when a user navigates away from a page.
This is a global types.Attribute.
func OnPageShow ¶
The OnPageShow attribute specifies a script to be run when a user navigates to a page.
This is a global types.Attribute.
func OnPaste ¶
The OnPaste attribute specifies a script to be run when the user pastes some content in an element.
This is a global types.Attribute.
func OnPause ¶
The OnPause attribute specifies a script to be run when the media is paused either by the user or programmatically.
This is a global types.Attribute.
func OnPlay ¶
The OnPlay attribute specifies a script to be run when the media is ready to start playing.
This is a global types.Attribute.
func OnPlaying ¶
The OnPlaying attribute specifies a script to be run when the media actually has started playing.
This is a global types.Attribute.
func OnPopState ¶
The OnPopState attribute specifies a script to be run when the window's history changes.
This is a global types.Attribute.
func OnProgress ¶
The OnProgress attribute specifies a script to be run when the browser is in the process of getting the media data.
This is a global types.Attribute.
func OnRateChange ¶
The OnRateChange attribute specifies a script to be run each time the playback rate changes.
This is a global types.Attribute.
func OnReset ¶
The OnReset attribute specifies a script to be run when the Reset Button in a form is clicked.
This is a global types.Attribute.
func OnResize ¶
The OnResize attribute specifies a script to be run when the browser window is resized.
This is a global types.Attribute.
func OnScroll ¶
The OnScroll attribute specifies a script to be run when an element's scrollbar is being scrolled.
This is a global types.Attribute.
func OnSearch ¶
The OnSearch attribute specifies a script to be run when the user writes something in a search field.
This is a global types.Attribute.
func OnSeeked ¶
The OnSeeked attribute specifies a script to be run when the seeking attribute is set to false indicating that seeking has ended.
This is a global types.Attribute.
func OnSeeking ¶
The OnSeeking attribute specifies a script to be run when the seeking attribute is set to true indicating that seeking is active.
This is a global types.Attribute.
func OnSelect ¶
The OnSelect attribute specifies a script to be run after some text has been selected in an Element.
This is a global types.Attribute.
func OnStalled ¶
The OnStalled attribute specifies a script to be run when the browser is unable to fetch the media data for whatever reason.
This is a global types.Attribute.
func OnStorage ¶
The OnStorage attribute specifies a script to be run when a Web Storage area is updated.
This is a global types.Attribute.
func OnSubmit ¶
The OnSubmit attribute specifies a script to be run when a Form is submitted.s
This flag is allowed for: - Form
func OnSuspend ¶
The OnSuspend attribute specifies a script to be run when fetching the media data is stopped before it is completely loaded for whatever reason.
This is a global types.Attribute.
func OnTimeUpdate ¶
The OnTimeUpdate attribute specifies a script to be run when the playing position has changed.
This is a global types.Attribute.
func OnToggle ¶
The OnToggle attribute specifies a script to be run when the user opens or closes the Details element.
This is a global types.Attribute.
func OnUnload ¶
The OnUnload attribute specifies a script to be run once the page has unloaded (or the browser window has been closed).
This is a global types.Attribute.
func OnVolumeChange ¶
The OnVolumeChange attribute specifies a script to be run each time the volume is changed which.
This is a global types.Attribute.
func OnWaiting ¶
The OnWaiting attribute specifies a script to be run when the media has paused but is expected to resume.
This is a global types.Attribute.
func OnWheel ¶
The OnWheel attribute specifies a script to be run when the mouse wheel rolls up or down over an element.
This is a global types.Attribute.
func Open ¶
The Open flag specifies that an Element should be visible (open) to the user.
This flag is allowed for: - Details - Dialog
func OptGroup ¶
func OptGroup(attrs ...types.Attribute) types.ElementFactory
The OptGroup tag is used to group related options in a Select element (drop-down list).
func Optimum ¶
The Optimum attribute specifies what value is the optimal value for the gauge.
This attribute is allowed for: - Meter
func Option ¶
func Option(attrs ...types.Attribute) types.ElementFactory
The Option tag defines an option in a Select list.
func Output ¶
func Output(attrs ...types.Attribute) types.ElementFactory
The Output tag is used to represent the result of a calculation (like one performed by a script).
func Pattern ¶
The Pattern specifies a JavaScript regular expression that an Input element's value is checked against.
This attribute is allowed for: - Input
func Picture ¶
func Picture(attrs ...types.Attribute) types.ElementFactory
The Picture tag gives web developers more flexibility in specifying image resources.
func Ping ¶
The Ping attribute specifies a list of URLs to which, when the link is followed, post requests with the body ping will be sent by the browser.
This attribute is allowed for: - A
func Placeholder ¶
The Placeholder attribute specifies a short hint that describes the expected value of an Input element.
This attribute is allowed for: - Input - TextArea
func Poster ¶
The Poster attribute specifies an image to be shown while the Video is downloading, or until the user hits the play button.
This attribute is allowed for: - Video
func Pre ¶
func Pre(attrs ...types.Attribute) types.ElementFactory
The Pre tag defines preformatted text.
func Preload ¶
The Preload attribute specifies if and how the author thinks the audio or video should be loaded when the page loads.
This attribute is allowed for: - Audio - Video
func Progress ¶
func Progress(attrs ...types.Attribute) types.ElementFactory
The Progress tag represents the completion progress of a task.
func RP ¶
func RP(attrs ...types.Attribute) types.ElementFactory
The RP tag can be used to provide parentheses around a ruby text, to be shown by browsers that do not support ruby annotations.
func RT ¶
func RT(attrs ...types.Attribute) types.ElementFactory
The RT tag defines an explanation or pronunciation of characters (for East Asian typography) in a ruby annotation.
func ReadOnly ¶
The ReadOnly flag specifies that an Input field is read-only
This flag is allowed for: - Input - TextArea
func ReferrerPolicy ¶
The ReferrerPolicy attribute specifies which referrer information to send with the link, IFrame or Img.
This attribute is allowed for: - A - Area - IFrame - Img - Link - Script
func Rel ¶
The Rel attribute specifies the relationship between the current document and the linked document.
This attribute is allowed for: - A - Area - Form - Link
func Required ¶
The Required flag specifies that an Input field must be filled out before submitting the form.
This flag is allowed for: - Input - Select - TextArea
func Reversed ¶
The Reversed flag specifies that the list order should be reversed (9,8,7...)
This flag is allowed for: - OL
func RowSpan ¶
The RowSpan attribute sets the number of rows a cell should span.
This attribute is allowed for: - TD - TH
func Rows ¶
The Rows attribute sets the visible number of lines in a TextArea.
This attribute is allowed for: - TextArea
func Ruby ¶
func Ruby(attrs ...types.Attribute) types.ElementFactory
The Ruby tag specifies a ruby annotation.
func S ¶
func S(attrs ...types.Attribute) types.ElementFactory
The S tag specifies text that is no longer correct, accurate or relevant. The text will be displayed with a line through it.
func SVG ¶
func SVG(attrs ...types.Attribute) types.ElementFactory
The SVG tag defines a container for svg graphics.
func Samp ¶
func Samp(attrs ...types.Attribute) types.ElementFactory
The Samp tag is used to define sample output from a computer program. The content inside is displayed in the browser's default monospace font.
func Sandbox ¶
The Sandbox attribute enables an extra set of restrictions for the content in an IFrame.
This attribute is allowed for: - IFrame
func Scope ¶
The Scope attribute specifies whether a header cell is a header for a column, row, or group of columns or rows.
This attribute is allowed for: - TH
func Script ¶
func Script(attrs ...types.Attribute) types.ElementFactory
The Script tag is used to embed a client-side script (JavaScript).
func Section ¶
func Section(attrs ...types.Attribute) types.ElementFactory
The Section tag defines a section in a document.
func Select ¶
func Select(attrs ...types.Attribute) types.ElementFactory
The Select element is used to create a drop-down list.
func Selected ¶
The Selected flag specifies that an Option should be pre-selected when the page loads
This attribute is allowed for: - Option
func Shape ¶
The Shape attribute specifies the shape of the area.
This attribute is allowed for: - Area
func Size ¶
The Size attribute specifies the width, in characters, of an Input element or the number of visible options in the Select list
This attribute is allowed for: - Input - Select
func Sizes ¶
The Sizes attribute specifies image sizes for different page layouts.
This attribute is allowed for: - Img - Link - Source
func Small ¶
func Small(attrs ...types.Attribute) types.ElementFactory
The Small tag defines smaller text (like copyright and other side-comments).
func Source ¶
The Source tag is used to specify multiple media resources for media elements, such as Video, Audio, and Picture.
func Span ¶
func Span(attrs ...types.Attribute) types.ElementFactory
The Span tag is an inline container used to mark up a part of a text, or a part of a document.
func SpanAttr ¶
The SpanAttr attribute specifies the number of columns a Col or ColGroup should span
This attribute is allowed for: - Col - ColGroup
Note: This attribute will render to `span="<columns>"`
func Spellcheck ¶
The Spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not
This is a global types.Attribute.
func Src ¶
The Src attribute specifies the URL of external content for an Element.
This attribute is allowed for: - Audio - Embed - IFrame - Img - Input - Script - Source - Track - Video
func SrcDoc ¶
The SrcDoc attribute specifies the HTML content of the page to show in the IFrame
This attribute is allowed for: - IFrame
func SrcLang ¶
The SrcLang attribute specifies the language of the track text data.
This attribute is allowed for: - Track
func SrcSet ¶
The SrcSet attribute specifies a list of image files to use in different situations.
This attribute is allowed for: - Img - Source
func Start ¶
The Start attribute specifies the start value of an ordered list.
This attribute is allowed for: - OL
func Step ¶
func Step[T NumOrString](step T) types.Attribute
The Step attribute specifies the interval between legal numbers in an Input field.
This attribute is allowed for: - Input
func Strong ¶
func Strong(attrs ...types.Attribute) types.ElementFactory
The Strong tag is used to define text with strong importance. The content inside is typically displayed in bold.
func Style ¶
func Style(attrs ...types.Attribute) types.ElementFactory
The Style tag is used to define style information (CSS) for a document.
func StyleAttr ¶
The StyleAttr attribute specifies an inline CSS style for an Element.
This is a global types.Attribute.
func Sub ¶
func Sub(attrs ...types.Attribute) types.ElementFactory
The Sub tag defines subscript text.
func Summary ¶
func Summary(attrs ...types.Attribute) types.ElementFactory
The Summary tag defines a visible heading for the Details element. The heading can be clicked to view/hide the details.
func Sup ¶
func Sup(attrs ...types.Attribute) types.ElementFactory
The Sup tag defines superscript text.
func TBody ¶
func TBody(attrs ...types.Attribute) types.ElementFactory
The TBody tag is used to group the body content in an HTML Table.
func TD ¶
func TD(attrs ...types.Attribute) types.ElementFactory
The TD tag defines a standard data cell in an HTML Table.
func TFoot ¶
func TFoot(attrs ...types.Attribute) types.ElementFactory
The TFoot tag is used to group footer content in an HTML Table.
func TH ¶
func TH(attrs ...types.Attribute) types.ElementFactory
The TH tag defines a header cell in an HTML Table.
func THead ¶
func THead(attrs ...types.Attribute) types.ElementFactory
The THead tag is used to group header content in an HTML Table.
func TR ¶
func TR(attrs ...types.Attribute) types.ElementFactory
The TR tag defines a row in an HTML Table.
func TabIndex ¶
The TabIndex attribute specifies the tabbing order of an Element.
This is a global types.Attribute.
func Table ¶
func Table(attrs ...types.Attribute) types.ElementFactory
The Table tag defines an HTML table.
func Target ¶
The Target attribute specifies where to open the linked document.
This attribute is allowed for: - A - Area - Base - Form
func Template ¶
func Template(attrs ...types.Attribute) types.ElementFactory
The Template tag is used as a container to hold some HTML content hidden from the user when the page loads.
func TextArea ¶
func TextArea(attrs ...types.Attribute) types.ElementFactory
The TextArea tag defines a multi-line text input control.
func Time ¶
func Time(attrs ...types.Attribute) types.ElementFactory
The Time tag defines a specific time (or datetime).
func Title ¶
func Title(attrs ...types.Attribute) types.ElementFactory
The Title tag defines the title of the document.
func TitleAttr ¶
The TitleAttr attribute specifies extra information about an element.
This is a global types.Attribute.
func Translate ¶
The Translate attribute specifies extra information about an element.
This is a global types.Attribute.
func Type ¶
The Type attribute specifies the media type of the linked document, or the type of an Element.
This attribute is allowed for: - A - Area - Button - Embed - Input - Link - Object - OL - Script - Source - Style
func TypeMustMatch ¶
The TypeMustMatch attribute specifies whether the type attribute and the actual content of the resource must match to be displayed.
This attribute is allowed for: - Object
func U ¶
func U(attrs ...types.Attribute) types.ElementFactory
The U tag represents some text that is unarticulated and styled differently from normal text.
func UL ¶
func UL(attrs ...types.Attribute) types.ElementFactory
The UL tag defines an unordered (bulleted) list.
func UseMap ¶
The UseMap attribute specifies an image as a client-side image map.
This attribute is allowed for: - Img - Object
func Value ¶
func Value[T NumOrString](value T) types.Attribute
The Value attribute specifies an initial value for the Element or the machine-readable translation of the content of a Data element.
This attribute is allowed for: - Button - Data - Input - Li - Meter - Option - Param - Progress
func Var ¶
func Var(attrs ...types.Attribute) types.ElementFactory
The Var tag is used to defines a variable in programming or in a mathematical expression.
func Video ¶
func Video(attrs ...types.Attribute) types.ElementFactory
The Video tag is used to embed video content in a document, such as a movie clip or other video streams.
func WBr ¶
The WBr (Word Break Opportunity) tag specifies where in a text it would be ok to add a line-break.
func Width ¶
The Width attribute specifies the width of an Element.
This attribute is allowed for: - Canvas - Embed - IFrame - Img - Input - Object - Video
Types ¶
type MinMaxType ¶
Directories
¶
Path | Synopsis |
---|---|
Package helpers provides utility functions and types to simplify and enhance the creation and manipulation of godom elements and attributes.
|
Package helpers provides utility functions and types to simplify and enhance the creation and manipulation of godom elements and attributes. |
Package template provides a high-level wrapper around the standard html/template package, enabling seamless integration with the godom library.
|
Package template provides a high-level wrapper around the standard html/template package, enabling seamless integration with the godom library. |
Package util provides utility functions for godom package, enhancing the flexibility and ease of use in creating and manipulating the DOM.
|
Package util provides utility functions for godom package, enhancing the flexibility and ease of use in creating and manipulating the DOM. |