Supported HTML Markup
Description
A listing of supported HTML tags, attributes, and styles.
Supported HTML Tags
The following HTML tags can be used in the HTML field in your form type designs. If an HTML tag is not listed here, it is not supported.
- Tag
- Description
- b
The bold tag, for making text bold.
- br
Inserts a newline.
- div
Can be used around a block of text to add additional styling using the class and style attributes.
- h1, h2, h3, h4, h5, h6
Headings.
- i
The italicize tag, for making text italic.
- img
Inserts an image. Images must be white-listed first. See On-device Asset Polices to learn more.
- ol, ul, li
Ordered (<ol>) and Unordered (<ul>) lists.
- p
Paragraphs.
- span
Used to apply local styling to content. Can include the class and style attributes.
- svg
The SVG tag can be used to insert an SVG image. For allowed attributes with the SVG tag, see Supported SVG Attributes below.
The following tags can be used within the <svg> tag:
- table, tr, td, th, thead, tfoot, tbody, caption, colgroup, col
Table tags. Used to display tabular data.
- wbr
Adds a word break.
Supported HTML Attributes
In addition to tags, certain HTML attributes can be used.
There are restrictions to what characters can be used when defining an attribute's value. In general, attribute values can contain numbers 0-9, letters a-z and A-Z, hyphens -, spaces , commas ,, periods ., parentheses (), equals =, plus +, and forward slashes /. Some attributes are more restrictive or relaxed than others. Details as to what is and is not allowed for specific attributes are described below.
Global Attributes
Global attributes are available for all HTML tags.
- class
Used to add one or more classnames to an element.
When specifying classnames, you can only use the following characters: numbers 0-9, letters a-z and A-Z, hyphens -, underscores _, and spaces . All other symbols will be stripped out of the class attribute value definition.
<div class="myClass">My Content</div>
- style
The style attribute can be used to add in-line styling to an HTML tag. The following characters are permitted when defining the style attribute value: numbers 0-9, letters a-z and A-Z, hashes #, percent %, hyphens -, spaces , commas ,, periods ., parentheses (), colons :, and semi-colons ;. All other characters may be removed.
The allowed style properties are listed in Supported Styles below.
<p style="background-color:#6f0; font-weight:bold;">Hello!</p>
Common Attributes
The following attributes are used with some HTML tags, but not all.
- src
Used with <img> tag. Defines the location of the image. The image can be a URL (either local on-device image file or image on another site) or a data URL. Both URLs and data URLs must be white-listed in the On-device Assets Policy. Once you have white-listed the location of the image (or data URL prefix), then it can be included in your HTML markup:
Image from a URL: <img src="images.4529.jpg" /> Image from a data URL: <img src="datapng.iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" />
Image URLs or data prefixes must be white-listed. If the src attribute evaluates to a URL, the image filename may only contain the following characters: 0-9, a-z, A-Z, -, spaces , ,, ., (, ), =, and +. You cannot include / in the image path in the src attribute for the image tag.
If the image is a data URL, then the data embedded cannot contain any periods .. Encoded data URLs may only contain the following characters: 0-9, a-z, A-Z, -, spaces , ,, /, (, ), =, and +.
Underscores _ are not permitted in the src attribute.
See On-device Asset Polices to learn how to white-list images and data prefixes.
- height
The height of the element.
- width
The width of the element.
- colspan
Used with table tags, defines the column span for <td>.
- rowspan
Used with table tags, defines the row span for <tr>.
SVG Attributes
SVG included in the HTML field can use the following attributes: cx, cy, d, direction, display, dx, dy, fill, fill-rule, font-family, font-size, font-style, font-weight, height, lengthAdjust, opacity, overflow, paint-order, points, r, rx, ry, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, text-decoration, textLength, transform, version, viewbox, visibility, width, x, x1, x2, y, y1, y2, and z
Supported Styles
The style attribute is supported in HTML, however only the style properties listed below can be used.
align
animation
animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function
backface
background
background, background-attachment, background-blend-mode, background-clip, background-color, background-image, background-origin, background-position, background-repeat, background-size
block
border
border, border-block-end, border-block-end-color, border-block-end-style, border-block-end-width, border-block-start, border-block-start-color, border-block-start-style, border-block-start-width, border-bottom, border-bottom-color, border-bottom-left-radius, border-bottom-right-radius, border-bottom-style, border-bottom-width, border-collapse, border-color, border-image, border-image-outset, border-image-repeat, border-image-slice, border-image-source, border-image-width, border-inline-end, border-inline-end-color, border-inline-end-style, border-inline-end-width, border-inline-start, border-inline-start-color, border-inline-start-style, border-inline-start-width, border-left, border-left-color, border-left-style, border-left-width, border-radius, border-right, border-right-color, border-right-style, border-right-width, border-spacing, border-style, border-top, border-top-color, border-top-left-radius, border-top-right-radius, border-top-style, border-top-width, border-width
bottom
box
break
caption
caret
clear
clip
color
column
column-count, column-fill, column-gap, column-rule, column-rule-color, column-rule-style, column-rule-width, column-span, column-width
columns
cursor
direction
display
empty
fill
filter
flex
flex, flex-basis, flex-direction, flex-flow, flex-grow, flex-shrink, flex-wrap
float
font
font, font-family, font-feature-settings, font-kerning, font-language-override, font-optical-sizing, font-size, font-size-adjust, font-stretch, font-style, font-synthesis, font-variant, font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-ligatures, font-variant-numeric, font-variant-position, font-weight
gap
grid
grid, grid-area, grid-auto-columns, grid-auto-flow, grid-auto-rows, grid-column, grid-column-end, grid-column-start, grid-row, grid-row-end, grid-row-start, grid-template, grid-template-areas, grid-template-columns, grid-template-rows
hanging
height
hyphens
justify
left
letter
line
list
list-style, list-style-image, list-style-position, list-style-type
margin
margin, margin-bottom, margin-left, margin-right, margin-top
marker
mask
mask, mask-clip, mask-composite, mask-image, mask-mode, mask-origin, mask-position, mask-repeat, mask-size, mask-type
max
min
mix
object
opacity
order
orphans
outline
outline, outline-color, outline-offset, outline-style, outline-width
overflow
padding
padding, padding-bottom, padding-left, padding-right, padding-top
page
perspective
place
position
quotes
resize
right
rotate
row
scale
shape
stroke
stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width
tab
table
text
text-align, text-align-last, text-anchor, text-combine-upright, text-decoration, text-decoration-color, text-decoration-line, text-decoration-style, text-emphasis, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-indent, text-justify, text-orientation, text-overflow, text-rendering, text-shadow, text-transform, text-underline-position
top
transform
transition
transition, transition-delay, transition-duration, transition-property, transition-timing-function
translate
vertical
visibility
white
widows
width
word
writing
z