Typed HTML
A typed layer over raw HTML elements.
The html module provides a typed layer over the raw html.elem function
that allows you to conveniently create HTML elements. HTML attributes are
exposed as function parameters that accept Typst types and automatically
take care of converting those into the appropriate HTML.
Some parameters are common to all typed HTML functions. These are listed at the bottom in the Global Attributes section instead of explicitly on each element for readability.
Example
#html.video(
controls: true,
width: 1280,
height: 720,
src: "sunrise.mp4",
)[
Your browser does not support the video tag.
]
Function
a
Hyperlink.
download
Whether to download the resource instead of navigating to it, and its filename if so.
href
Address of the hyperlink.
hreflang
Language of the linked resource.
referrerpolicy
Referrer policy for fetches initiated by the element.
Available string values
no-referrerno-referrer-when-downgradesame-originoriginstrict-originorigin-when-cross-originstrict-origin-when-cross-originunsafe-url
rel
Relationship between the location in the document containing the hyperlink and the destination resource.
Available string values
alternatecanonicalauthorbookmarkdns-prefetchexpectexternalhelpiconmanifestmodulepreloadlicensenextnofollownoopenernoreferreropenerpingbackpreconnectprefetchpreloadprevprivacy-policysearchstylesheettagterms-of-service
type
Hint for the type of the referenced resource.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
abbr
Abbreviation.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
address
Contact information for a page or article element.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
area
Hyperlink or dead area on an image map.
alt
Replacement text for use when images are not available.
coords
Coordinates for the shape to be created in an image map. Expects an array of floating point numbers.
download
Whether to download the resource instead of navigating to it, and its filename if so.
href
Address of the hyperlink.
referrerpolicy
Referrer policy for fetches initiated by the element.
Available string values
no-referrerno-referrer-when-downgradesame-originoriginstrict-originorigin-when-cross-originstrict-origin-when-cross-originunsafe-url
rel
Relationship between the location in the document containing the hyperlink and the destination resource.
Available string values
alternatecanonicalauthorbookmarkdns-prefetchexpectexternalhelpiconmanifestmodulepreloadlicensenextnofollownoopenernoreferreropenerpingbackpreconnectprefetchpreloadprevprivacy-policysearchstylesheettagterms-of-service
shape
The kind of shape to be created in an image map.
Available string values
circledefaultpolyrect
article
Self-contained syndicatable or reusable composition.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
aside
Sidebar for tangentially related content.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
audio
Audio player.
autoplay
Hint that the media resource can be started automatically when the page is loaded.
controls
Show user agent controls.
crossorigin
How the element handles crossorigin requests.
Available string values
anonymoususe-credentials
loop
Whether to loop the media resource.
muted
Whether to mute the media resource by default.
preload
Hints how much buffering the media resource will likely need.
Available string values
metadata
src
Address of the resource.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
b
Keywords.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
base
Base URL and default target navigable for hyperlinks and forms.
bdi
Text directionality isolation.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
bdo
Text directionality formatting.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
blockquote
A section quoted from another source.
body
Document body.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
button
Button control.
command
Indicates to the targeted element which action to take.
Available string values
toggle-popovershow-popoverhide-popovercloserequest-closeshow-modal
commandfor
Targets another element to be invoked.
disabled
Whether the form control is disabled.
form
Associates the element with a form element.
formaction
URL to use for form submission.
formenctype
Entry list encoding type to use for form submission.
Available string values
application/x-www-form-urlencodedmultipart/form-datatext/plain
formnovalidate
Bypass form control validation for form submission.
name
Name of the element to use for form submission and in the form.elements API.
popovertarget
Targets a popover element to toggle, show, or hide.
popovertargetaction
Indicates whether a targeted popover element is to be toggled, shown, or hidden.
Available string values
toggleshowhide
value
Value to be used for form submission.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
canvas
Scriptable bitmap canvas.
caption
Table caption.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
cite
Title of a work.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
code
Computer code.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
colgroup
Group of columns in a table.
data
Machine-readable equivalent.
datalist
Container for options for combo box control.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
dd
Content for corresponding dt element(s).
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
del
A removal from the document.
details
Disclosure control for hiding details.
dfn
Defining instance.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
dialog
Dialog box or window.
div
Generic flow container, or container for name-value groups in dl elements.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
dl
Association list consisting of zero or more name-value groups.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
dt
Legend for corresponding dd element(s).
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
em
Stress emphasis.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
embed
Plugin.
fieldset
Group of form controls.
disabled
Whether the descendant form controls, except any inside legend, are disabled.
form
Associates the element with a form element.
name
Name of the element to use for form submission and in the form.elements API.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
figcaption
Caption for figure.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
figure
Figure with optional caption.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
footer
Footer for a page or section.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
form
User-submittable form.
action
URL to use for form submission.
autocomplete
Default setting for autofill feature for controls in the form.
enctype
Entry list encoding type to use for form submission.
Available string values
application/x-www-form-urlencodedmultipart/form-datatext/plain
name
Name of form to use in the document.forms API.
novalidate
Bypass form control validation for form submission.
rel
Relationship between the document containing the form and its action destination
Available string values
alternatecanonicalauthorbookmarkdns-prefetchexpectexternalhelpiconmanifestmodulepreloadlicensenextnofollownoopenernoreferreropenerpingbackpreconnectprefetchpreloadprevprivacy-policysearchstylesheettagterms-of-service
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
h1
Heading.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
h2
Heading.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
h3
Heading.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
h4
Heading.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
h5
Heading.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
h6
Heading.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
head
Container for document metadata.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
header
Introductory or navigational aids for a page or section.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
hgroup
Heading container.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
html
Root element.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
i
Alternate voice.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
iframe
Child navigable.
allow
Permissions policy to be applied to the iframe's contents.
allowfullscreen
Whether to allow the iframe's contents to use requestFullscreen().
height
Vertical dimension.
referrerpolicy
Referrer policy for fetches initiated by the element.
Available string values
no-referrerno-referrer-when-downgradesame-originoriginstrict-originorigin-when-cross-originstrict-origin-when-cross-originunsafe-url
sandbox
Security rules for nested content.
Available string values
allow-downloadsallow-formsallow-modalsallow-orientation-lockallow-pointer-lockallow-popupsallow-popups-to-escape-sandboxallow-presentationallow-same-originallow-scriptsallow-top-navigationallow-top-navigation-by-user-activationallow-top-navigation-to-custom-protocols
src
Address of the resource.
srcdoc
A document to render in the iframe.
width
Horizontal dimension.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
img
Image.
alt
Replacement text for use when images are not available.
crossorigin
How the element handles crossorigin requests.
Available string values
anonymoususe-credentials
decoding
Decoding hint to use when processing this image for presentation.
Available string values
syncasync
fetchpriority
Sets the priority for fetches initiated by the element.
Available string values
highlow
height
Vertical dimension.
ismap
Whether the image is a server-side image map.
referrerpolicy
Referrer policy for fetches initiated by the element.
Available string values
no-referrerno-referrer-when-downgradesame-originoriginstrict-originorigin-when-cross-originstrict-origin-when-cross-originunsafe-url
sizes
Image sizes for different page layouts. Expects an array of dictionaries with the keys condition (string) and size (length).
src
Address of the resource.
srcset
Images to use in different situations, e.g., high-resolution displays, small monitors, etc. Expects an array of dictionaries with the keys src (string) and width (integer) or density (float).
usemap
Name of image map to use.
width
Horizontal dimension.
input
Form control.
alpha
Allow the color's alpha component to be set.
alt
Replacement text for use when images are not available.
autocomplete
Hint for form autofill feature.
Available string values
shippingbillingnamehonorific-prefixgiven-nameadditional-namefamily-namehonorific-suffixnicknameusernamenew-passwordcurrent-passwordone-time-codeorganization-titleorganizationstreet-addressaddress-line1address-line2address-line3address-level4address-level3address-level2address-level1countrycountry-namepostal-codecc-namecc-given-namecc-additional-namecc-family-namecc-numbercc-expcc-exp-monthcc-exp-yearcc-csccc-typetransaction-currencytransaction-amountlanguagebdaybday-daybday-monthbday-yearsexurlphotohomeworkmobilefaxpagerteltel-country-codetel-nationaltel-area-codetel-localtel-local-prefixtel-local-suffixtel-extensionemailimpp
checked
Whether the control is checked.
dirname
Name of form control to use for sending the element's directionality in form submission.
disabled
Whether the form control is disabled.
form
Associates the element with a form element.
formaction
URL to use for form submission.
formenctype
Entry list encoding type to use for form submission.
Available string values
application/x-www-form-urlencodedmultipart/form-datatext/plain
formnovalidate
Bypass form control validation for form submission.
height
Vertical dimension.
list
List of autocomplete options.
maxlength
Maximum length of value.
minlength
Minimum length of value.
multiple
Whether to allow multiple values.
name
Name of the element to use for form submission and in the form.elements API.
pattern
Pattern to be matched by the form control's value.
placeholder
User-visible label to be placed within the form control.
popovertarget
Targets a popover element to toggle, show, or hide.
popovertargetaction
Indicates whether a targeted popover element is to be toggled, shown, or hidden.
Available string values
toggleshowhide
readonly
Whether to allow the value to be edited by the user.
required
Whether the control is required for form submission.
size
Size of the control.
src
Address of the resource.
type
Type of form control.
Available string values
hiddentextsearchtelurlemailpassworddatemonthweektimedatetime-localnumberrangecolorcheckboxradiofilesubmitimageresetbutton
width
Horizontal dimension.
ins
An addition to the document.
kbd
User input.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
label
Caption for a form control.
legend
Caption for fieldset.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
li
List item.
link
Link metadata.
as
Potential destination for a preload request (for rel="preload" and rel="modulepreload").
Available string values
audioaudioworkletdocumentembedfontframeiframeimagejsonmanifestobjectpaintworkletreportscriptserviceworkersharedworkerstyletrackvideowebidentityworkerxslt
color
Color to use when customizing a site's icon (for rel="mask-icon").
crossorigin
How the element handles crossorigin requests.
Available string values
anonymoususe-credentials
disabled
Whether the link is disabled.
fetchpriority
Sets the priority for fetches initiated by the element.
Available string values
highlow
href
Address of the hyperlink.
hreflang
Language of the linked resource.
imagesizes
Image sizes for different page layouts (for rel="preload"). Expects an array of dictionaries with the keys condition (string) and size (length).
imagesrcset
Images to use in different situations, e.g., high-resolution displays, small monitors, etc. (for rel="preload"). Expects an array of dictionaries with the keys src (string) and width (integer) or density (float).
integrity
Integrity metadata used in Subresource Integrity checks.
media
Applicable media.
referrerpolicy
Referrer policy for fetches initiated by the element.
Available string values
no-referrerno-referrer-when-downgradesame-originoriginstrict-originorigin-when-cross-originstrict-origin-when-cross-originunsafe-url
rel
Relationship between the document containing the hyperlink and the destination resource.
Available string values
alternatecanonicalauthorbookmarkdns-prefetchexpectexternalhelpiconmanifestmodulepreloadlicensenextnofollownoopenernoreferreropenerpingbackpreconnectprefetchpreloadprevprivacy-policysearchstylesheettagterms-of-service
sizes
Sizes of the icons (for rel="icon"). Expects an array of sizes. Each size is specified as an array of two integers (width and height).
type
Hint for the type of the referenced resource.
main
Container for the dominant contents of the document.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
map
Image map.
mark
Highlight.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
menu
Menu of commands.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
meta
Text metadata.
meter
Gauge.
high
Low limit of high range.
low
High limit of low range.
max
Upper bound of range.
min
Lower bound of range.
optimum
Optimum value in gauge.
value
Current value of the element.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
nav
Section with navigational links.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
noscript
Fallback content for script.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
object
Image, child navigable, or plugin.
data
Address of the resource.
form
Associates the element with a form element.
height
Vertical dimension.
type
Type of embedded resource.
width
Horizontal dimension.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
ol
Ordered list.
optgroup
Group of options in a list box.
option
Option in a list box or combo box control.
disabled
Whether the form control is disabled.
label
User-visible label.
selected
Whether the option is selected by default.
value
Value to be used for form submission.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
output
Calculated output value.
form
Associates the element with a form element.
name
Name of the element to use for form submission and in the form.elements API.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
p
Paragraph.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
picture
Image.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
pre
Block of preformatted text.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
progress
Progress bar.
q
Quotation.
rp
Parenthesis for ruby annotation text.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
rt
Ruby annotation text.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
ruby
Ruby annotation(s).
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
s
Inaccurate text.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
samp
Computer output.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
script
Embedded script.
async
Execute script when available, without blocking while fetching.
crossorigin
How the element handles crossorigin requests.
Available string values
anonymoususe-credentials
defer
Defer script execution.
fetchpriority
Sets the priority for fetches initiated by the element.
Available string values
highlow
integrity
Integrity metadata used in Subresource Integrity checks.
nomodule
Prevents execution in user agents that support module scripts.
referrerpolicy
Referrer policy for fetches initiated by the element.
Available string values
no-referrerno-referrer-when-downgradesame-originoriginstrict-originorigin-when-cross-originstrict-origin-when-cross-originunsafe-url
src
Address of the resource.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
search
Container for search controls.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
section
Generic document or application section.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
select
List box control.
autocomplete
Hint for form autofill feature.
Available string values
shippingbillingnamehonorific-prefixgiven-nameadditional-namefamily-namehonorific-suffixnicknameusernamenew-passwordcurrent-passwordone-time-codeorganization-titleorganizationstreet-addressaddress-line1address-line2address-line3address-level4address-level3address-level2address-level1countrycountry-namepostal-codecc-namecc-given-namecc-additional-namecc-family-namecc-numbercc-expcc-exp-monthcc-exp-yearcc-csccc-typetransaction-currencytransaction-amountlanguagebdaybday-daybday-monthbday-yearsexurlphotohomeworkmobilefaxpagerteltel-country-codetel-nationaltel-area-codetel-localtel-local-prefixtel-local-suffixtel-extensionemailimpp
disabled
Whether the form control is disabled.
form
Associates the element with a form element.
multiple
Whether to allow multiple values.
name
Name of the element to use for form submission and in the form.elements API.
required
Whether the control is required for form submission.
size
Size of the control.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
slot
Shadow tree slot.
small
Side comment.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
source
Image source for img or media source for video or audio.
height
Vertical dimension.
media
Applicable media.
sizes
Image sizes for different page layouts. Expects an array of dictionaries with the keys condition (string) and size (length).
src
Address of the resource.
srcset
Images to use in different situations, e.g., high-resolution displays, small monitors, etc. Expects an array of dictionaries with the keys src (string) and width (integer) or density (float).
type
Type of embedded resource.
width
Horizontal dimension.
span
Generic phrasing container.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
strong
Importance.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
style
Embedded styling information.
sub
Subscript.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
summary
Caption for details.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
sup
Superscript.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
table
Table.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
tbody
Group of rows in a table.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
td
Table cell.
colspan
Number of columns that the cell is to span.
rowspan
Number of rows that the cell is to span.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
template
Template.
shadowrootclonable
Sets clonable on a declarative shadow root.
shadowrootcustomelementregistry
Enables declarative shadow roots to indicate they will use a custom element registry.
shadowrootdelegatesfocus
Sets delegates focus on a declarative shadow root.
shadowrootserializable
Sets serializable on a declarative shadow root.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
textarea
Multiline text controls.
autocomplete
Hint for form autofill feature.
Available string values
shippingbillingnamehonorific-prefixgiven-nameadditional-namefamily-namehonorific-suffixnicknameusernamenew-passwordcurrent-passwordone-time-codeorganization-titleorganizationstreet-addressaddress-line1address-line2address-line3address-level4address-level3address-level2address-level1countrycountry-namepostal-codecc-namecc-given-namecc-additional-namecc-family-namecc-numbercc-expcc-exp-monthcc-exp-yearcc-csccc-typetransaction-currencytransaction-amountlanguagebdaybday-daybday-monthbday-yearsexurlphotohomeworkmobilefaxpagerteltel-country-codetel-nationaltel-area-codetel-localtel-local-prefixtel-local-suffixtel-extensionemailimpp
cols
Maximum number of characters per line.
dirname
Name of form control to use for sending the element's directionality in form submission.
disabled
Whether the form control is disabled.
form
Associates the element with a form element.
maxlength
Maximum length of value.
minlength
Minimum length of value.
name
Name of the element to use for form submission and in the form.elements API.
placeholder
User-visible label to be placed within the form control.
readonly
Whether to allow the value to be edited by the user.
required
Whether the control is required for form submission.
rows
Number of lines to show.
wrap
How the value of the form control is to be wrapped for form submission.
Available string values
softhard
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
tfoot
Group of footer rows in a table.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
th
Table header cell.
abbr
Alternative label to use for the header cell when referencing the cell in other contexts.
colspan
Number of columns that the cell is to span.
rowspan
Number of rows that the cell is to span.
scope
Specifies which cells the header cell applies to.
Available string values
rowcolrowgroupcolgroup
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
thead
Group of heading rows in a table.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
time
Machine-readable equivalent of date- or time-related data.
title
Document title.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
tr
Table row.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
track
Timed text track.
u
Unarticulated annotation.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
ul
List.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
var
Variable.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
video
Video player.
autoplay
Hint that the media resource can be started automatically when the page is loaded.
controls
Show user agent controls.
crossorigin
How the element handles crossorigin requests.
Available string values
anonymoususe-credentials
height
Vertical dimension.
loop
Whether to loop the media resource.
muted
Whether to mute the media resource by default.
playsinline
Encourage the user agent to display video content within the element's playback area.
poster
Poster frame to show prior to video playback.
preload
Hints how much buffering the media resource will likely need.
Available string values
metadata
src
Address of the resource.
width
Horizontal dimension.
bodyPositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
The contents of the HTML element.
Global Attributes
accesskey
Keyboard shortcut to activate or focus element. Expects a single-codepoint string or an array thereof.
aria-activedescendant
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomic
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
aria-autocomplete
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
Available string values
inlineWhen a user is providing input, text suggesting one way to complete the provided input may be dynamically inserted after the caret.
listWhen a user is providing input, an element containing a collection of values that could complete the provided input may be displayed.
bothWhen a user is providing input, an element containing a collection of values that could complete the provided input may be displayed. If displayed, one value in the collection is automatically selected, and the text needed to complete the automatically selected value appears after the caret in the input.
aria-busy
Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
aria-checked
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See related aria-pressed and aria-selected.
Available string values
mixedAn intermediate value between true and false.
aria-colcount
Defines the total number of columns in a table, grid, or treegrid. See related aria-colindex.
aria-colindex
Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. See related aria-colcount and aria-colspan.
aria-colspan
Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See related aria-colindex and aria-rowspan.
aria-controls
Identifies the element (or elements) whose contents or presence are controlled by the current element. See related aria-owns.
aria-current
Indicates the element that represents the current item within a container or set of related elements.
Available string values
pageRepresents the current page within a set of pages.
stepRepresents the current step within a process.
locationRepresents the current location within an environment or context.
dateRepresents the current date within a collection of dates.
timeRepresents the current time within a set of times.
aria-describedby
Identifies the element (or elements) that describes the object. See related aria-labelledby.
aria-details
Identifies the element that provides a detailed, extended description for the object. See related aria-describedby.
aria-disabled
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See related aria-hidden and aria-readonly.
aria-errormessage
Identifies the element that provides an error message for the object. See related aria-invalid and aria-describedby.
aria-expanded
Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowto
Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
aria-haspopup
Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Available string values
menuIndicates the popup is a menu.
listboxIndicates the popup is a listbox.
treeIndicates the popup is a tree.
gridIndicates the popup is a grid.
dialogIndicates the popup is a dialog.
aria-hidden
Indicates whether the element is exposed to an accessibility API. See related aria-disabled.
aria-invalid
Indicates the entered value does not conform to the format expected by the application. See related aria-errormessage.
Available string values
grammarA grammatical error was detected.
spellingA spelling error was detected.
aria-keyshortcuts
Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-label
Defines a string value that labels the current element. See related aria-labelledby.
aria-labelledby
Identifies the element (or elements) that labels the current element. See related aria-describedby.
aria-level
Defines the hierarchical level of an element within a structure.
aria-live
Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
Available string values
assertiveIndicates that updates to the region have the highest priority and should be presented the user immediately.
offIndicates that updates to the region should not be presented to the user unless the used is currently focused on that region.
politeIndicates that updates to the region should be presented at the next graceful opportunity, such as at the end of speaking the current sentence or when the user pauses typing.
aria-modal
Indicates whether an element is modal when displayed.
aria-multiline
Indicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectable
Indicates that the user may select more than one item from the current selectable descendants.
aria-orientation
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
Available string values
horizontalThe element is oriented horizontally.
undefinedThe element's orientation is unknown/ambiguous.
verticalThe element is oriented vertically.
aria-owns
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related aria-controls.
aria-placeholder
Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
aria-posinset
Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-setsize.
aria-pressed
Indicates the current "pressed" state of toggle buttons. See related aria-checked and aria-selected.
Available string values
mixedAn intermediate value between true and false.
aria-readonly
Indicates that the element is not editable, but is otherwise operable. See related aria-disabled.
aria-relevant
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related aria-atomic.
Available string values
additionsElement nodes are added to the accessibility tree within the live region.
additions textEquivalent to the combination of values, "additions text".
allEquivalent to the combination of all values, "additions removals text".
removalsText content, a text alternative, or an element node within the live region is removed from the accessibility tree.
textText content or a text alternative is added to any descendant in the accessibility tree of the live region.
aria-required
Indicates that user input is required on the element before a form may be submitted.
aria-roledescription
Defines a human-readable, author-localized description for the role of an element.
aria-rowcount
Defines the total number of rows in a table, grid, or treegrid. See related aria-rowindex.
aria-rowindex
Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. See related aria-rowcount and aria-rowspan.
aria-rowspan
Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See related aria-rowindex and aria-colspan.
aria-selected
Indicates the current "selected" state of various widgets. See related aria-checked and aria-pressed.
aria-setsize
Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-posinset.
aria-sort
Indicates if items in a table or grid are sorted in ascending or descending order.
Available string values
ascendingItems are sorted in ascending order by this column.
descendingItems are sorted in descending order by this column.
otherA sort algorithm other than ascending or descending has been applied.
aria-valuemax
Defines the maximum allowed value for a range widget.
aria-valuemin
Defines the minimum allowed value for a range widget.
aria-valuenow
Defines the current value for a range widget. See related aria-valuetext.
aria-valuetext
Defines the human readable text alternative of aria-valuenow for a range widget.
autocapitalize
Recommended autocapitalization behavior (for supported input methods).
Available string values
sentenceswordscharacters
autocorrect
Recommended autocorrection behavior (for supported input methods).
autofocus
Automatically focus the element when the page is loaded.
draggable
Whether the element is draggable.
enterkeyhint
Hint for selecting an enter key action.
Available string values
enterdonegonextprevioussearchsend
id
The element's ID.
inert
Whether the element is inert.
inputmode
Hint for selecting an input modality.
Available string values
texttelemailurlnumericdecimalsearch
is
Creates a customized built-in element.
itemid
Global identifier for a microdata item.
itemscope
Introduces a microdata item.
nonce
Cryptographic nonce used in Content Security Policy checks.
role
An ARIA role.
Available string values
alertA type of live region with important, and usually time-sensitive, information. See related alertdialog and status.
alertdialogA type of dialog that contains an alert message, where initial focus goes to an element within the dialog. See related alert and dialog.
applicationA structure containing one or more focusable elements requiring user input, such as keyboard or gesture events, that do not follow a standard interaction pattern supported by a widget role.
articleA section of a page that consists of a composition that forms an independent part of a document, page, or site.
bannerA region that contains mostly site-oriented content, rather than page-specific content.
buttonAn input that allows for user-triggered actions when clicked or pressed. See related link.
cellA cell in a tabular container. See related gridcell.
checkboxA checkable input that has three possible values: true, false, or mixed.
columnheaderA cell containing header information for a column.
comboboxA composite widget containing a single-line textbox and another element, such as a listbox or grid, that can dynamically pop up to help the user set the value of the textbox.
commandA form of widget that performs an action but does not receive input data.
complementaryA supporting section of the document, designed to be complementary to the main content at a similar level in the DOM hierarchy, but remains meaningful when separated from the main content.
compositeA widget that may contain navigable descendants or owned children.
contentinfoA large perceivable region that contains information about the parent document.
definitionA definition of a term or concept. See related term.
dialogA dialog is a descendant window of the primary window of a web application. For HTML pages, the primary application window is the entire web document, i.e., the body element.
directoryA list of references to members of a group, such as a static table of contents.
documentAn element containing content that assistive technology users may want to browse in a reading mode.
feedA scrollable list of articles where scrolling may cause articles to be added to or removed from either end of the list.
figureA perceivable section of content that typically contains a graphical document, images, code snippets, or example text. The parts of a figure MAY be user-navigable.
formA landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.
gridA composite widget containing a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of two-dimensional navigation, such as directional arrow keys.
gridcellA cell in a grid or treegrid.
groupA set of user interface objects which are not intended to be included in a page summary or table of contents by assistive technologies.
headingA heading for a section of the page.
imgA container for a collection of elements that form an image.
inputA generic type of widget that allows user input.
landmarkA perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.
linkAn interactive reference to an internal or external resource that, when activated, causes the user agent to navigate to that resource. See related button.
listA section containing listitem elements. See related listbox.
listboxA widget that allows the user to select one or more items from a list of choices. See related combobox and list.
listitemA single item in a list or directory.
logA type of live region where new information is added in meaningful order and old information may disappear. See related marquee.
mainThe main content of a document.
marqueeA type of live region where non-essential information changes frequently. See related log.
mathContent that represents a mathematical expression.
menuA type of widget that offers a list of choices to the user.
menubarA presentation of menu that usually remains visible and is usually presented horizontally.
menuitemAn option in a set of choices contained by a menu or menubar.
menuitemcheckboxA menuitem with a checkable state whose possible values are true, false, or mixed.
menuitemradioA checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.
navigationA collection of navigational elements (usually links) for navigating the document or related documents.
noteA section whose content is parenthetic or ancillary to the main content of the resource.
optionA selectable item in a select list.
presentationAn element whose implicit native role semantics will not be mapped to the accessibility API. See synonym none.
progressbarAn element that displays the progress status for tasks that take a long time.
radioA checkable input in a group of elements with the same role, only one of which can be checked at a time.
radiogroupA group of radio buttons.
rangeAn input representing a range of values that can be set by the user.
regionA perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.
roletypeThe base role from which all other roles in this taxonomy inherit.
rowA row of cells in a tabular container.
rowgroupA structure containing one or more row elements in a tabular container.
rowheaderA cell containing header information for a row in a grid.
scrollbarA graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.
searchA landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility. See related form and searchbox.
searchboxA type of textbox intended for specifying search criteria. See related textbox and search.
sectionA renderable structural containment unit in a document or application.
sectionheadA structure that labels or summarizes the topic of its related section.
selectA form widget that allows the user to make selections from a set of choices.
separatorA divider that separates and distinguishes sections of content or groups of menuitems.
sliderA user input where the user selects a value from within a given range.
spinbuttonA form of range that expects the user to select from among discrete choices.
statusA type of live region whose content is advisory information for the user but is not important enough to justify an alert, often but not necessarily presented as a status bar.
structureA document structural element.
switchA type of checkbox that represents on/off values, as opposed to checked/unchecked values. See related checkbox.
tabA grouping label providing a mechanism for selecting the tab content that is to be rendered to the user.
tableA section containing data arranged in rows and columns. See related grid.
tablistA list of tab elements, which are references to tabpanel elements.
tabpanelA container for the resources associated with a tab, where each tab is contained in a tablist.
termA word or phrase with a corresponding definition. See related definition.
textboxA type of input that allows free-form text as its value.
timerA type of live region containing a numerical counter which indicates an amount of elapsed time from a start point, or the time remaining until an end point.
toolbarA collection of commonly used function buttons or controls represented in compact visual form.
tooltipA contextual popup that displays a description for an element.
treeA type of list that may contain sub-level nested groups that can be collapsed and expanded.
treegridA grid whose rows can be expanded and collapsed in the same manner as for a tree.
treeitemAn option item of a tree. This is an element within a tree that may be expanded or collapsed if it contains a sub-level group of tree item elements.
widgetAn interactive component of a graphical user interface (GUI).
windowA browser or application window.
slot
The element's desired slot.
spellcheck
Whether the element is to have its spelling and grammar checked.
style
Presentational and formatting instructions.
tabindex
Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation.
title
Advisory information for the element.
translate
Whether the element is to be translated when the page is localized.
writingsuggestions
Whether the element can offer writing suggestions or not.