HTML Element

The HTML Element adds a single HTML tag, such as a heading, paragraph, link or image, with content you write yourself. It doesn't collect data. Use it for instructions and headings if you're comfortable with basic HTML; otherwise use the Content component, which has a visual editor.

Because it has no editor on the form, an HTML Element keeps the form builder tidy on long forms.

Settings

Setting (Display tab)

What it does

HTML Tag

The tag to create, for example p (paragraph, the default), h2, div, a or img

CSS Class

Classes for the tag itself

Container Custom Class

Classes for the box around the tag

Attributes

Name-value pairs added to the tag, such as href for a link or style

Content

The text or HTML inside the tag. It can include placeholders such as {{ data.firstName }}, which show form values.

Example: instructions

With HTML Tag set to div, this Content produces a heading and two paragraphs:

HTML
<h3>Expense Entry</h3>
<p>Enter a line for each expense. Only enter expenses from one trip on a form.</p>
<p><strong>You must attach receipts for all expenses except mileage.</strong></p>

Set HTML Tag to a, add the attributes href = https://www.example.com/policy and target = _blank, and set Content to Read the travel policy.

Example: styles for this form

An HTML Element can hold a <style> block that styles the form, for example the print-only class on Don't Print / Only Print. See Using Custom CSS.

Content and attributes are added to the page exactly as written. Scripts and event attributes such as onclick run in the user's browser. Only use HTML you trust, and review forms imported from elsewhere.

Things to know

  • To show an image, the Image component is usually simpler. See Adding Images To Forms.

  • An HTML Element can be shown or hidden with conditions like any other component.

  • Placeholders in the Content update as the user types. Values aren't URL-encoded, and inside a Data Grid data means the current row. See Placeholders.