view.dom.primitives

Functions

a([child_text, data, href, target, ...])

Defines a hyperlink that links to another page or location within the same page

abbr([child_text, data])

Defines an abbreviation or acronym, optionally with its expansion

address([child_text, data])

Defines contact information for the author/owner of a document or article

area([child_text, data, coords, shape, ...])

Defines a clickable area inside an image map

article([child_text, data])

Defines independent, self-contained content that could be distributed independently

aside([child_text, data])

Defines content aside from the main content (like a sidebar)

audio([child_text, data, src, controls, ...])

Embeds sound content in documents

b([child_text, data])

Defines bold text without extra importance (use <strong> for importance)

base(*[, data, href, target])

Specifies the base URL and/or target for all relative URLs in a document

bdi([child_text, data])

Isolates text that might be formatted in a different direction from other text

bdo([child_text, data])

Overrides the current text direction

blockquote([child_text, data, cite])

Defines a section that is quoted from another source

body([child_text, data])

Defines the document's body, containing all visible contents

br(*[, data])

Inserts a single line break

button([child_text, data, type, name, ...])

Defines a clickable button

canvas([child_text, data, width, height])

Provides a container for graphics that can be drawn using JavaScript

caption([child_text, data])

Defines a table caption

cite([child_text, data])

Defines the title of a creative work (book, movie, song, etc.)

code([child_text, data])

Defines a piece of computer code

col(*[, data, span])

Specifies column properties for each column within a <colgroup> element

colgroup([child_text, data, span])

Specifies a group of one or more columns in a table for formatting

data([child_text, data])

Links content with a machine-readable translation

datalist([child_text, data])

Contains a set of <option> elements that represent predefined options for input controls

dd([child_text, data])

Defines a description/value of a term in a description list

del_([child_text, data, cite, datetime])

Defines text that has been deleted from a document

details([child_text, data, open])

Defines additional details that the user can view or hide

dfn([child_text, data])

Represents the defining instance of a term

dialog([child_text, data, open])

Defines a dialog box or window

div([child_text, data])

Defines a generic container for flow content with no semantic meaning

dl([child_text, data])

Defines a description list

dt([child_text, data])

Defines a term/name in a description list

em([child_text, data])

Defines emphasized text (typically displayed in italic)

embed(*[, data, type, width, height])

Embeds external content at the specified point in the document

fieldset([child_text, data, disabled, form, ...])

Groups related elements in a form and draws a box around them

figcaption([child_text, data])

Defines a caption for a <figure> element

figure([child_text, data])

Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.

footer([child_text, data])

Defines a footer for a document or section

form([child_text, data, action, method, ...])

Creates an HTML form for user input

h1([child_text, data])

Defines the most important heading (level 1)

h2([child_text, data])

Defines a level 2 heading

h3([child_text, data])

Defines a level 3 heading

h4([child_text, data])

Defines a level 4 heading

h5([child_text, data])

Defines a level 5 heading

h6([child_text, data])

Defines the least important heading (level 6)

head([child_text, data])

Contains metadata and information about the document

header([child_text, data])

Defines a header for a document or section, typically containing introductory content

hgroup([child_text, data])

Groups a set of h1-h6 elements when a heading has multiple levels

hr(*[, data])

Defines a thematic break or horizontal rule in content

html([child_text, data, xmlns])

Represents the root element of an HTML document

i([child_text, data])

Defines italic text, typically used for technical terms, foreign phrases, etc.

iframe([child_text, data, src, srcdoc, ...])

Embeds another HTML page within the current page

img(*[, data, width, height, srcset, sizes, ...])

Embeds an image in the document

input(*[, data, type, name, value, ...])

Creates an interactive control for user input within a form

ins([child_text, data, cite, datetime])

Defines text that has been inserted into a document

kbd([child_text, data])

Defines keyboard input

label([child_text, data, for_, form])

Defines a label for an input element

legend([child_text, data])

Defines a caption for a fieldset element

li([child_text, data, value])

Defines a list item

link(*[, data, type, media, hreflang, ...])

