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.