Skip to content

Tags T-Z

Easy to write and performant HTML content generation using Python classes to render HTML.

Td

Td(
    *children,
    colspan=None,
    rowspan=None,
    headers=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: BaseTag

Defines a cell in a table

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
colspan str | None

Defines the number of columns a cell should span.

None
rowspan str | None

Defines the number of rows a cell should span.

None
headers str | None

list of string ids of the <th> elements that apply to the cell

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
def __init__(
    self,
    *children: Renderable,
    colspan: str | None = None,
    rowspan: str | None = None,
    headers: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))

Template

Template(
    *children,
    shadowrootmode=None,
    shadowrootdelegatesfocus=None,
    shadowrootclonable=None,
    shadowrootserializable=None,
    class_=None,
    id_=None,
    **custom_attributes,
)

Bases: BaseTag

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

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
shadowrootmode str | None

Creates a shadow root for the parent element.

None
shadowrootdelegatesfocus str | None

Sets whether the shadow root created delegates focus.

None
shadowrootclonable str | None

Sets the value of the 'cloneable' property on the shadow root.

None
shadowrootserializable str | None

Sets the value of the 'serializable' property on the shadow root.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
def __init__(
    self,
    *children: Renderable,
    shadowrootmode: str | None = None,
    shadowrootdelegatesfocus: str | None = None,
    shadowrootclonable: str | None = None,
    shadowrootserializable: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))

Textarea

Textarea(
    *children,
    autocapitalize=None,
    autocomplete=None,
    autocorrect=None,
    autofocus=None,
    cols=None,
    dirname=None,
    disabled=None,
    form=None,
    maxlength=None,
    minlength=None,
    name=None,
    placeholder=None,
    readonly=None,
    required=None,
    rows=None,
    spellcheck=None,
    wrap=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: BaseTag

Defines a multiline input control (text area)

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
autocapitalize str | None

Determines whether inputted text is automatically capitalized.

None
autocomplete str | None

Controls whether inputted text can be automatically completed by the browser.

None
autocorrect str | None

Controls whether autocorrect is enabled on the input text.

None
autofocus bool | None

Indicates that the text area should have input focus when the page loads.

None
cols str | None

Defines the visible width of the text area in average character widths.

None
dirname str | None

Indicates text directionality of the element contents.

None
disabled bool | None

Determines if the user can interact with the text area.

None
form str | None

Associates the text area with a form element.

None
maxlength str | None

Defines the maximum number of characters allowed in the text area.

None
minlength str | None

Defines the minimum number of characters required in the text area.

None
name str | None

The name of the element.

None
placeholder str | None

Provides a hint to the user of what can be entered in the text area.

None
readonly bool | None

Indicates that the user may not edit the value of the text area.

None
required bool | None

Specifies that the text area must be filled out before submitting the form.

None
rows str | None

Defines the visible number of lines for the control.

None
spellcheck str | None

Specifies if the element is subject to browser or OS spell-check.

None
wrap str | None

Indicates how the text area handles line wrapping.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
def __init__(
    self,
    *children: Renderable,
    autocapitalize: str | None = None,
    autocomplete: str | None = None,
    autocorrect: str | None = None,
    autofocus: bool | None = None,
    cols: str | None = None,
    dirname: str | None = None,
    disabled: bool | None = None,
    form: str | None = None,
    maxlength: str | None = None,
    minlength: str | None = None,
    name: str | None = None,
    placeholder: str | None = None,
    readonly: bool | None = None,
    required: bool | None = None,
    rows: str | None = None,
    spellcheck: str | None = None,
    wrap: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))

Th

Th(
    *children,
    abbr=None,
    colspan=None,
    headers=None,
    rowspan=None,
    scope=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: BaseTag

Defines a header cell in a table

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
abbr str | None

An abbreviated description of the header cell content.

None
colspan str | None

Defines the number of columns a header cell should span.

None
headers str | None

list of string ids of the <th> elements that provide the headers for the cell.

None
rowspan str | None

Defines the number of rows a header cell should span.

None
scope str | None

Specifies whether the header cell is a header for a column, row, or group of columns or rows.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
def __init__(
    self,
    *children: Renderable,
    abbr: str | None = None,
    colspan: str | None = None,
    headers: str | None = None,
    rowspan: str | None = None,
    scope: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))