Defines the relationship between the current document and an external resource

main([child_text, data])

Specifies the main content of the document

map([child_text, data])

Defines a client-side image map

mark([child_text, data])

Defines marked/highlighted text

meta(*[, data, name, content, charset, ...])

Provides metadata about the HTML document

meter([child_text, data, min, max, low, ...])

Defines a scalar measurement within a known range (a gauge)

nav([child_text, data])

Defines a section of navigation links

noscript([child_text, data])

Defines alternate content for users that have disabled scripts or don't support scripting

object([child_text, data, data_, type, ...])

Embeds an external resource such as an image, video, audio, PDF, or Flash

ol([child_text, data, reversed, start, type])

Defines an ordered (numbered) list

optgroup([child_text, data, disabled])

Groups related options in a drop-down list

option([child_text, data, value, label, ...])

Defines an option in a drop-down list

output([child_text, data, for_, form, name])

Represents the result of a calculation or user action

p([child_text, data])

Defines a paragraph

param(*[, data])

Defines parameters for an object element

picture([child_text, data])

Contains multiple image sources, allowing for different images in different scenarios

pre([child_text, data])

Defines preformatted text that preserves spaces and line breaks

progress([child_text, data, value, max])

Represents the progress of a task

q([child_text, data, cite])

Defines a short inline quotation

rp([child_text, data])

Defines what to show in browsers that do not support ruby annotations

rt([child_text, data])

Defines an explanation/pronunciation of characters (for East Asian typography)

ruby([child_text, data])

Defines a ruby annotation (for East Asian typography)

s([child_text, data])

Defines text that is no longer correct or relevant (strikethrough)

samp([child_text, data])

Defines sample output from a computer program

script([child_text, data, src, type, ...])

Embeds or references executable code, typically JavaScript

section([child_text, data])

Defines a thematic grouping of content, typically with a heading

select([child_text, data, name, multiple, ...])

Creates a drop-down list

slot([child_text, data, name])

Defines a slot in a web component that can be filled with markup

small([child_text, data])

Defines smaller text (like copyright and other side-comments)

span([child_text, data])

Defines an inline container with no semantic meaning, used for styling or scripting

strong([child_text, data])

Defines important text with strong importance (typically bold)

style([child_text, data, media, type])

Contains style information (CSS) for a document

sub([child_text, data])

Defines subscript text

summary([child_text, data])

Defines a visible heading for a details element

sup([child_text, data])

Defines superscript text

table([child_text, data])

Defines a table

tbody([child_text, data])

Groups the body content in a table

td([child_text, data, colspan, rowspan, headers])

Defines a standard data cell in a table

template([child_text, data])

Defines a container for content that should not be rendered when the page loads

textarea([child_text, data, name, rows, ...])

Defines a multi-line text input control

tfoot([child_text, data])

Groups the footer content in a table

th([child_text, data, colspan, rowspan, ...])

Defines a header cell in a table

thead([child_text, data])

Groups the header content in a table

time([child_text, data, datetime])

Defines a specific time (or datetime)

title([child_text, data])

