HTML Field

Edit in →
Survey Creator

SurveyJS Form Library includes a multitude of built-in functionalities, offering extensive flexibility to create virtually any design for your forms. In cases where the Form Library falls short, unable to fulfill specific requirements, you have the option to leverage custom HTML markup. With the use of HTML markup, you can implement a sophisticated layout, seamlessly integrate custom text, images, hyperlinks, or any other content into your survey. Try out this interactive demo—utilize a dedicated multiline input field to enter custom HTML markup and see how this markup is rendered within your form. Read more...

Themes
Color palette
Question appearance
Sorry, we can't retrieve the data from server. Please comeback later.

SurveyJS Form Library includes a multitude of built-in functionalities, offering extensive flexibility to create virtually any design for your forms. In cases where the Form Library falls short, unable to fulfill specific requirements, you have the option to leverage custom HTML markup. With the use of HTML markup, you can implement a sophisticated layout, seamlessly integrate custom text, images, hyperlinks, or any other content into your survey. Try out this interactive demo—utilize a dedicated multiline input field to enter custom HTML markup and see how this markup is rendered within your form.

To create an HTML form field, define an object with the type property set to "html" and add it to the elements array. Within this object, specify a unique name that identifies this element and assign your HTML markup to the html property.

SurveyJS Form Library doesn't perform HTML sanitization. If you are not in full control of the HTML markup (for instance, if you are obtaining it from a third party), encode it using a sanitizing tool of your preference within the onProcessHtml event handler. This will help ensure against possible XSS attacks.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.