iframe (inline frame)
Glossary Updated: Nov 11, 2026 Reading time ≈ 1 min
- Topic
- Survey tools and settings
An iframe (inline frame) is an HTML element that shows one web page inside another. To embed a survey, form or video, you paste iframe code into your page, and visitors use it without leaving your site.
The iframe tag points to the address of the embedded page and sets its width and height. The content still loads from its own server, so it updates there without changes to your site. See also HTML.
How it works in SurveyNinja
- Publish the survey and go to Share, then On website.
- Choose Iframe and set the width in percent, the height in pixels and the colors of the loading screen. The preview shows the result on a sample page.
- Click Copy code and paste it into the page HTML where the survey should appear.
Embedding works on every plan and with WordPress, Wix, Webflow, Squarespace and other site builders. When you edit the survey and publish it again, the embedded version updates without new code. The same page also gives code for a widget, a pop-up window and a button. Details: Publishing a survey and adding it to a website. On WordPress you can also use the SurveyNinja plugin.
Common mistakes
- The frame is too low, so a long question scrolls inside it. Set a height that fits the longest question and check the page on a phone.
- The settings on the On website page aren't saved. Copy the code before you leave the page.
- The site doesn't accept embed code at all. Use the Button option that opens the survey in a new tab: it's a plain link without a script.
Updated: Nov 11, 2026 Published: May 31, 2026
WooCommerce Post-Purchase Survey: 7 Questions, When to Ask and What to Do Next
Mike Taylor