Documentation
¶
Index ¶
- Constants
- func IfElse[T any](condition bool, result, alternative T) T
- func Render(w io.Writer, node HyperNode) error
- type Element
- type HyperNode
- func A(args ...any) HyperNode
- func Abbr(args ...any) HyperNode
- func Address(args ...any) HyperNode
- func Area(attrs ...KV) HyperNode
- func Article(args ...any) HyperNode
- func Aside(args ...any) HyperNode
- func Audio(args ...any) HyperNode
- func B(args ...any) HyperNode
- func Base(attrs ...KV) HyperNode
- func Bdi(args ...any) HyperNode
- func Bdo(args ...any) HyperNode
- func Blockquote(args ...any) HyperNode
- func Body(args ...any) HyperNode
- func Br(attrs ...KV) HyperNode
- func Button(args ...any) HyperNode
- func Canvas(args ...any) HyperNode
- func Caption(args ...any) HyperNode
- func Cite(args ...any) HyperNode
- func Code(args ...any) HyperNode
- func Col(attrs ...KV) HyperNode
- func Colgroup(args ...any) HyperNode
- func Data(args ...any) HyperNode
- func Datalist(args ...any) HyperNode
- func Dd(args ...any) HyperNode
- func Del(args ...any) HyperNode
- func Details(args ...any) HyperNode
- func Dfn(args ...any) HyperNode
- func Dialog(args ...any) HyperNode
- func Div(args ...any) HyperNode
- func Dl(args ...any) HyperNode
- func DoctypeHtml() HyperNode
- func Dt(args ...any) HyperNode
- func Em(args ...any) HyperNode
- func Embed(attrs ...KV) HyperNode
- func Empty(args ...any) HyperNode
- func Fencedframe(args ...any) HyperNode
- func Fieldset(args ...any) HyperNode
- func Figcaption(args ...any) HyperNode
- func Figure(args ...any) HyperNode
- func Footer(args ...any) HyperNode
- func Form(args ...any) HyperNode
- func H1(args ...any) HyperNode
- func H2(args ...any) HyperNode
- func H3(args ...any) HyperNode
- func H4(args ...any) HyperNode
- func H5(args ...any) HyperNode
- func H6(args ...any) HyperNode
- func Head(args ...any) HyperNode
- func Header(args ...any) HyperNode
- func Hgroup(args ...any) HyperNode
- func Hr(attrs ...KV) HyperNode
- func Html(args ...any) HyperNode
- func I(args ...any) HyperNode
- func If(condition bool, result HyperNode) HyperNode
- func Iframe(args ...any) HyperNode
- func Img(attrs ...KV) HyperNode
- func Input(attrs ...KV) HyperNode
- func Ins(args ...any) HyperNode
- func Kbd(args ...any) HyperNode
- func Label(args ...any) HyperNode
- func Legend(args ...any) HyperNode
- func Li(args ...any) HyperNode
- func Link(attrs ...KV) HyperNode
- func Main(args ...any) HyperNode
- func Map(args ...any) HyperNode
- func MapSlice[T any](input []T, f func(T) HyperNode) HyperNode
- func Mark(args ...any) HyperNode
- func Math(args ...any) HyperNode
- func Menu(args ...any) HyperNode
- func Meta(attrs ...KV) HyperNode
- func Meter(args ...any) HyperNode
- func Nav(args ...any) HyperNode
- func Noscript(args ...any) HyperNode
- func Object(args ...any) HyperNode
- func Ol(args ...any) HyperNode
- func Optgroup(args ...any) HyperNode
- func Option(args ...any) HyperNode
- func Output(args ...any) HyperNode
- func P(args ...any) HyperNode
- func Picture(args ...any) HyperNode
- func Pre(args ...any) HyperNode
- func Progress(args ...any) HyperNode
- func Q(args ...any) HyperNode
- func Repeat(n int, f func() HyperNode) HyperNode
- func Rp(args ...any) HyperNode
- func Rt(args ...any) HyperNode
- func Ruby(args ...any) HyperNode
- func S(args ...any) HyperNode
- func Samp(args ...any) HyperNode
- func Script(args ...any) HyperNode
- func Search(args ...any) HyperNode
- func Section(args ...any) HyperNode
- func Select(args ...any) HyperNode
- func Selectedcontent(args ...any) HyperNode
- func Slot(args ...any) HyperNode
- func Small(args ...any) HyperNode
- func Source(attrs ...KV) HyperNode
- func Span(args ...any) HyperNode
- func Strong(args ...any) HyperNode
- func Style(args ...any) HyperNode
- func Sub(args ...any) HyperNode
- func Summary(args ...any) HyperNode
- func Sup(args ...any) HyperNode
- func Svg(args ...any) HyperNode
- func Table(args ...any) HyperNode
- func Tbody(args ...any) HyperNode
- func Td(args ...any) HyperNode
- func Template(args ...any) HyperNode
- func Textarea(args ...any) HyperNode
- func Tfoot(args ...any) HyperNode
- func Th(args ...any) HyperNode
- func Thead(args ...any) HyperNode
- func Time(args ...any) HyperNode
- func Title(args ...any) HyperNode
- func Tr(args ...any) HyperNode
- func Track(attrs ...KV) HyperNode
- func U(args ...any) HyperNode
- func Ul(args ...any) HyperNode
- func Var(args ...any) HyperNode
- func Video(args ...any) HyperNode
- func Wbr(attrs ...KV) HyperNode
- type KV
- type RawText
- type Text
Constants ¶
const ( // AttrAccept sets the accepted file types for <input type="file">. AttrAccept = "accept" // AttrAcceptCharset sets the character encodings accepted by the server. AttrAcceptCharset = "accept-charset" // AttrAccessKey gives keyboard shortcut access to an element. AttrAccessKey = "accesskey" // AttrAction specifies where to send the form data. AttrAction = "action" // AttrAlign specifies the alignment of an element. AttrAlign = "align" // AttrAllow specifies permissions for an iframe. AttrAllow = "allow" // AttrAlpha sets the alpha transparency level of an element. AttrAlpha = "alpha" // AttrAlt provides alternative text for an image. AttrAlt = "alt" // AttrAs specifies the relation between the linked resource and the document. AttrAs = "as" // AttrAsync indicates that the script should execute asynchronously. AttrAsync = "async" // AttrAutocapitalize controls whether text input is automatically capitalized. AttrAutocapitalize = "autocapitalize" // AttrAutocomplete specifies whether an input field should have autocomplete enabled. AttrAutocomplete = "autocomplete" // AttrAutofocus specifies that an element should automatically get focus on page load. AttrAutofocus = "autofocus" // AttrAutoplay specifies that the audio/video should automatically start playing. AttrAutoplay = "autoplay" // AttrBackground specifies the background image URL. AttrBackground = "background" // AttrBgColor specifies the background color of an element. AttrBgColor = "bgcolor" // AttrBorder specifies the border width around an element. AttrBorder = "border" // AttrCapture specifies which camera/mic to use for media capture. AttrCapture = "capture" // AttrCharset specifies the character encoding of the document. AttrCharset = "charset" // AttrChecked specifies whether an input checkbox or radio is checked. AttrChecked = "checked" // AttrCite specifies the source of a quotation. AttrCite = "cite" // AttrClass specifies one or more class names for an element. AttrClass = "class" // AttrColor specifies the text color of an element. AttrColor = "color" // AttrColorSpace specifies the color space for an image. AttrColorSpace = "colorspace" // AttrCols specifies the number of columns in a textarea. AttrCols = "cols" // AttrColSpan specifies the number of columns a table cell should span. AttrColSpan = "colspan" // AttrContent provides metadata about the element. AttrContent = "content" // AttrContentEditable specifies whether the element is editable. AttrContentEditable = "contenteditable" // AttrControls shows the audio/video controls. AttrControls = "controls" // AttrCoords specifies the coordinates of an area in an image map. AttrCoords = "coords" // AttrCrossOrigin specifies how the element handles cross-origin requests. AttrCrossOrigin = "crossorigin" // AttrCsp specifies the Content Security Policy for an element. AttrCsp = "csp" // AttrData specifies the URL of the data for an object element. AttrData = "data" // AttrDateTime specifies the date and time for an element. AttrDateTime = "datetime" // AttrDecoding specifies how to decode an image. AttrDecoding = "decoding" // AttrDefault specifies that a track should be enabled by default. AttrDefault = "default" // AttrDefer indicates that the script should be executed after the document is parsed. AttrDefer = "defer" // AttrDir specifies the text direction of an element. AttrDir = "dir" // AttrDirName specifies the name of the form field used for sending the directionality of the element. AttrDirName = "dirname" // AttrDisabled specifies that an element should be disabled. AttrDisabled = "disabled" // AttrDownload specifies that the target should be downloaded when clicked. AttrDownload = "download" // AttrDraggable specifies whether an element is draggable. AttrDraggable = "draggable" // AttrEnctype specifies how form data should be encoded before sending to a server. AttrEnctype = "enctype" // AttrEnterKeyHint specifies what action label to show on the enter key. AttrEnterKeyHint = "enterkeyhint" // AttrElementTiming specifies that an element should be observed for performance. AttrElementTiming = "elementtiming" // AttrForm specifies the id of a form element that the element belongs to. AttrForm = "form" // AttrFormAction specifies where to send the form data. AttrFormAction = "formaction" // AttrFormEnctype specifies how form data should be encoded. AttrFormEnctype = "formenctype" // AttrFormMethod specifies the HTTP method for form submission. AttrFormMethod = "formmethod" // AttrFormNoValidate specifies that the form should not be validated. AttrFormNoValidate = "formnovalidate" // AttrFormTarget specifies where to display the response after form submission. AttrFormTarget = "formtarget" // AttrFetchPriority indicates the priority of fetching an external resource. AttrFetchPriority = "fetchpriority" // AttrHeaders specifies the header cells that a table cell relates to. AttrHeaders = "headers" // AttrHeight specifies the height of an element. AttrHeight = "height" // AttrHidden specifies that an element is not yet or is no longer relevant. AttrHidden = "hidden" // AttrHigh specifies the lower bound of a range. AttrHigh = "high" // AttrHref specifies the URL of a link. AttrHref = "href" // AttrHrefLang specifies the language of the linked resource. AttrHrefLang = "hreflang" // AttrHttpEquiv provides an HTTP header for the information in the content attribute. AttrHttpEquiv = "http-equiv" // AttrId specifies a unique id for an element. AttrId = "id" // AttrIntegrity specifies a hash of the resource to verify its integrity. AttrIntegrity = "integrity" // AttrInputMode provides a hint to browsers about the type of data the user should enter. AttrInputMode = "inputmode" // AttrIsMap specifies that an image is part of a server-side image map. AttrIsMap = "ismap" // AttrItemProp specifies the property of an item. AttrItemProp = "itemprop" // AttrKind specifies the kind of text track. AttrKind = "kind" // AttrLabel specifies the label of an option or track. AttrLabel = "label" // AttrLang specifies the language of the element. AttrLang = "lang" // AttrLanguage specifies the scripting language of an element. AttrLanguage = "language" // AttrLoading specifies whether to load an image lazily. AttrLoading = "loading" // AttrList refers to a datalist containing predefined options. AttrList = "list" // AttrLoop specifies whether to loop an audio/video. AttrLoop = "loop" // AttrLow specifies the upper bound of a range. AttrLow = "low" // AttrMax specifies the maximum value. AttrMax = "max" // AttrMaxLength specifies the maximum number of characters allowed. AttrMaxLength = "maxlength" // AttrMinLength specifies the minimum number of characters required. AttrMinLength = "minlength" // AttrMedia specifies the media type or device the resource applies to. AttrMedia = "media" // AttrMethod specifies the HTTP method for form submission. AttrMethod = "method" // AttrMin specifies the minimum value. AttrMin = "min" // AttrMultiple specifies that a user can enter more than one value. AttrMultiple = "multiple" // AttrMuted specifies that the audio should be muted. AttrMuted = "muted" // AttrName specifies the name of an element. AttrName = "name" // AttrNoValidate specifies that the form should not be validated. AttrNoValidate = "novalidate" // AttrOnAbort specifies the event handler for the abort event. AttrOnAbort = "onAbort" // AttrOnActivate specifies the event handler for the activate event. AttrOnActivate = "onActivate" // AttrOnAfterPrint specifies the event handler for the afterprint event. AttrOnAfterPrint = "onAfterPrint" // AttrOnAfterUpdate specifies the event handler for the afterupdate event. AttrOnAfterUpdate = "onAfterUpdate" // AttrOnBeforeActivate specifies the event handler for the beforeactivate event. AttrOnBeforeActivate = "onBeforeActivate" // AttrOnBeforeCopy specifies the event handler for the beforecopy event. AttrOnBeforeCopy = "onBeforeCopy" // AttrOnBeforeCut specifies the event handler for the beforecut event. AttrOnBeforeCut = "onBeforeCut" // AttrOnBeforeDeactivate specifies the event handler for the beforedeactivate event. AttrOnBeforeDeactivate = "onBeforeDeactivate" // AttrOnBeforeEditFocus specifies the event handler for the beforeeditfocus event. AttrOnBeforeEditFocus = "onBeforeEditFocus" // AttrOnBeforePaste specifies the event handler for the beforepaste event. AttrOnBeforePaste = "onBeforePaste" // AttrOnBeforePrint specifies the event handler for the beforeprint event. AttrOnBeforePrint = "onBeforePrint" // AttrOnBeforeUnload specifies the event handler for the beforeunload event. AttrOnBeforeUnload = "onBeforeUnload" // AttrOnBeforeUpdate specifies the event handler for the beforeupdate event. AttrOnBeforeUpdate = "onBeforeUpdate" // AttrOnBegin specifies the event handler for the begin event. AttrOnBegin = "onBegin" // AttrOnBlur specifies the event handler for the blur event. AttrOnBlur = "onBlur" // AttrOnBounce specifies the event handler for the bounce event. AttrOnBounce = "onBounce" // AttrOnCellChange specifies the event handler for the cellchange event. AttrOnCellChange = "onCellChange" // AttrOnChange specifies the event handler for the change event. AttrOnChange = "onChange" // AttrOnClick specifies the event handler for the click event. AttrOnClick = "onClick" // AttrOnContextMenu specifies the event handler for the contextmenu event. AttrOnContextMenu = "onContextMenu" // AttrOnControlSelect specifies the event handler for the controlselect event. AttrOnControlSelect = "onControlSelect" // AttrOnCopy specifies the event handler for the copy event. AttrOnCopy = "onCopy" // AttrOnCut specifies the event handler for the cut event. AttrOnCut = "onCut" // AttrOnDataAvailable specifies the event handler for the dataavailable event. AttrOnDataAvailable = "onDataAvailable" // AttrOnDataSetChanged specifies the event handler for the datasetchanged event. AttrOnDataSetChanged = "onDataSetChanged" // AttrOnDataSetComplete specifies the event handler for the datasetcomplete event. AttrOnDataSetComplete = "onDataSetComplete" // AttrOnDblClick specifies the event handler for the dblclick event. AttrOnDblClick = "onDblClick" // AttrOnDeactivate specifies the event handler for the deactivate event. AttrOnDeactivate = "onDeactivate" // AttrOnDrag specifies the event handler for the drag event. AttrOnDrag = "onDrag" // AttrOnDragEnd specifies the event handler for the dragend event. AttrOnDragEnd = "onDragEnd" // AttrOnDragLeave specifies the event handler for the dragleave event. AttrOnDragLeave = "onDragLeave" // AttrOnDragEnter specifies the event handler for the dragenter event. AttrOnDragEnter = "onDragEnter" // AttrOnDragOver specifies the event handler for the dragover event. AttrOnDragOver = "onDragOver" // AttrOnDragDrop specifies the event handler for the dragdrop event. AttrOnDragDrop = "onDragDrop" // AttrOnDragStart specifies the event handler for the dragstart event. AttrOnDragStart = "onDragStart" // AttrOnDrop specifies the event handler for the drop event. AttrOnDrop = "onDrop" // AttrOnEnd specifies the event handler for the end event. AttrOnEnd = "onEnd" // AttrOnError specifies the event handler for the error event. AttrOnError = "onError" // AttrOnErrorUpdate specifies the event handler for the errorupdate event. AttrOnErrorUpdate = "onErrorUpdate" // AttrOnFilterChange specifies the event handler for the filterchange event. AttrOnFilterChange = "onFilterChange" // AttrOnFinish specifies the event handler for the finish event. AttrOnFinish = "onFinish" // AttrOnFocus specifies the event handler for the focus event. AttrOnFocus = "onFocus" // AttrOnFocusIn specifies the event handler for the focusin event. AttrOnFocusIn = "onFocusIn" // AttrOnFocusOut specifies the event handler for the focusout event. AttrOnFocusOut = "onFocusOut" // AttrOnHashChange specifies the event handler for the hashchange event. AttrOnHashChange = "onHashChange" // AttrOnHelp specifies the event handler for the help event. AttrOnHelp = "onHelp" // AttrOnInput specifies the event handler for the input event. AttrOnInput = "onInput" // AttrOnKeyDown specifies the event handler for the keydown event. AttrOnKeyDown = "onKeyDown" // AttrOnKeyPress specifies the event handler for the keypress event. AttrOnKeyPress = "onKeyPress" // AttrOnKeyUp specifies the event handler for the keyup event. AttrOnKeyUp = "onKeyUp" // AttrOnLayoutComplete specifies the event handler for the layoutcomplete event. AttrOnLayoutComplete = "onLayoutComplete" // AttrOnLoad specifies the event handler for the load event. AttrOnLoad = "onLoad" // AttrOnLoseCapture specifies the event handler for the losecapture event. AttrOnLoseCapture = "onLoseCapture" // AttrOnMediaComplete specifies the event handler for the mediacomplete event. AttrOnMediaComplete = "onMediaComplete" // AttrOnMediaError specifies the event handler for the mediaerror event. AttrOnMediaError = "onMediaError" // AttrOnMessage specifies the event handler for the message event. AttrOnMessage = "onMessage" // AttrOnMouseDown specifies the event handler for the mousedown event. AttrOnMouseDown = "onMouseDown" // AttrOnMouseEnter specifies the event handler for the mouseenter event. AttrOnMouseEnter = "onMouseEnter" // AttrOnMouseLeave specifies the event handler for the mouseleave event. AttrOnMouseLeave = "onMouseLeave" // AttrOnMouseMove specifies the event handler for the mousemove event. AttrOnMouseMove = "onMouseMove" // AttrOnMouseOut specifies the event handler for the mouseout event. AttrOnMouseOut = "onMouseOut" // AttrOnMouseOver specifies the event handler for the mouseover event. AttrOnMouseOver = "onMouseOver" // AttrOnMouseUp specifies the event handler for the mouseup event. AttrOnMouseUp = "onMouseUp" // AttrOnMouseWheel specifies the event handler for the mousewheel event. AttrOnMouseWheel = "onMouseWheel" // AttrOnMove specifies the event handler for the move event. AttrOnMove = "onMove" // AttrOnMoveEnd specifies the event handler for the moveend event. AttrOnMoveEnd = "onMoveEnd" // AttrOnMoveStart specifies the event handler for the movestart event. AttrOnMoveStart = "onMoveStart" // AttrOnOffline specifies the event handler for the offline event. AttrOnOffline = "onOffline" // AttrOnOnline specifies the event handler for the online event. AttrOnOnline = "onOnline" // AttrOnOutOfSync specifies the event handler for the outofsync event. AttrOnOutOfSync = "onOutOfSync" // AttrOnPaste specifies the event handler for the paste event. AttrOnPaste = "onPaste" // AttrOnPause specifies the event handler for the pause event. AttrOnPause = "onPause" // AttrOnPopState specifies the event handler for the popstate event. AttrOnPopState = "onPopState" // AttrOnProgress specifies the event handler for the progress event. AttrOnProgress = "onProgress" // AttrOnPropertyChange specifies the event handler for the propertychange event. AttrOnPropertyChange = "onPropertyChange" // AttrOnReadyStateChange specifies the event handler for the readystatechange event. AttrOnReadyStateChange = "onReadyStateChange" // AttrOnRedo specifies the event handler for the redo event. AttrOnRedo = "onRedo" // AttrOnRepeat specifies the event handler for the repeat event. AttrOnRepeat = "onRepeat" // AttrOnReset specifies the event handler for the reset event. AttrOnReset = "onReset" // AttrOnResize specifies the event handler for the resize event. AttrOnResize = "onResize" // AttrOnResizeEnd specifies the event handler for the resizeend event. AttrOnResizeEnd = "onResizeEnd" // AttrOnResizeStart specifies the event handler for the resizestart event. AttrOnResizeStart = "onResizeStart" // AttrOnResume specifies the event handler for the resume event. AttrOnResume = "onResume" // AttrOnReverse specifies the event handler for the reverse event. AttrOnReverse = "onReverse" // AttrOnRowsEnter specifies the event handler for the rowsenter event. AttrOnRowsEnter = "onRowsEnter" // AttrOnRowExit specifies the event handler for the rowexit event. AttrOnRowExit = "onRowExit" // AttrOnRowDelete specifies the event handler for the rowdelete event. AttrOnRowDelete = "onRowDelete" // AttrOnRowInserted specifies the event handler for the rowinserted event. AttrOnRowInserted = "onRowInserted" // AttrOnScroll specifies the event handler for the scroll event. AttrOnScroll = "onScroll" // AttrOnSeek specifies the event handler for the seek event. AttrOnSeek = "onSeek" // AttrOnSelect specifies the event handler for the select event. AttrOnSelect = "onSelect" // AttrOnSelectionChange specifies the event handler for the selectionchange event. AttrOnSelectionChange = "onSelectionChange" // AttrOnSelectStart specifies the event handler for the selectstart event. AttrOnSelectStart = "onSelectStart" // AttrOnStart specifies the event handler for the start event. AttrOnStart = "onStart" // AttrOnStop specifies the event handler for the stop event. AttrOnStop = "onStop" // AttrOnStorage specifies the event handler for the storage event. AttrOnStorage = "onStorage" // AttrOnSyncRestored specifies the event handler for the syncrestored event. AttrOnSyncRestored = "onSyncRestored" // AttrOnSubmit specifies the event handler for the submit event. AttrOnSubmit = "onSubmit" // AttrOnTimeError specifies the event handler for the timeerror event. AttrOnTimeError = "onTimeError" // AttrOnTrackChange specifies the event handler for the trackchange event. AttrOnTrackChange = "onTrackChange" // AttrOnUndo specifies the event handler for the undo event. AttrOnUndo = "onUndo" // AttrOnUnload specifies the event handler for the unload event. AttrOnUnload = "onUnload" // AttrOnURLFlip specifies the event handler for the urlflip event. AttrOnURLFlip = "onURLFlip" // AttrOpen specifies whether the element is visible (for details, dialog, etc.). AttrOpen = "open" // AttrOptimum specifies the optimal value in a range. AttrOptimum = "optimum" // AttrPattern specifies a regular expression for input validation. AttrPattern = "pattern" // AttrPing specifies a list of URLs to notify when a link is clicked. AttrPing = "ping" // AttrPlaceholder provides a hint to the user about what to enter. AttrPlaceholder = "placeholder" // AttrPlaysInline specifies that the video should play inline. AttrPlaysInline = "playsinline" // AttrPoster specifies the preview image for a video. AttrPoster = "poster" // AttrPopoverTargetAction specifies the action to perform with a popover element. AttrPopoverTargetAction = "popovertargetaction" // AttrPreload specifies how to preload an audio/video. AttrPreload = "preload" // AttrReadonly specifies that an input field is read-only. AttrReadonly = "readonly" // AttrReferrerPolicy specifies the referrer policy for the resource. AttrReferrerPolicy = "referrerpolicy" // AttrRel specifies the relationship between the current document and the linked resource. AttrRel = "rel" // AttrRequired specifies that an input field must be filled out. AttrRequired = "required" // AttrReversed specifies that the list order should be reversed. AttrReversed = "reversed" // AttrRole specifies the role of an element for accessibility. AttrRole = "role" // AttrRows specifies the number of rows in a textarea. AttrRows = "rows" // AttrRowSpan specifies the number of rows a table cell should span. AttrRowSpan = "rowspan" // AttrSandbox enables extra restrictions for an iframe. AttrSandbox = "sandbox" // AttrScope specifies the header cells that a th element applies to. AttrScope = "scope" // AttrSelected specifies that an option should be pre-selected. AttrSelected = "selected" // AttrShape specifies the shape of an area in an image map. AttrShape = "shape" // AttrSize specifies the size of an input field or select element. AttrSize = "size" // AttrSizes specifies the sizes of an image for different layouts. AttrSizes = "sizes" // AttrSlot assigns a slot to an element in a shadow DOM. AttrSlot = "slot" // AttrSpan specifies the number of columns in a colgroup. AttrSpan = "span" // AttrSpellCheck specifies whether to enable spell checking. AttrSpellCheck = "spellcheck" // AttrSrc specifies the URL of an image, audio, video, or iframe. AttrSrc = "src" // AttrSrcDoc specifies the inline HTML for an iframe. AttrSrcDoc = "srcdoc" // AttrSrcLang specifies the language of the track text. AttrSrcLang = "srclang" // AttrSrcSet specifies multiple image sources for responsive images. AttrSrcSet = "srcset" // AttrStart specifies the starting number of an ordered list. AttrStart = "start" // AttrStep specifies the interval between legal numbers in an input. AttrStep = "step" // AttrStyle specifies inline CSS styles. AttrStyle = "style" // AttrSummary provides a summary for a table. AttrSummary = "summary" // AttrTabIndex specifies the tab order of an element. AttrTabIndex = "tabindex" // AttrTarget specifies where to open a link or form response. AttrTarget = "target" // AttrTitle provides advisory information about an element. AttrTitle = "title" // AttrTranslate specifies whether to translate an element. AttrTranslate = "translate" // AttrType specifies the type of an input element. AttrType = "type" // AttrUseMap specifies that an image is a client-side image map. AttrUseMap = "usemap" // AttrValue specifies the value of an input element. AttrValue = "value" // AttrWidth specifies the width of an element. AttrWidth = "width" // AttrWrap specifies how text should wrap in a textarea. AttrWrap = "wrap" )
const ( // TypeText creates a single-line text input field. TypeText = "text" // TypePassword creates a password input field. TypePassword = "password" // TypeCheckbox creates a checkbox input field. TypeCheckbox = "checkbox" // TypeRadio creates a radio button input field. TypeRadio = "radio" // TypeSubmit creates a submit button. TypeSubmit = "submit" // TypeReset creates a reset button. TypeReset = "reset" // TypeButton creates a generic button. TypeButton = "button" // TypeFile creates a file upload input field. TypeFile = "file" // TypeHidden creates a hidden input field. TypeHidden = "hidden" // TypeImage creates an image submit button. TypeImage = "image" // TypeColor creates a color picker input field. TypeColor = "color" // TypeDate creates a date picker input field. TypeDate = "date" // TypeDateTime creates a date and time picker input field. TypeDateTime = "datetime" // TypeDateTimeLocal creates a local date and time picker input field. TypeDateTimeLocal = "datetime-local" // TypeEmail creates an email input field. TypeEmail = "email" // TypeMonth creates a month picker input field. TypeMonth = "month" // TypeNumber creates a number input field. TypeNumber = "number" // TypeRange creates a range slider input field. TypeRange = "range" // TypeSearch creates a search input field. TypeSearch = "search" // TypeTel creates a telephone number input field. TypeTel = "tel" // TypeTime creates a time picker input field. TypeTime = "time" // TypeUrl creates a URL input field. TypeUrl = "url" // TypeWeek creates a week picker input field. TypeWeek = "week" )
Type* constants are valid values for the type attribute on various elements.
const ( // RelAlternate indicates an alternate version of the current document. RelAlternate = "alternate" // RelAuthor indicates the author of the current document. RelAuthor = "author" // RelBookmark indicates a bookmark for the current document. RelBookmark = "bookmark" // RelCanonical indicates the canonical URL of the current document. RelCanonical = "canonical" // RelCompressionDictionary indicates a compression dictionary resource. RelCompressionDictionary = "compression-dictionary" // RelDnsPrefetch indicates to pre-resolve the DNS of the linked resource. RelDnsPrefetch = "dns-prefetch" // RelExternal indicates the linked resource is not part of the current site. RelExternal = "external" // RelHelp indicates a link to a help resource. RelHelp = "help" // RelIcon indicates the favicon of the current document. RelIcon = "icon" // RelLicense indicates the copyright license for the current document. RelLicense = "license" // RelManifest indicates a Web App Manifest. RelManifest = "manifest" // RelModulePreload indicates to preload a JavaScript module. RelModulePreload = "modulepreload" // RelNext indicates the next document in a sequence. RelNext = "next" // RelNoFollow indicates the link is not endorsed by the author. RelNoFollow = "nofollow" // RelNoOpener prevents the opened page from accessing the source page. RelNoOpener = "noopener" // RelNoReferrer indicates not to send a referrer header. RelNoReferrer = "noreferrer" // RelOpener allows the opened page to access the source page. RelOpener = "opener" // RelPingback indicates the URL of a pingback server. RelPingback = "pingback" // RelPreconnect indicates to pre-connect to the linked resource. RelPreconnect = "preconnect" // RelPrefetch indicates to prefetch the linked resource. RelPrefetch = "prefetch" // RelPreload indicates to preload the linked resource. RelPreload = "preload" // RelPrerender indicates to prerender the linked resource. RelPrerender = "prerender" // RelPrev indicates the previous document in a sequence. RelPrev = "prev" // RelSearch indicates a search resource for the current document. RelSearch = "search" // RelStylesheet indicates a stylesheet for the current document. RelStylesheet = "stylesheet" // RelTag indicates a tag relevant to the current document. RelTag = "tag" )
Rel* constants are valid values for the rel attribute.
const ( // TargetBlank opens the link in a new tab or window. TargetBlank = "_blank" // TargetSelf opens the link in the same frame as clicked. TargetSelf = "_self" // TargetParent opens the link in the parent frame. TargetParent = "_parent" // TargetTop opens the link in the topmost frame. TargetTop = "_top" // TargetFramename opens the link in a named frame. TargetFramename = "framename" )
Target* constants are valid values for the target attribute.
const ( // MethodGet sends form data as URL parameters. MethodGet = "get" // MethodPost sends form data in the request body. MethodPost = "post" )
Method* constants are valid values for the method attribute on <form>.
const ( // EnctypeUrlEncoded encodes form data as URL-encoded string. EnctypeUrlEncoded = "application/x-www-form-urlencoded" // EnctypeMultipartForm encodes form data as multipart/form-data. EnctypeMultipartForm = "multipart/form-data" // EnctypePlainText encodes form data as plain text. EnctypePlainText = "text/plain" )
Enctype* constants are valid values for the enctype attribute on <form>.
const ( // CrossOriginAnonymous allows anonymous cross-origin requests. CrossOriginAnonymous = "anonymous" // CrossOriginUseCredentials requires credentials for cross-origin requests. CrossOriginUseCredentials = "use-credentials" )
CrossOrigin* constants are valid values for the crossorigin attribute.
const ( // DirLtr sets text direction to left-to-right. DirLtr = "ltr" // DirRtl sets text direction to right-to-left. DirRtl = "rtl" // DirAuto sets text direction to automatically detected. DirAuto = "auto" )
Dir* constants are valid values for the dir attribute.
const ( // TranslateYes indicates the element should be translated. TranslateYes = "yes" // TranslateNo indicates the element should not be translated. TranslateNo = "no" )
Translate* constants are valid values for the translate attribute.
const ( // PreloadNone indicates not to preload the media. PreloadNone = "none" // PreloadMetadata indicates to preload only metadata. PreloadMetadata = "metadata" // PreloadAuto indicates to preload the entire media. PreloadAuto = "auto" )
Preload* constants are valid values for the preload attribute on <audio> and <video>.
const ( // LoadingLazy defers loading until the element is near the viewport. LoadingLazy = "lazy" // LoadingEager loads the element immediately. LoadingEager = "eager" )
Loading* constants are valid values for the loading attribute on <img> and <iframe>.
const ( // DecodingAsync decodes the image asynchronously. DecodingAsync = "async" // DecodingSync decodes the image synchronously. DecodingSync = "sync" // DecodingAuto lets the browser decide. DecodingAuto = "auto" )
Decoding* constants are valid values for the decoding attribute on <img>.
const ( // ReferrerPolicyNoReferrer does not send a referrer header. ReferrerPolicyNoReferrer = "no-referrer" // ReferrerPolicyNoReferrerWhenDowngrade sends referrer only for same-origin or secure-to-insecure. ReferrerPolicyNoReferrerWhenDowngrade = "no-referrer-when-downgrade" // ReferrerPolicyOrigin sends only the origin as referrer. ReferrerPolicyOrigin = "origin" // ReferrerPolicyOriginWhenCrossOrigin sends full URL for same-origin, origin for cross-origin. ReferrerPolicyOriginWhenCrossOrigin = "origin-when-cross-origin" // ReferrerPolicySameOrigin sends referrer only for same-origin. ReferrerPolicySameOrigin = "same-origin" // ReferrerPolicyStrictOriginWhenCrossOrigin sends origin for cross-origin when downgrade. ReferrerPolicyStrictOriginWhenCrossOrigin = "strict-origin-when-cross-origin" // ReferrerPolicyUnsafeUrl sends the full URL in all requests. ReferrerPolicyUnsafeUrl = "unsafe-url" )
ReferrerPolicy* constants are valid values for the referrerpolicy attribute.
const ( // FetchPriorityLow indicates low fetch priority. FetchPriorityLow = "low" // FetchPriorityHigh indicates high fetch priority. FetchPriorityHigh = "high" // FetchPriorityAuto lets the browser decide the priority. FetchPriorityAuto = "auto" )
FetchPriority* constants are valid values for the fetchpriority attribute.
const ( // EnterKeyHintEnter indicates the enter key should insert a newline. EnterKeyHintEnter = "enter" // EnterKeyHintDone indicates the enter key should indicate "done". EnterKeyHintDone = "done" // EnterKeyHintGo indicates the enter key should indicate "go". EnterKeyHintGo = "go" // EnterKeyHintNext indicates the enter key should indicate "next". EnterKeyHintNext = "next" // EnterKeyHintPrevious indicates the enter key should indicate "previous". EnterKeyHintPrevious = "previous" // EnterKeyHintSearch indicates the enter key should indicate "search". EnterKeyHintSearch = "search" // EnterKeyHintSend indicates the enter key should indicate "send". EnterKeyHintSend = "send" )
EnterKeyHint* constants are valid values for the enterkeyhint attribute.
const ( // WrapHard specifies hard wrapping with preserved line breaks. WrapHard = "hard" // WrapSoft specifies soft wrapping without line breaks in the submitted value. WrapSoft = "soft" // WrapOff disables wrapping. WrapOff = "off" )
Wrap* constants are valid values for the wrap attribute on <textarea>.
const ( // ShapeDefault defines the entire region. ShapeDefault = "default" // ShapeCircle defines a circular region. ShapeCircle = "circle" // ShapePoly defines a polygonal region. ShapePoly = "poly" // ShapeRect defines a rectangular region. ShapeRect = "rect" )
Shape* constants are valid values for the shape attribute on <area>.
const ( // SpellCheckTrue enables spell checking. SpellCheckTrue = "true" // SpellCheckFalse disables spell checking. SpellCheckFalse = "false" )
Spellcheck* constants are valid values for the spellcheck attribute.
const ( // ContentEditableTrue makes the element editable. ContentEditableTrue = "true" // ContentEditableFalse makes the element non-editable. ContentEditableFalse = "false" // ContentEditablePlaintextOnly allows only plain text editing. ContentEditablePlaintextOnly = "plaintext-only" )
ContentEditable* constants are valid values for the contenteditable attribute.
const ( // DraggableTrue makes the element draggable. DraggableTrue = "true" // DraggableFalse makes the element non-draggable. DraggableFalse = "false" )
Draggable* constants are valid values for the draggable attribute.
const ( // InputModeNone indicates no virtual keyboard. InputModeNone = "none" // InputModeText indicates a text input mode. InputModeText = "text" // InputModeDecimal indicates a decimal number input mode. InputModeDecimal = "decimal" // InputModeNumeric indicates a numeric input mode. InputModeNumeric = "numeric" // InputModeTel indicates a telephone number input mode. InputModeTel = "tel" // InputModeSearch indicates a search input mode. InputModeSearch = "search" // InputModeEmail indicates an email input mode. InputModeEmail = "email" // InputModeUrl indicates a URL input mode. InputModeUrl = "url" )
InputMode* constants are valid values for the inputmode attribute.
const ( // PopoverTargetActionHide hides the popover. PopoverTargetActionHide = "hide" // PopoverTargetActionShow shows the popover. PopoverTargetActionShow = "show" // PopoverTargetActionToggle toggles the popover visibility. PopoverTargetActionToggle = "toggle" )
PopoverTargetAction* constants are valid values for the popovertargetaction attribute.
const ( // AutocompleteOff disables autocomplete. AutocompleteOff = "off" // AutocompleteOn enables autocomplete. AutocompleteOn = "on" // AutocompleteName specifies the full name. AutocompleteName = "name" // AutocompleteHonorificPrefix specifies a honorific prefix (e.g., Mr, Mrs). AutocompleteHonorificPrefix = "honorific-prefix" // AutocompleteGivenName specifies the given (first) name. AutocompleteGivenName = "given-name" // AutocompleteAdditionalName specifies an additional name. AutocompleteAdditionalName = "additional-name" // AutocompleteFamilyName specifies the family (last) name. AutocompleteFamilyName = "family-name" // AutocompleteHonorificSuffix specifies a honorific suffix (e.g., Jr, III). AutocompleteHonorificSuffix = "honorific-suffix" // AutocompleteNickname specifies a nickname. AutocompleteNickname = "nickname" // AutocompleteEmail specifies an email address. AutocompleteEmail = "email" // AutocompleteUsername specifies a username. AutocompleteUsername = "username" // AutocompleteNewPassword specifies a new password (for signup). AutocompleteNewPassword = "new-password" // AutocompleteCurrentPassword specifies the current password (for login). AutocompleteCurrentPassword = "current-password" // AutocompleteOneTimeCode specifies a one-time code for authentication. AutocompleteOneTimeCode = "one-time-code" // AutocompleteOrganizationTitle specifies a job title or organizational title. AutocompleteOrganizationTitle = "organization-title" // AutocompleteOrganization specifies an organization name. AutocompleteOrganization = "organization" // AutocompleteStreetAddress specifies a street address. AutocompleteStreetAddress = "street-address" // AutocompleteAddressLine1 specifies the first line of an address. AutocompleteAddressLine1 = "address-line1" // AutocompleteAddressLine2 specifies the second line of an address. AutocompleteAddressLine2 = "address-line2" // AutocompleteAddressLine3 specifies the third line of an address. AutocompleteAddressLine3 = "address-line3" // AutocompleteAddressLevel4 specifies the most granular address level (e.g., neighborhood). AutocompleteAddressLevel4 = "address-level4" // AutocompleteAddressLevel3 specifies the third address level (e.g., city). AutocompleteAddressLevel3 = "address-level3" // AutocompleteAddressLevel2 specifies the second address level (e.g., state/province). AutocompleteAddressLevel2 = "address-level2" // AutocompleteAddressLevel1 specifies the first address level (e.g., country). AutocompleteAddressLevel1 = "address-level1" // AutocompleteCountry specifies the country code. AutocompleteCountry = "country" // AutocompleteCountryName specifies the country name. AutocompleteCountryName = "country-name" // AutocompleteCcName specifies the name on the credit card. AutocompleteCcName = "cc-name" // AutocompleteCcGivenName specifies the given name on the credit card. AutocompleteCcGivenName = "cc-given-name" // AutocompleteCcAdditionalName specifies the additional name on the credit card. AutocompleteCcAdditionalName = "cc-additional-name" // AutocompleteCcFamilyName specifies the family name on the credit card. AutocompleteCcFamilyName = "cc-family-name" // AutocompleteCcNumber specifies the credit card number. AutocompleteCcNumber = "cc-number" // AutocompleteCcExp specifies the credit card expiration date. AutocompleteCcExp = "cc-exp" // AutocompleteCcExpMonth specifies the credit card expiration month. AutocompleteCcExpMonth = "cc-exp-month" // AutocompleteCcExpYear specifies the credit card expiration year. AutocompleteCcExpYear = "cc-exp-year" // AutocompleteCcCsc specifies the credit card security code. AutocompleteCcCsc = "cc-csc" // AutocompleteCcType specifies the credit card type (e.g., Visa, Mastercard). AutocompleteCcType = "cc-type" // AutocompleteTransactionCurrency specifies the transaction currency. AutocompleteTransactionCurrency = "transaction-currency" // AutocompleteTransactionAmount specifies the transaction amount. AutocompleteTransactionAmount = "transaction-amount" // AutocompleteLanguage specifies a language tag. AutocompleteLanguage = "language" // AutocompleteBday specifies a birth date. AutocompleteBday = "bday" // AutocompleteBdayDay specifies the day of birth. AutocompleteBdayDay = "bday-day" // AutocompleteBdayMonth specifies the month of birth. AutocompleteBdayMonth = "bday-month" // AutocompleteBdayYear specifies the year of birth. AutocompleteBdayYear = "bday-year" // AutocompleteSex specifies a gender identity. AutocompleteSex = "sex" // AutocompleteTelCountryCode specifies the country code component of a telephone number. AutocompleteTelCountryCode = "tel-country-code" // AutocompleteTelNational specifies the telephone number without country code. AutocompleteTelNational = "tel-national" // AutocompleteTelAreaCode specifies the area code component of a telephone number. AutocompleteTelAreaCode = "tel-area-code" // AutocompleteTelLocal specifies the local telephone number. AutocompleteTelLocal = "tel-local" // AutocompleteTelExtension specifies a telephone extension code. AutocompleteTelExtension = "tel-extension" // AutocompleteImpp specifies an instant messaging protocol URL. AutocompleteImpp = "impp" // AutocompleteUrl specifies a URL. AutocompleteUrl = "url" // AutocompletePhoto specifies a photo URL. AutocompletePhoto = "photo" )
Autocomplete* constants are valid values for the autocomplete attribute.
const ( // SandboxAllowForms allows form submission in the iframe. SandboxAllowForms = "allow-forms" // SandboxAllowModals allows modal dialogs in the iframe. SandboxAllowModals = "allow-modals" // SandboxAllowOrientationLock allows screen orientation lock in the iframe. SandboxAllowOrientationLock = "allow-orientation-lock" // SandboxAllowPointerLock allows pointer lock in the iframe. SandboxAllowPointerLock = "allow-pointer-lock" // SandboxAllowPopups allows popups in the iframe. SandboxAllowPopups = "allow-popups" // SandboxAllowPopupsToEscapeSandbox allows popups to escape sandbox restrictions. SandboxAllowPopupsToEscapeSandbox = "allow-popups-to-escape-sandbox" // SandboxAllowPresentation allows presentation mode in the iframe. SandboxAllowPresentation = "allow-presentation" // SandboxAllowSameOrigin allows the iframe to access same-origin content. SandboxAllowSameOrigin = "allow-same-origin" // SandboxAllowScripts allows JavaScript execution in the iframe. SandboxAllowScripts = "allow-scripts" SandboxAllowTopNavigation = "allow-top-navigation" SandboxAllowTopNavigationByUserActivation = "allow-top-navigation-by-user-activation" )
Sandbox* constants are valid values for the sandbox attribute on <iframe>.
const ( // EventAbort fires when an operation is aborted. EventAbort = "abort" // EventAfterPrint fires after the document is printed. EventAfterPrint = "afterprint" // EventAnimationEnd fires when a CSS animation ends. EventAnimationEnd = "animationend" // EventAnimationIteration fires when a CSS animation repeats. EventAnimationIteration = "animationiteration" // EventAnimationStart fires when a CSS animation starts. EventAnimationStart = "animationstart" // EventAppInstalled fires when an app is installed. EventAppInstalled = "appinstalled" // EventAudioProcess fires when an audio buffer is processed. EventAudioProcess = "audioprocess" // EventAudioEnd fires when audio playback ends. EventAudioEnd = "audioend" // EventAudioStart fires when audio playback starts. EventAudioStart = "audiostart" // EventBeforePrint fires before the document is printed. EventBeforePrint = "beforeprint" // EventBeforeUnload fires before the document is unloaded. EventBeforeUnload = "beforeunload" // EventBeginEvent fires when a SMIL animation begins. EventBeginEvent = "beginEvent" // EventBlur fires when an element loses focus. EventBlur = "blur" // EventBoundary fires when a speech recognition boundary is reached. EventBoundary = "boundary" // EventCached fires when a cached resource is available. EventCached = "cached" // EventCanPlay fires when media can start playing. EventCanPlay = "canplay" // EventCanPlayThrough fires when media can play to the end without buffering. EventCanPlayThrough = "canplaythrough" // EventChange fires when an input value changes. EventChange = "change" // EventChargingChange fires when the battery charging state changes. EventChargingChange = "chargingchange" // EventChargingTimeChange fires when the battery charging time changes. EventChargingTimeChange = "chargingtimechange" // EventChecking fires when checking for cached resources. EventChecking = "checking" // EventClick fires when an element is clicked. EventClick = "click" // EventClose fires when a connection is closed. EventClose = "close" // EventComplete fires when an operation completes. EventComplete = "complete" // EventCompositionEnd fires when composition of text is complete. EventCompositionEnd = "compositionend" // EventCompositionStart fires when composition of text starts. EventCompositionStart = "compositionstart" // EventCompositionUpdate fires during composition of text. EventCompositionUpdate = "compositionupdate" // EventContextMenu fires when a context menu is triggered. EventContextMenu = "contextmenu" // EventCopy fires when text is copied to the clipboard. EventCopy = "copy" // EventCut fires when text is cut from the clipboard. EventCut = "cut" // EventDblClick fires when an element is double-clicked. EventDblClick = "dblclick" // EventDeviceChange fires when a device changes. EventDeviceChange = "devicechange" // EventDeviceLight fires when ambient light levels change. EventDeviceLight = "devicelight" // EventDeviceMotion fires when device motion data is available. EventDeviceMotion = "devicemotion" // EventDeviceOrientation fires when device orientation changes. EventDeviceOrientation = "deviceorientation" // EventDeviceProximity fires when device proximity is detected. EventDeviceProximity = "deviceproximity" // EventDischargingTimeChange fires when the battery discharging time changes. EventDischargingTimeChange = "dischargingtimechange" // EventDomActivate fires when an element is activated. EventDomActivate = "DOMActivate" // EventDomAttributeNameChanged fires when an attribute name changes. EventDomAttributeNameChanged = "DOMAttributeNameChanged" // EventDomAttrModified fires when an attribute is modified. EventDomAttrModified = "DOMAttrModified" // EventDomCharacterDataModified fires when character data is modified. EventDomCharacterDataModified = "DOMCharacterDataModified" // EventDomContentLoaded fires when the DOM content is loaded. EventDomContentLoaded = "DOMContentLoaded" // EventDomElementNameChanged fires when an element name changes. EventDomElementNameChanged = "DOMElementNameChanged" // EventDomFocusIn fires when an element gains focus. EventDomFocusIn = "DOMFocusIn" // EventDomFocusOut fires when an element loses focus. EventDomFocusOut = "DOMFocusOut" // EventDomNodeInserted fires when a node is inserted. EventDomNodeInserted = "DOMNodeInserted" // EventDomNodeInsertedIntoDocument fires when a node is inserted into the document. EventDomNodeInsertedIntoDocument = "DOMNodeInsertedIntoDocument" // EventDomNodeRemoved fires when a node is removed. EventDomNodeRemoved = "DOMNodeRemoved" // EventDomNodeRemovedFromDocument fires when a node is removed from the document. EventDomNodeRemovedFromDocument = "DOMNodeRemovedFromDocument" // EventDomSubtreeModified fires when the subtree is modified. EventDomSubtreeModified = "DOMSubtreeModified" // EventDownloading fires when a download is in progress. EventDownloading = "downloading" // EventDrag fires when an element is being dragged. EventDrag = "drag" // EventDragEnd fires when a drag operation ends. EventDragEnd = "dragend" // EventDragEnter fires when a dragged element enters a drop target. EventDragEnter = "dragenter" // EventDragLeave fires when a dragged element leaves a drop target. EventDragLeave = "dragleave" // EventDragOver fires when a dragged element is over a drop target. EventDragOver = "dragover" // EventDragStart fires when a drag operation starts. EventDragStart = "dragstart" // EventDrop fires when an element is dropped. EventDrop = "drop" // EventDurationChange fires when the duration of media changes. EventDurationChange = "durationchange" // EventEmptied fires when media becomes empty. EventEmptied = "emptied" // EventEnd fires when an operation ends. EventEnd = "end" // EventEnded fires when media playback ends. EventEnded = "ended" // EventEndEvent fires when a SMIL animation ends. EventEndEvent = "endEvent" // EventError fires when an error occurs. EventError = "error" // EventFocus fires when an element gains focus. EventFocus = "focus" // EventFocusIn fires when an element gains focus. EventFocusIn = "focusin" // EventFocusOut fires when an element loses focus. EventFocusOut = "focusout" // EventFullscreenChange fires when fullscreen mode changes. EventFullscreenChange = "fullscreenchange" // EventFullscreenError fires when fullscreen mode cannot be entered. EventFullscreenError = "fullscreenerror" // EventGamepadConnected fires when a gamepad is connected. EventGamepadConnected = "gamepadconnected" // EventGamepadDisconnected fires when a gamepad is disconnected. EventGamepadDisconnected = "gamepaddisconnected" // EventGotPointerCapture fires when pointer capture is obtained. EventGotPointerCapture = "gotpointercapture" // EventHashChange fires when the URL hash changes. EventHashChange = "hashchange" // EventLostPointerCapture fires when pointer capture is lost. EventLostPointerCapture = "lostpointercapture" // EventInput fires when an input value changes. EventInput = "input" // EventInvalid fires when an input element is invalid. EventInvalid = "invalid" // EventKeyDown fires when a key is pressed down. EventKeyDown = "keydown" // EventKeyPress fires when a key is pressed. EventKeyPress = "keypress" // EventKeyUp fires when a key is released. EventKeyUp = "keyup" // EventLanguageChange fires when the language changes. EventLanguageChange = "languagechange" // EventLevelChange fires when the battery level changes. EventLevelChange = "levelchange" // EventLoad fires when a resource loads. EventLoad = "load" // EventLoadedData fires when media data is loaded. EventLoadedData = "loadeddata" // EventLoadedMetadata fires when media metadata is loaded. EventLoadedMetadata = "loadedmetadata" // EventLoadEnd fires when a resource finishes loading. EventLoadEnd = "loadend" // EventLoadStart fires when a resource starts loading. EventLoadStart = "loadstart" // EventMark fires when a text mark is reached in media. EventMark = "mark" // EventMessage fires when a message is received. EventMessage = "message" // EventMessageError fires when a message error occurs. EventMessageError = "messageerror" // EventMouseDown fires when a mouse button is pressed. EventMouseDown = "mousedown" // EventMouseEnter fires when the mouse enters an element. EventMouseEnter = "mouseenter" // EventMouseLeave fires when the mouse leaves an element. EventMouseLeave = "mouseleave" // EventMouseMove fires when the mouse moves. EventMouseMove = "mousemove" // EventMouseOut fires when the mouse leaves an element. EventMouseOut = "mouseout" // EventMouseOver fires when the mouse enters an element. EventMouseOver = "mouseover" // EventMouseUp fires when a mouse button is released. EventMouseUp = "mouseup" // EventNoMatch fires when a speech recognition result doesn't match. EventNoMatch = "nomatch" // EventNotificationClick fires when a notification is clicked. EventNotificationClick = "notificationclick" // EventNoUpdate fires when no update is available. EventNoUpdate = "noupdate" // EventObsolete fires when an obsolete API is used. EventObsolete = "obsolete" // EventOffline fires when the network goes offline. EventOffline = "offline" // EventOnline fires when the network comes online. EventOnline = "online" // EventOpen fires when a connection is opened. EventOpen = "open" // EventOrientationChange fires when the device orientation changes. EventOrientationChange = "orientationchange" // EventPageHide fires when a page is being hidden. EventPageHide = "pagehide" // EventPageShow fires when a page is being shown. EventPageShow = "pageshow" // EventPaste fires when text is pasted from the clipboard. EventPaste = "paste" // EventPause fires when media playback pauses. EventPause = "pause" // EventPointerCancel fires when a pointer operation is cancelled. EventPointerCancel = "pointercancel" // EventPointerDown fires when a pointer is pressed. EventPointerDown = "pointerdown" // EventPointerEnter fires when a pointer enters an element. EventPointerEnter = "pointerenter" // EventPointerLeave fires when a pointer leaves an element. EventPointerLeave = "pointerleave" // EventPointerLockChange fires when pointer lock state changes. EventPointerLockChange = "pointerlockchange" // EventPointerLockError fires when pointer lock fails. EventPointerLockError = "pointerlockerror" // EventPointerMove fires when a pointer moves. EventPointerMove = "pointermove" // EventPointerOut fires when a pointer leaves an element. EventPointerOut = "pointerout" // EventPointerOver fires when a pointer enters an element. EventPointerOver = "pointerover" // EventPointerUp fires when a pointer is released. EventPointerUp = "pointerup" // EventPlay fires when media playback starts. EventPlay = "play" // EventPlaying fires when media is actively playing. EventPlaying = "playing" // EventPopState fires when the history state changes. EventPopState = "popstate" // EventProgress fires when a resource is loading. EventProgress = "progress" // EventPush fires when a push notification is received. EventPush = "push" // EventPushSubscriptionChange fires when a push subscription changes. EventPushSubscriptionChange = "pushsubscriptionchange" // EventRateChange fires when the playback rate changes. EventRateChange = "ratechange" // EventReadyStateChange fires when the ready state changes. EventReadyStateChange = "readystatechange" // EventRepeatEvent fires when a SMIL animation repeats. EventRepeatEvent = "repeatEvent" // EventReset fires when a form is reset. EventReset = "reset" // EventResize fires when the viewport is resized. EventResize = "resize" // EventResourceTimingBufferFull fires when the resource timing buffer is full. EventResourceTimingBufferFull = "resourcetimingbufferfull" // EventResult fires when a speech recognition result is available. EventResult = "result" // EventResume fires when media playback resumes. EventResume = "resume" // EventScroll fires when an element is scrolled. EventScroll = "scroll" // EventSeeked fires when a seek operation completes. EventSeeked = "seeked" // EventSeeking fires when a seek operation starts. EventSeeking = "seeking" // EventSelect fires when text is selected. EventSelect = "select" // EventSelectStart fires when a text selection starts. EventSelectStart = "selectstart" // EventSelectionChange fires when the selection changes. EventSelectionChange = "selectionchange" // EventShow fires when a context menu or dialog is shown. EventShow = "show" // EventSlotChange fires when a slot's content changes. EventSlotChange = "slotchange" // EventSoundEnd fires when sound ends. EventSoundEnd = "soundend" // EventSoundStart fires when sound starts. EventSoundStart = "soundstart" // EventSpeechEnd fires when speech recognition ends. EventSpeechEnd = "speechend" // EventSpeechStart fires when speech recognition starts. EventSpeechStart = "speechstart" // EventStalled fires when media loading stalls. EventStalled = "stalled" // EventStart fires when an operation starts. EventStart = "start" // EventStorage fires when storage is modified. EventStorage = "storage" // EventSubmit fires when a form is submitted. EventSubmit = "submit" // EventSuccess fires when an operation succeeds. EventSuccess = "success" // EventSuspend fires when media loading is suspended. EventSuspend = "suspend" // EventSvgAbort fires when SVG loading is aborted. EventSvgAbort = "SVGAbort" // EventSvgError fires when SVG loading fails. EventSvgError = "SVGError" // EventSvgLoad fires when SVG loads. EventSvgLoad = "SVGLoad" // EventSvgResize fires when SVG is resized. EventSvgResize = "SVGResize" // EventSvgScroll fires when SVG is scrolled. EventSvgScroll = "SVGScroll" // EventSvgUnload fires when SVG is unloaded. EventSvgUnload = "SVGUnload" // EventSvgZoom fires when SVG is zoomed. EventSvgZoom = "SVGZoom" // EventTimeout fires when a timeout occurs. EventTimeout = "timeout" // EventTimeUpdate fires when the current playback time updates. EventTimeUpdate = "timeupdate" // EventTouchCancel fires when a touch is cancelled. EventTouchCancel = "touchcancel" // EventTouchEnd fires when a touch ends. EventTouchEnd = "touchend" // EventTouchMove fires when a touch moves. EventTouchMove = "touchmove" // EventTouchStart fires when a touch starts. EventTouchStart = "touchstart" // EventTransitionEnd fires when a CSS transition ends. EventTransitionEnd = "transitionend" // EventUnload fires when the document is unloaded. EventUnload = "unload" // EventUpdateReady fires when an update is ready. EventUpdateReady = "updateready" // EventUserProximity fires when user proximity is detected. EventUserProximity = "userproximity" // EventVoicesChanged fires when available voices change. EventVoicesChanged = "voiceschanged" // EventVisibilityChange fires when document visibility changes. EventVisibilityChange = "visibilitychange" // EventVolumeChange fires when the volume changes. EventVolumeChange = "volumechange" // EventWaiting fires when media is waiting for data. EventWaiting = "waiting" // EventWheel fires when the mouse wheel is rotated. EventWheel = "wheel" )
Variables ¶
This section is empty.
Functions ¶
func IfElse ¶
IfElse returns the appropriate value based on a boolean condition.
This generic function is useful for inline conditional expressions in builder-style code where you need to choose between two values without breaking the chain of method calls.
Example:
div := Div(KV{"class": IfElse(isActive, "active", "inactive")})
Body(
IfElse(isAdmin,
Div("Admin content"),
P("Regular user content"),
),
)
Types ¶
type Element ¶
type Element struct {
Tag string // HTML tag name
IsVoid bool // Whether the tag is self-closing (e.g., <br>, <img>)
Attributes []attribute // HTML attributes as key-value pairs
Children []HyperNode // Child nodes
}
Element represents an HTML element with its attributes and children.
type HyperNode ¶ added in v1.7.0
HyperNode represents any renderable HTML element or text content.
The HyperNode interface is the core abstraction that allows both HTML elements and text content to be treated uniformly when building and rendering HTML trees. All elements created by the factory functions (Div(), P(), Svg(), etc.) implement this interface.
Example:
var node HyperNode = Div("Hello")
err := node.Render(os.Stdout)
func A ¶
A creates hyperlinks to other web pages, files, locations within the same page, or anything else a URL can address.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a
func Abbr ¶
Abbr represents an abbreviation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/abbr
func Address ¶
Address indicates contact information for a person or organization.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/address
func Area ¶
Area defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with hyperlink.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/area
func Article ¶
Article creates an article element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/article
func Aside ¶
Aside creates an aside element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/aside
func Audio ¶
Audio is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the source element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/audio
func B ¶
B draws attention to text without conveying importance.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/b
func Base ¶
Base specifies the base URL and default browsing context for relative URLs.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/base
func Bdi ¶
Bdi isolates text for bidirectional text formatting.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdi
func Bdo ¶
Bdo overrides the current text direction.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdo
func Blockquote ¶
Blockquote represents a section quoted from another source.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/blockquote
func Body ¶
Body represents the content of an HTML document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/body
func Br ¶
Br produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/br
func Button ¶
Button is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it performs an action, such as submitting a form or opening a dialog.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button
func Canvas ¶
Canvas is a container element to use with either the canvas scripting API or the WebGL API to draw graphics and animations.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/canvas
func Caption ¶
Caption specifies the caption (or title) of a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/caption
func Cite ¶
Cite marks the title of a creative work.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/cite
func Code ¶
Code displays its contents styled as computer code.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/code
func Col ¶
Col defines one or more columns in a column group represented by its implicit or explicit parent <colgroup> element. The <col> element is only valid as a child of a <colgroup> element that has no span attribute defined.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/col
func Colgroup ¶
Colgroup defines a group of columns within a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/colgroup
func Data ¶
Data links content with a machine-readable translation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/data
func Datalist ¶
Datalist contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/datalist
func Dd ¶
Dd provides the description, definition, or value for the preceding term.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dd
func Del ¶
Del represents a range of text that has been deleted from a document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/del
func Details ¶
Details creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label must be provided using the <summary> element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details
func Dfn ¶
Dfn indicates the defining instance of a term.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dfn
func Dialog ¶
Dialog represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog
func Div ¶
Div is the generic container for flow content.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/div
func Dl ¶
Dl represents a description list.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dl
func Dt ¶
Dt specifies a term in a description or definition list.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dt
func Em ¶
Em marks text with emphasis.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/em
func Embed ¶
Embed embeds external content at the specified point in the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/embed
func Fencedframe ¶
Fencedframe represents a nested browsing context, like <iframe> but with more native privacy features built in.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fencedframe
func Fieldset ¶
Fieldset is used to group several controls as well as labels (<label>) within a web form.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset
func Figcaption ¶
Figcaption represents a caption or legend for the contents of its parent figure element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figcaption
func Figure ¶
Figure represents self-contained content with an optional caption.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figure
func Footer ¶
Footer creates a footer element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/footer
func Form ¶
Form represents a document section containing interactive controls for submitting information.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/form
func H1 ¶
H1 creates a level 1 heading element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h1
func H2 ¶
H2 creates a level 2 heading element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h2
func H3 ¶
H3 creates a level 3 heading element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h3
func H4 ¶
H4 creates a level 4 heading element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h4
func H5 ¶
H5 creates a level 5 heading element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h5
func H6 ¶
H6 creates a level 6 heading element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h6
func Head ¶
Head contains machine-readable information about the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/head
func Header ¶
Header creates a header element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/header
func Hgroup ¶
Hgroup groups a set of h1–h6 elements when they represent a multi-level heading.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/hgroup
func Hr ¶
Hr represents a thematic break between paragraph-level elements.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/hr
func Html ¶
Html creates the root element of an HTML document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/html
func I ¶
I represents text in an alternate voice or mood.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/i
func If ¶
Conditionally returns a Node based on a boolean condition.
This function returns an empty Node (not nil) when the condition is false, which prevents nil pointer issues when building DOM trees.
Example:
Body( If(showHeader, Header(...)), Main(...), )
func Iframe ¶
Iframe represents a nested browsing context, embedding another HTML page into the current one.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe
func Img ¶
Img embeds an image into the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img
func Input ¶
Input is used to create interactive controls for web-based forms to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input
func Ins ¶
Ins represents a range of text that has been added to a document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ins
func Kbd ¶
Kbd represents text that the user should enter.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/kbd
func Label ¶
Label represents a caption for an item in a user interface.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/label
func Legend ¶
Legend represents a caption for the content of its parent <fieldset>.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/legend
func Li ¶
Li represents a list item.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/li
func Link ¶
Link specifies relationships between the current document and an external resource.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link
func Main ¶
Main creates a main content element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/main
func Map ¶
Map is used with <area> elements to define an image map (a clickable link area).
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/map
func MapSlice ¶
MapSlice transforms a slice of items into Nodes by applying a function to each element.
Each element in the input slice is transformed using the provided function, and all resulting Nodes are aggregated into a single container Node.
Example:
items := []string{"Apple", "Banana", "Cherry"}
Ul(
MapSlice(items, func(item string) HyperNode {
return Li(item)
}),
)
func Mark ¶
Mark highlights text for reference.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/mark
func Math ¶
Math is the top-level element in MathML. Every valid MathML instance must be wrapped in it. In addition, you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/math
func Menu ¶
Menu represents a set of commands or options.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/menu
func Meta ¶
Meta represents metadata that cannot be represented by other HTML meta-related elements.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta
func Meter ¶
Meter represents either a scalar value within a known range or a fractional value.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meter
func Nav ¶
Nav creates a navigation element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/nav
func Noscript ¶
Noscript defines a section of HTML to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/noscript
func Object ¶
Object represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/object
func Ol ¶
Ol represents an ordered list.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ol
func Optgroup ¶
Optgroup creates a grouping of options within a <select> element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/optgroup
func Option ¶
Option is used to define an item contained in a <select>, an <optgroup>, or a <datalist> element. As such, <option> can represent menu items in popups and other lists of items in an HTML document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/option
func Output ¶
Output is a container element into which a site or app can inject the results of a calculation or the outcome of a user action.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/output
func P ¶
P creates a paragraph element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/p
func Picture ¶
Picture defines multiple sources for an img element to offer alternative versions of an image for different display/device scenarios.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture
func Pre ¶
Pre represents preformatted text.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/pre
func Progress ¶
Progress displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/progress
func Q ¶
Q indicates a short inline quotation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/q
func Repeat ¶
Repeat generates multiple Nodes by calling a function n times.
The provided function is called exactly n times, and each resulting Node is aggregated into a single container Node. Using a function ensures each Node instance is unique (important for elements with mutable state).
Example:
Ul(
Repeat(5, func() HyperNode {
return Li("List item")
}),
)
func Rp ¶
Rp provides parentheses for browsers that don't support ruby text.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rp
func Rt ¶
Rt specifies the ruby text for ruby annotations.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rt
func Ruby ¶
Ruby represents ruby annotations for East Asian typography.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ruby
func S ¶
S renders text with a strikethrough.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/s
func Samp ¶
Samp represents sample output from a computer program.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/samp
func Script ¶
Script is used to embed executable code or data; this is typically used to embed or refer to JavaScript code. The <script> element can also be used with other languages, such as WebGL's GLSL shader programming language and JSON.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script
func Search ¶
Search represents a search or filtering interface.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/search
func Section ¶
Section creates a section element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/section
func Select ¶
Select represents a control that provides a menu of options.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select
func Selectedcontent ¶
Selectedcontent displays the content of the currently selected <option> inside a closed <select> element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/selectedcontent
func Slot ¶
Slot acts as a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/slot
func Small ¶
Small represents side-comments and small print.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/small
func Source ¶
Source specifies multiple media resources for the picture, the audio element, or the video element. It is a void element, meaning that it has no content and does not have a closing tag. It is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/source
func Span ¶
Span is the generic inline container for phrasing content.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span
func Strong ¶
Strong indicates strong importance.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/strong
func Style ¶
Style contains style information for a document or part of a document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/style
func Sub ¶
Sub specifies inline text displayed as subscript.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/sub
func Summary ¶
Summary specifies a summary, caption, or legend for a details element's disclosure box. Clicking the <summary> element toggles the state of the parent <details> element open and closed.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/summary
func Sup ¶
Sup specifies inline text displayed as superscript.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/sup
func Svg ¶
Svg is a container defining a new coordinate system and viewport. It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/svg
func Table ¶
Table represents tabular data—that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table
func Tbody ¶
Tbody groups the body content in a table with information about the table's columns. This is usually in the form of column headers (<th> elements).
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tbody
func Td ¶
Td is a child of the <tr> element, it defines a cell of a table that contains data.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/td
func Template ¶
Template holds HTML that is not to be rendered immediately when a page is loaded but may be instantiated subsequently during runtime using JavaScript.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/template
func Textarea ¶
Textarea represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example, a comment on a review or feedback form.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/textarea
func Tfoot ¶
Tfoot groups the footer content in a table with information about the table's columns. This is usually a summary of the columns, e.g., a sum of the given numbers in a column.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tfoot
func Th ¶
Th is a child of the <tr> element, it defines a cell as the header of a group of table cells. The nature of this group can be explicitly defined by the scope and headers attributes.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/th
func Thead ¶
Thead groups the header content in a table with information about the table's columns. This is usually in the form of column headers (<th> elements).
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/thead
func Time ¶
Time represents a specific period in time.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/time
func Title ¶
Title defines the document's title that is shown in a browser's title bar or a page's tab.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/title
func Tr ¶
Tr defines a row of cells in a table. The row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tr
func Track ¶
Track is used as a child of the media elements, audio and video. It lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles. The tracks are formatted in WebVTT format (.vtt files)—Web Video Text Tracks.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/track
func U ¶
U represents text with an unarticulated annotation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/u
func Ul ¶
Ul represents an unordered list.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ul
func Var ¶
Var represents a variable in a mathematical expression or programming context.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/var
func Video ¶
Video embeds a media player which supports video playback into the document. You can also use <video> for audio content, but the audio element may provide a more appropriate user experience.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/video
func Wbr ¶
Wbr represents a word break opportunity.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/wbr
type KV ¶
KV represents a key-value map for HTML attributes.
The value type must be either string or bool:
- string: Attribute will have the format key="value" (HTML-escaped)
- bool: If true, attribute appears as key (valueless). If false, attribute is omitted.
- any other type triggers an error during rendering.
Example:
KV{"class": "container", "hidden": true, "disabled": false}
// Renders: class="container" hidden
Directories
¶
| Path | Synopsis |
|---|---|
|
templ: version: v0.3.977
|
templ: version: v0.3.977 |
|
Package hx provides constants for htmx attributes and events.
|
Package hx provides constants for htmx attributes and events. |
|
extensions/ws
Package hxws provides constants for the htmx WebSocket extension attributes and events.
|
Package hxws provides constants for the htmx WebSocket extension attributes and events. |