Time

Time(
    *children,
    datetime=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: BaseTag

Defines a specific time (or datetime)

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
datetime str | None

Specifies the date and/or time format.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
def __init__(
    self,
    *children: Renderable,
    datetime: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))

Track

Track(
    *,
    default=None,
    kind=None,
    label=None,
    srclang=None,
    src=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: SelfClosingTag

Defines text tracks for media elements (

Parameters:

Name Type Description Default
default str | None

Indicates that the track is to be enabled if the user's preferences do not indicate any.

None
kind str | None

Specifies how the text track is meant to be used.

None
label str | None

Provides a user-readable title for the text track.

None
srclang str | None

Specifies the language of the text track data.

None
src str | None

Specifies the URL of the track file.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
def __init__(
    self,
    *,
    default: str | None = None,
    kind: str | None = None,
    label: str | None = None,
    srclang: str | None = None,
    src: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(**custom_attributes | locals_cleanup(locals()))

U

U(
    *children,
    compact=None,
    type_=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: BaseTag

Defines some text that is unarticulated and styled differently from normal text

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
compact str | None

Specifies that the list should be rendered in a compact style.

None
type_ str | None

Specifies the kind of marker to use in the list.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
def __init__(
    self,
    *children: Renderable,
    compact: str | None = None,
    type_: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))

Video

Video(
    *children,
    src=None,
    autoplay=None,
    controls=None,
    controlslist=None,
    crossorigin=None,
    disablepictureinpicture=None,
    disableremoteplayback=None,
    height=None,
    width=None,
    loop=None,
    muted=None,
    playsinline=None,
    poster=None,
    preload=None,
    class_=None,
    id_=None,
    style=None,
    **custom_attributes,
)

Bases: BaseTag

Defines embedded video content

Parameters:

Name Type Description Default
children Renderable

Tags, strings, or other rendered content.

()
src str | None

Specifies the URL of the video file.

None
autoplay str | None

Specifies that the video will start playing as soon as it is ready.

None
controls str | None

Specifies that video controls should be displayed (such as a play/pause button etc).

None
controlslist str | None

Specifies which controls to show on the media element.

None
crossorigin str | None

Specifies how the element handles cross-origin requests.

None
disablepictureinpicture str | None

Prevents the browser from suggesting a Picture-in-Picture context menu.

None
disableremoteplayback str | None

Disables the capability of remote playback on devices.

None
height str | int | None

Specifies the height of the video player.

None
width str | int | None

Specifies the width of the video player.

None
loop str | None

Specifies that the video will start over again, every time it is finished.

None
muted str | None

Specifies that the audio output of the video should be muted.

None
playsinline str | None

Indicates that the video is to be played inline.

None
poster str | None

Specifies an image to be shown while the video is downloading.

None
preload str | None

Specifies if and how the author thinks the video should be loaded when the page loads.

None
class_ str | None

Substituted as the DOM class attribute.

None
id_ str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
custom_attributes AttributeType

Keyword arguments transformed into tag attributes.

{}
Source code in src/air/tags/models/stock.py
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
def __init__(
    self,
    *children: Renderable,
    src: str | None = None,
    autoplay: str | None = None,
    controls: str | None = None,
    controlslist: str | None = None,
    crossorigin: str | None = None,
    disablepictureinpicture: str | None = None,
    disableremoteplayback: str | None = None,
    height: str | int | None = None,
    width: str | int | None = None,
    loop: str | None = None,
    muted: str | None = None,
    playsinline: str | None = None,
    poster: str | None = None,
    preload: str | None = None,
    class_: str | None = None,
    id_: str | None = None,
    style: str | None = None,
    **custom_attributes: AttributeType,
) -> None:
    super().__init__(*children, **custom_attributes | locals_cleanup(locals()))