Defines the title of the document (shown in browser's title bar or tab)

tr([child_text, data])

Defines a row in a table

track(*[, data, kind, srclang, label, default])

Defines text tracks for media elements (video and audio)

u([child_text, data])

Defines text with an unarticulated, non-textual annotation (typically underlined)

ul([child_text, data])

Defines an unordered (bulleted) list

var([child_text, data])

Defines a variable in programming or mathematical contexts

video([child_text, data, src, controls, ...])

Embeds video content in the document

wbr(*[, data])

Defines a possible line-break opportunity in text

Classes

GlobalAttributes

ImplicitDefault

Sentinel class to mark a default value in an HTML node as "implicit", and thus does not need to be included in the rendered output.

class GlobalAttributes

Bases: TypedDict

accesskey: NotRequired[str]

Specifies a keyboard shortcut to activate or focus the element

cls: NotRequired[str]

Specifies one or more class names for an element (refers to a class in a style sheet)

contenteditable: NotRequired[Literal['true', 'false', 'plaintext-only']]

Specifies whether the content of an element is editable or not

dir: NotRequired[Literal['ltr', 'rtl', 'auto']]

Specifies the text direction for the content in an element

draggable: NotRequired[Literal['true', 'false', 'auto']]

Specifies whether an element is draggable or not

hidden: NotRequired[bool]

Specifies that an element is not yet, or is no longer, relevant

id: NotRequired[str]

Specifies a unique id for an element

lang: NotRequired[str]

Specifies the language of the element’s content

onabort: NotRequired[str]

Script to be run on abort

onblur: NotRequired[str]

Script to be run when an element loses focus

oncancel: NotRequired[str]

Script to be run when a dialog is canceled

oncanplay: NotRequired[str]

Script to be run when a file is ready to start playing

oncanplaythrough: NotRequired[str]

Script to be run when a file can be played all the way through without pausing

onchange: NotRequired[str]

Script to be run when the value of an element is changed

onclick: NotRequired[str]

Script to be run on a mouse click

onclose: NotRequired[str]

Script to be run when a dialog is closed

oncontextmenu: NotRequired[str]

Script to be run when a context menu is triggered

oncopy: NotRequired[str]

Script to be run when the content of an element is copied

oncuechange: NotRequired[str]

Script to be run when the cue changes in a track element

oncut: NotRequired[str]

Script to be run when the content of an element is cut

ondblclick: NotRequired[str]

Script to be run on a mouse double-click

ondrag: NotRequired[str]

Script to be run when an element is dragged

ondragend: NotRequired[str]

Script to be run at the end of a drag operation

ondragenter: NotRequired[str]

Script to be run when an element has been dragged to a valid drop target

ondragleave: NotRequired[str]

Script to be run when an element leaves a valid drop target

ondragover: NotRequired[str]

Script to be run when an element is being dragged over a valid drop target

ondragstart: NotRequired[str]

Script to be run at the start of a drag operation

ondrop: NotRequired[str]

Script to be run when dragged element is being dropped

ondurationchange: NotRequired[str]

Script to be run when the length of the media changes

onemptied: NotRequired[str]

Script to be run when media resource is suddenly unavailable

onended: NotRequired[str]

Script to be run when the media has reach the end

onerror: NotRequired[str]

Script to be run when an error occurs

onfocus: NotRequired[str]

Script to be run when an element gets focus

oninput: NotRequired[str]

Script to be run when an element gets user input

oninvalid: NotRequired[str]

Script to be run when an element is invalid

onkeydown: NotRequired[str]

Script to be run when a user is pressing a key

onkeypress: NotRequired[str]

Script to be run when a user presses a key

onkeyup: NotRequired[str]

Script to be run when a user releases a key

onload: NotRequired[str]

Script to be run when the element has finished loading

onloadeddata: NotRequired[str]

Script to be run when media data is loaded

onloadedmetadata: NotRequired[str]

Script to be run when meta data is loaded

onloadstart: NotRequired[str]

Script to be run just as the file begins to load

onmousedown: NotRequired[str]

Script to be run when a mouse button is pressed down on an element

onmouseenter: NotRequired[str]

Script to be run when the mouse pointer enters an element

onmouseleave: NotRequired[str]

Script to be run when the mouse pointer leaves an element

onmousemove: NotRequired[str]

Script to be run when the mouse pointer is moving over an element

onmouseout: NotRequired[str]

Script to be run when the mouse pointer moves out of an element

onmouseover: NotRequired[str]

Script to be run when the mouse pointer moves over an element

onmouseup: NotRequired[str]

Script to be run when a mouse button is released over an element

onpaste: NotRequired[str]

Script to be run when content is pasted into an element

onpause: NotRequired[str]

Script to be run when the media is paused

onplay: NotRequired[str]

Script to be run when the media starts playing

onplaying: NotRequired[str]

Script to be run when the media actually has started playing

onprogress: NotRequired[str]

Script to be run when the browser is in the process of getting the media data

onratechange: NotRequired[str]

Script to be run each time the playback rate changes

onreset: NotRequired[str]

Script to be run when a form is reset

onresize: NotRequired[str]

Script to be run when the browser window is being resized

onscroll: NotRequired[str]

Script to be run when an element’s scrollbar is being scrolled

onseeked: NotRequired[str]

Script to be run when seeking has ended

onseeking: NotRequired[str]

Script to be run when seeking begins

onselect: NotRequired[str]

Script to be run when the element gets selected

onshow: NotRequired[str]

Script to be run when a context menu is shown

onstalled: NotRequired[str]

Script to be run when the browser is unable to fetch the media data

onsubmit: NotRequired[str]

Script to be run when a form is submitted

onsuspend: NotRequired[str]

Script to be run when fetching the media data is stopped

ontimeupdate: NotRequired[str]

Script to be run when the playing position has changed

ontoggle: NotRequired[str]

Script to be run when the user opens or closes a details element

onvolumechange: NotRequired[str]

Script to be run each time the volume is changed

onwaiting: NotRequired[str]

Script to be run when the media has paused but is expected to resume

onwheel: NotRequired[str]

Script to be run when the mouse wheel rolls up or down over an element

spellcheck: NotRequired[Literal['true', 'false']]

Specifies whether the element is to have its spelling and grammar checked or not

style: NotRequired[str]

Specifies an inline CSS style for an element

tabindex: NotRequired[int]

Specifies the tabbing order of an element

title: NotRequired[str]

Specifies extra information about an element (displayed as a tooltip)

translate: NotRequired[Literal['yes', 'no']]

Specifies whether the content of an element should be translated or not

class ImplicitDefault

Bases: str

Sentinel class to mark a default value in an HTML node as “implicit”, and thus does not need to be included in the rendered output.

a(child_text: str = '', /, *, data: dict[str, str] | None = None, href: str | None = None, target: Literal['_blank', '_self', '_parent', '_top'] | ImplicitDefault = '_self', download: str | None = None, rel: str | None = None, hreflang: str | None = None, type: str | None = None, referrerpolicy: Literal['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] | None = None, ping: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a hyperlink that links to another page or location within the same page

abbr(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines an abbreviation or acronym, optionally with its expansion

address(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines contact information for the author/owner of a document or article

area(child_text: str = '', /, *, data: dict[str, str] | None = None, alt: str | None, coords: str | None = None, shape: Literal['default', 'rect', 'circle', 'poly'] | ImplicitDefault = 'rect', href: str | None = None, target: Literal['_blank', '_self', '_parent', '_top'] | None = None, download: str | None = None, rel: str | None = None, referrerpolicy: Literal['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] | None = None, ping: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a clickable area inside an image map

article(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines independent, self-contained content that could be distributed independently

aside(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines content aside from the main content (like a sidebar)

audio(child_text: str = '', /, *, data: dict[str, str] | None = None, src: str | None = None, controls: bool = False, autoplay: bool = False, loop: bool = False, muted: bool = False, preload: Literal['auto', 'metadata', 'none'] | ImplicitDefault = 'auto', crossorigin: Literal['anonymous', 'use-credentials'] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds sound content in documents

b(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines bold text without extra importance (use <strong> for importance)

base(*, data: dict[str, str] | None = None, href: str | None = None, target: Literal['_blank', '_self', '_parent', '_top'] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Specifies the base URL and/or target for all relative URLs in a document

bdi(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Isolates text that might be formatted in a different direction from other text

bdo(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Overrides the current text direction

blockquote(child_text: str = '', /, *, data: dict[str, str] | None = None, cite: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a section that is quoted from another source

body(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines the document’s body, containing all visible contents

br(*, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Inserts a single line break

button(child_text: str = '', /, *, data: dict[str, str] | None = None, type: Literal['button', 'submit', 'reset'] | ImplicitDefault = 'submit', name: str | None = None, value: str | None = None, disabled: bool = False, form: str | None = None, formaction: str | None = None, formenctype: Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] | None = None, formmethod: Literal['get', 'post'] | None = None, formnovalidate: bool = False, formtarget: Literal['_blank', '_self', '_parent', '_top'] | None = None, autofocus: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a clickable button

canvas(child_text: str = '', /, *, data: dict[str, str] | None = None, width: int | ImplicitDefault = '300', height: int | ImplicitDefault = '150', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Provides a container for graphics that can be drawn using JavaScript

caption(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a table caption

cite(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines the title of a creative work (book, movie, song, etc.)

code(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a piece of computer code

col(*, data: dict[str, str] | None = None, span: int | ImplicitDefault = '1', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Specifies column properties for each column within a <colgroup> element

colgroup(child_text: str = '', /, *, data: dict[str, str] | None = None, span: int | ImplicitDefault = '1', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Specifies a group of one or more columns in a table for formatting

data(child_text: str = '', /, *, data: dict[str, str] | None = None, value: str | None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Links content with a machine-readable translation

datalist(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Contains a set of <option> elements that represent predefined options for input controls

dd(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a description/value of a term in a description list

del_(child_text: str = '', /, *, data: dict[str, str] | None = None, cite: str | None = None, datetime: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines text that has been deleted from a document

details(child_text: str = '', /, *, data: dict[str, str] | None = None, open: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines additional details that the user can view or hide

dfn(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Represents the defining instance of a term

dialog(child_text: str = '', /, *, data: dict[str, str] | None = None, open: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a dialog box or window

div(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a generic container for flow content with no semantic meaning

dl(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a description list

dt(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a term/name in a description list

em(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines emphasized text (typically displayed in italic)

embed(*, data: dict[str, str] | None = None, src: str | None, type: str | None = None, width: int | None = None, height: int | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds external content at the specified point in the document

fieldset(child_text: str = '', /, *, data: dict[str, str] | None = None, disabled: bool = False, form: str | None = None, name: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Groups related elements in a form and draws a box around them

figcaption(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a caption for a <figure> element

figure(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.

footer(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a footer for a document or section

form(child_text: str = '', /, *, data: dict[str, str] | None = None, action: str | None = None, method: Literal['get', 'post', 'dialog'] | ImplicitDefault = 'get', enctype: Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] | ImplicitDefault = 'application/x-www-form-urlencoded', name: str | None = None, target: Literal['_blank', '_self', '_parent', '_top'] | None = None, autocomplete: Literal['on', 'off'] | ImplicitDefault = 'on', novalidate: bool = False, accept_charset: str | None = None, rel: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Creates an HTML form for user input

h1(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines the most important heading (level 1)

h2(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a level 2 heading

h3(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a level 3 heading

h4(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a level 4 heading

h5(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a level 5 heading

h6(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines the least important heading (level 6)

head(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Contains metadata and information about the document

header(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a header for a document or section, typically containing introductory content

hgroup(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Groups a set of h1-h6 elements when a heading has multiple levels

hr(*, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a thematic break or horizontal rule in content

html(child_text: str = '', /, *, data: dict[str, str] | None = None, xmlns: str = 'http://www.w3.org/1999/xhtml', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Represents the root element of an HTML document

i(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines italic text, typically used for technical terms, foreign phrases, etc.

iframe(child_text: str = '', /, *, data: dict[str, str] | None = None, src: str | None = None, srcdoc: str | None = None, name: str | None = None, sandbox: str | None = None, allow: str | None = None, allowfullscreen: bool = False, width: int | None = None, height: int | None = None, referrerpolicy: Literal['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] | None = None, loading: Literal['eager', 'lazy'] | ImplicitDefault = 'eager', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds another HTML page within the current page

img(*, data: dict[str, str] | None = None, src: str | None, alt: str | None, width: int | None = None, height: int | None = None, srcset: str | None = None, sizes: str | None = None, crossorigin: Literal['anonymous', 'use-credentials'] | None = None, usemap: str | None = None, ismap: bool = False, loading: Literal['eager', 'lazy'] | ImplicitDefault = 'eager', decoding: Literal['sync', 'async', 'auto'] | ImplicitDefault = 'auto', referrerpolicy: Literal['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds an image in the document

input(*, data: dict[str, str] | None = None, type: Literal['button', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'range', 'reset', 'search', 'submit', 'tel', 'text', 'time', 'url', 'week'] | ImplicitDefault = 'text', name: str | None = None, value: str | None = None, placeholder: str | None = None, required: bool = False, readonly: bool = False, disabled: bool = False, checked: bool = False, autocomplete: Literal['on', 'off', 'name', 'email', 'username', 'new-password', 'current-password', 'tel', 'url', 'street-address', 'postal-code', 'cc-number'] | None = None, autofocus: bool = False, min: str | None = None, max: str | None = None, step: str | None = None, minlength: int | None = None, maxlength: int | None = None, pattern: str | None = None, size: int | None = None, multiple: bool = False, accept: str | None = None, src: str | None = None, alt: str | None = None, width: int | None = None, height: int | None = None, list: str | None = None, form: str | None = None, formaction: str | None = None, formenctype: Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] | None = None, formmethod: Literal['get', 'post'] | None = None, formnovalidate: bool = False, formtarget: Literal['_blank', '_self', '_parent', '_top'] | None = None, capture: Literal['user', 'environment'] | None = None, dirname: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Creates an interactive control for user input within a form

ins(child_text: str = '', /, *, data: dict[str, str] | None = None, cite: str | None = None, datetime: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines text that has been inserted into a document

kbd(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines keyboard input

label(child_text: str = '', /, *, data: dict[str, str] | None = None, for_: str | None = None, form: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a label for an input element

legend(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a caption for a fieldset element

li(child_text: str = '', /, *, data: dict[str, str] | None = None, value: int | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a list item

Defines the relationship between the current document and an external resource

main(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Specifies the main content of the document

map(child_text: str = '', /, *, data: dict[str, str] | None = None, name: str | None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a client-side image map

mark(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines marked/highlighted text

meta(*, data: dict[str, str] | None = None, name: str | None = None, content: str | None = None, charset: str | None = None, http_equiv: Literal['content-security-policy', 'content-type', 'default-style', 'refresh'] | None = None, property: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Provides metadata about the HTML document

meter(child_text: str = '', /, *, data: dict[str, str] | None = None, value: int | None, min: int = 0, max: int = 1, low: int | None = None, high: int | None = None, optimum: int | None = None, form: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a scalar measurement within a known range (a gauge)

nav(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a section of navigation links

noscript(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines alternate content for users that have disabled scripts or don’t support scripting

object(child_text: str = '', /, *, data: dict[str, str] | None = None, data_: str | None = None, type: str | None = None, name: str | None = None, usemap: str | None = None, form: str | None = None, width: int | None = None, height: int | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds an external resource such as an image, video, audio, PDF, or Flash

ol(child_text: str = '', /, *, data: dict[str, str] | None = None, reversed: bool = False, start: int | None = None, type: Literal['1', 'A', 'a', 'I', 'i'] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines an ordered (numbered) list

optgroup(child_text: str = '', /, *, data: dict[str, str] | None = None, label: str | None, disabled: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Groups related options in a drop-down list

option(child_text: str = '', /, *, data: dict[str, str] | None = None, value: str | None = None, label: str | None = None, selected: bool = False, disabled: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines an option in a drop-down list

output(child_text: str = '', /, *, data: dict[str, str] | None = None, for_: str | None = None, form: str | None = None, name: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Represents the result of a calculation or user action

p(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a paragraph

param(*, data: dict[str, str] | None = None, name: str | None, value: str | None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines parameters for an object element

picture(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Contains multiple image sources, allowing for different images in different scenarios

pre(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines preformatted text that preserves spaces and line breaks

progress(child_text: str = '', /, *, data: dict[str, str] | None = None, value: int | None = None, max: int | ImplicitDefault = '1', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Represents the progress of a task

q(child_text: str = '', /, *, data: dict[str, str] | None = None, cite: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a short inline quotation

rp(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines what to show in browsers that do not support ruby annotations

rt(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines an explanation/pronunciation of characters (for East Asian typography)

ruby(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a ruby annotation (for East Asian typography)

s(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines text that is no longer correct or relevant (strikethrough)

samp(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines sample output from a computer program

script(child_text: str = '', /, *, data: dict[str, str] | None = None, src: str | None = None, type: str = 'text/javascript', async_: bool = False, defer: bool = False, crossorigin: Literal['anonymous', 'use-credentials'] | None = None, integrity: str | None = None, referrerpolicy: Literal['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] | None = None, nomodule: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds or references executable code, typically JavaScript

section(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a thematic grouping of content, typically with a heading

select(child_text: str = '', /, *, data: dict[str, str] | None = None, name: str | None = None, multiple: bool = False, required: bool = False, disabled: bool = False, size: int | None = None, autofocus: bool = False, form: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Creates a drop-down list

slot(child_text: str = '', /, *, data: dict[str, str] | None = None, name: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a slot in a web component that can be filled with markup

small(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines smaller text (like copyright and other side-comments)

span(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines an inline container with no semantic meaning, used for styling or scripting

strong(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines important text with strong importance (typically bold)

style(child_text: str = '', /, *, data: dict[str, str] | None = None, media: str | None = None, type: str = 'text/css', **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Contains style information (CSS) for a document

sub(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines subscript text

summary(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a visible heading for a details element

sup(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines superscript text

table(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a table

tbody(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Groups the body content in a table

td(child_text: str = '', /, *, data: dict[str, str] | None = None, colspan: int | ImplicitDefault = '1', rowspan: int | ImplicitDefault = '1', headers: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a standard data cell in a table

template(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a container for content that should not be rendered when the page loads

textarea(child_text: str = '', /, *, data: dict[str, str] | None = None, name: str | None = None, rows: int | None = None, cols: int | None = None, placeholder: str | None = None, required: bool = False, readonly: bool = False, disabled: bool = False, maxlength: int | None = None, minlength: int | None = None, wrap: Literal['hard', 'soft'] | ImplicitDefault = 'soft', autocomplete: Literal['on', 'off'] | None = None, autofocus: bool = False, form: str | None = None, dirname: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a multi-line text input control

tfoot(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Groups the footer content in a table

th(child_text: str = '', /, *, data: dict[str, str] | None = None, colspan: int | ImplicitDefault = '1', rowspan: int | ImplicitDefault = '1', headers: str | None = None, scope: Literal['col', 'row', 'colgroup', 'rowgroup'] | None = None, abbr: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a header cell in a table

thead(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Groups the header content in a table

time(child_text: str = '', /, *, data: dict[str, str] | None = None, datetime: str | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a specific time (or datetime)

title(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines the title of the document (shown in browser’s title bar or tab)

tr(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a row in a table

track(*, data: dict[str, str] | None = None, kind: Literal['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'] | ImplicitDefault = 'subtitles', src: str | None, srclang: str | None = None, label: str | None = None, default: bool = False, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines text tracks for media elements (video and audio)

u(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines text with an unarticulated, non-textual annotation (typically underlined)

ul(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines an unordered (bulleted) list

var(child_text: str = '', /, *, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a variable in programming or mathematical contexts

video(child_text: str = '', /, *, data: dict[str, str] | None = None, src: str | None = None, controls: bool = False, width: int | None = None, height: int | None = None, autoplay: bool = False, loop: bool = False, muted: bool = False, preload: Literal['auto', 'metadata', 'none'] | ImplicitDefault = 'auto', poster: str | None = None, playsinline: bool = False, crossorigin: Literal['anonymous', 'use-credentials'] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Embeds video content in the document

wbr(*, data: dict[str, str] | None = None, **global_attributes: Unpack[GlobalAttributes]) HTMLNode

Defines a possible line-break opportunity in text