TestoZa · Guide
How to embed a test on your website: WordPress, Google Sites, Wix and Blogger
You have a website and you have a test, and you want students who visit one to take the other. This guide explains the two things “embed” can mean, why an exam should open in its own tab rather than inside your page, gives you the code for your own test, and shows where to paste it on eight website builders.
By TestoZa Team · 13 October 2026 · 15 min read
Make a test to put on your site
You have a website — a WordPress site for your coaching institute, a Google Site for your class, a Blogger page where you post notes — and you have a test. You want the two in the same place, so students who visit the site can take the test without hunting for a link in an old WhatsApp message.
“Embed” is the word everybody searches for, and it hides a choice most guides skip. You can put the test itself inside your page, in a frame, the way a YouTube video sits inside a blog post. Or you can put a way into the test on your page — a button, a card, a box for the day’s exam code, a QR code — that opens the exam in its own tab, full size.
For a quiz of five questions at the end of a blog post, the first is fine. For an exam with a clock, marks and rules, the second is better on every count that matters, and it is the only one TestoZa supports. This guide explains why, gives you the code for your own test, and shows exactly where to paste it on eight website builders.
Two things “embed a test” can mean
Before choosing a tool, decide which of these you want. They solve different problems.
1. The questions inside your page
An iframe embed: a box on your page that shows another website inside it. The visitor scrolls your page, reaches the box, and answers the questions without leaving. This is how Google Forms, Typeform and most quiz widgets are embedded. It suits short, low-stakes things — a five-question check at the end of a lesson, a poll, a sign-up form — where staying on the page matters more than the screen space.
2. A way into the test from your page
A launcher: something on your page that opens the test in its own tab. A “Start the test” button in your text, a card with the test’s name, number of questions and time, a box that says “Exam today? Enter your code”, or a QR code on a printed sheet. The visitor taps it, the exam opens full size, and your page stays open behind it for when they finish.
The rest of this guide is about the second, because it is what an exam needs, and because it is what works with TestoZa. If what you actually need is the first — a short ungraded quiz living inside a blog post — the honest advice is to use a form tool built for that, and keep the exams that count somewhere built for exams.
Why the test opens in its own tab
The short version first: a TestoZa test cannot be shown inside an iframe on another website. Every TestoZa page tells browsers not to display it inside someone else’s frame, using two standard headers — X-Frame-Options: SAMEORIGIN and a content security policy of frame-ancestors 'self'. If you paste a test link into an iframe anyway, the browser shows an empty box or a message that the site “refused to connect”.
That is a security setting, not an oversight. A page that can be framed by any website can be dressed up by any website — covered with a fake button, overlaid with a different form — which is why banks, email providers and most serious web applications refuse to be framed. An exam page carries a candidate’s answers and marks, so it gets the same protection.
But even if the setting were off, an exam is a poor fit for a frame, for reasons that have nothing to do with TestoZa:
- The screen. A frame gets whatever space your page leaves it. On a phone, with your site’s header and menu above and the keyboard below, that can be a strip a few centimetres tall, scrolling inside a page that also scrolls.
- Exam rules. Full screen inside a frame only works if the embed code grants it, and many website builders don’t let you edit that. Your own site’s pop-ups, chat bubbles and cookie banners sit on top of the test.
- Saved answers and sign-ins. Modern browsers keep a framed page’s storage separate from the same site opened directly (Chrome, Firefox and Safari all partition it). A candidate signed in to the exam in one tab is a stranger to the same exam inside your frame. Google sign-in pages refuse to open in frames at all.
- Your page speed. A frame loads a whole web application inside your page, usually on every visit, whether or not anybody takes the test. A button costs a few hundred bytes.
A launcher avoids all four. The test opens in its own tab with the whole screen, every rule works, answers are saved in one place, and your page stays light. The only thing you give up is the visitor seeing the questions without a tap — and for an exam, that tap is a feature: it is the moment the candidate decides to start.
Get the code for your test
Paste your test’s link below — or a six-digit join code — and pick what you want on your page. The code updates as you type, and the preview shows exactly what your visitors will see. Nothing is sent anywhere: the code is written in your browser.
The generator takes your test’s link (or a six-digit join code) and writes one of four pieces of HTML: a button, a card with the test’s title and facts, a code box for live exams that points at testoza.com/join, or a QR code. Every one opens the test in a new tab. For the sample link https://app.testoza.com/test/weekly-test-7-k3p9, the button is:
<a href="https://app.testoza.com/test/weekly-test-7-k3p9" target="_blank" rel="noopener" style="display:inline-block;padding:14px 24px;border-radius:999px;background:#0071e3;color:#ffffff;font:600 16px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;text-decoration:none">Start the test</a>
and the card is:
<div style="max-width:420px;padding:20px;border:1px solid #e5e5ea;border-radius:16px;background:#ffffff;color:#1d1d1f;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif">
<p style="margin:0 0 4px;font-size:13px;color:#6e6e73">Online test</p>
<p style="margin:0 0 6px;font-size:19px;font-weight:600;line-height:1.3">Weekly Test 7: Kinematics</p>
<p style="margin:0 0 16px;font-size:14px;line-height:1.45;color:#424245">30 questions · 45 minutes · No account needed</p>
<a href="https://app.testoza.com/test/weekly-test-7-k3p9" target="_blank" rel="noopener" style="display:inline-block;padding:14px 24px;border-radius:999px;background:#0071e3;color:#ffffff;font:600 16px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;text-decoration:none">Start the test</a>
</div>
Both use inline styles only, so they need no stylesheet, no script and no plugin, and look the same on any website builder.
The four styles, and when to use each:
- Button. One line that sits in your text: under a lesson, at the end of a notes page, beside a chapter title. Use it when the words around it already explain the test.
- Card. The test’s name, its facts (questions, minutes, “no account needed”) and a button, in a box. Use it on a page of its own — a “Tests” or “Practice papers” page — where each test needs to introduce itself.
- Code box. For live exams. A live exam has a new six-digit code each sitting, so instead of updating your website every week, the box points at testoza.com/join, where candidates type the day’s code. Put it on your site once and never touch it again.
- QR code. For things that are printed: a notice board, a poster at the institute, the back of a handout, a slide in class. Phones open the test straight from the camera. The code includes a link too, so it also works when tapped on screen.
All four use inline styles only, so they need no stylesheet, no script and no plugin, and they look the same on every website builder. Change the colour to match your site, change the button text to say what the test is (“Start Weekly Test 7” beats “Click here”), and paste.
Where to paste it: WordPress, Google Sites, Wix, Blogger and more
Every website builder has a place for a block of HTML, and every one also has a button you can point at a link without touching code. Either works. The HTML gives you the card, the code box and the QR code; the builder’s own button matches your site’s style automatically.
| Website builder | Paste the code here | The no-code way |
|---|---|---|
| WordPress | Add a Custom HTML block (in Elementor, the HTML widget) and paste the code. | Or add a Buttons block and paste the link. |
| Google Sites | Insert, then Embed, then the Embed code tab. Paste and click Next. | Or Insert, then Button: give it a name and paste the link. |
| Wix | Add Elements, then Embed Code, then Embed HTML. Choose Code and paste. | Or add a Button and set its link to your test. |
| Blogger | Layout, Add a Gadget, HTML/JavaScript. Inside a post, switch to HTML view first. | Or select text in a post and add a link. |
| Squarespace | A Code block, on plans that allow custom code. | Or a Button block with the link, on any plan. |
| Webflow | Drag in a Code Embed element and paste. | Or a Button with the link. |
| Shopify | In the theme editor, add a Custom Liquid section and paste. | Or a button in a Rich text section. |
| Plain HTML | Paste it where you want the button to appear in the page’s HTML. | Or an ordinary link, styled like your other buttons. |
WordPress
In the block editor, press +, search for Custom HTML, add the block and paste the code. Preview shows it rendered. In Elementor, drag in the HTML widget instead. If you would rather not use code, the Buttons block with your test’s link does the same job and takes your theme’s colours. On a site with several people writing, note that WordPress lets only administrators and editors save raw HTML by default, so an author’s Custom HTML block may be cleaned up when they save.
Google Sites
The simplest route is Insert → Button: give it a name (“Start the test”) and paste your test’s link. For a card or a QR code, use Insert → Embed, choose the Embed code tab, paste, and click Next then Insert. Google Sites shows embedded code inside a box of its own, so resize the box until the card fits; the button inside it opens the test in a new tab.
Wix
Open Add Elements, choose Embed Code, then Embed HTML. In the element’s settings choose Code, paste, and click Update. Drag the element to size. Wix’s own Button, linked to your test, is the no-code alternative.
Blogger
For the sidebar of every page: Layout → Add a Gadget → HTML/JavaScript, paste, save. For one post: open the post, switch the editor from Compose view to HTML view, paste where the button should go, and switch back. A plain link on a sentence (“take this week’s test”) also works and suits Blogger’s look.
Squarespace, Webflow and Shopify
Squarespace has a Code block on plans that allow custom code, and a Button block on all of them. Webflow has a Code Embed element. On Shopify, add a Custom Liquid section in the theme editor and paste the code there.
Notion, Google Classroom and learning platforms
Some places only take links. In Notion, paste the test’s link and keep it as a link or a bookmark (an embed block would try to frame it). In Google Classroom, add the link as material or to an assignment. In Moodle, Canvas or another learning platform, add it as a URL resource set to open in a new window. Students tap, the test opens, and the result goes to your TestoZa dashboard.
Which link to put on your website
A TestoZa test can reach candidates in two ways, and they belong on a website differently.
A test link, for practice anyone can take any time
A test set to Public has a link of its own, like app.testoza.com/test/weekly-test-7-k3p9. Anybody with the link can take it, whenever they like, and their result appears in your dashboard. This is the right link for a website: practice papers, previous years’ papers, a free sample test that shows parents what your institute’s tests look like. Copy it from My Tests with Share link in the test’s menu.
The link is created once, when the test is first saved, and it does not change when you edit the test. Fix a typo or swap a question and the button on your website keeps working; the next candidate simply sees the new version.
A test set to Private (“only you can see it”) has no share link. Make it public, or run it as a live exam.
A live exam, for a paper everyone sits together
A live exam is a sitting: a batch, a start time and a six-digit code. The code is new for each sitting and stops working when the exam ends, so a website is the wrong place for a particular code. Put the code box on your site instead — it always points at testoza.com/join — and give out each day’s code in class, on the projector or in the batch group.
That split works well in practice: your website carries the evergreen practice tests and a permanent “Exam today?” box; WhatsApp and the classroom carry the codes. There is more on that side in the guide to sharing a test on WhatsApp.
An iframe and a button, side by side
If you are choosing a tool and its sales page promises an iframe embed, these are the questions worth asking about it:
| The question | Inside an iframe | A button that opens it |
|---|---|---|
| Will a TestoZa test show inside a frame on my site? | No. TestoZa’s pages tell browsers not to display them inside another website’s frame (X-Frame-Options: SAMEORIGIN). You would get an empty box or a “refused to connect” message. | Yes, on any builder that lets you add a link, a button or a block of HTML. The generator on this page writes the HTML for you. |
| How much of a phone screen does the candidate get? | Whatever your page leaves: your header, menu and footer stay around a box. Scrolling inside a box that sits inside a scrolling page, with the keyboard covering half of what is left. | The whole screen. The test opens in its own tab, the way a link from WhatsApp does. Your page stays open behind it, so they come back to your site afterwards. |
| Can full screen and tab-switch rules work? | Full screen inside a frame works only if the embed code grants it (allow="fullscreen"), and not every website builder lets you edit that. Your site’s own pop-ups, chat bubbles and cookie banners sit on top of the test. | Full screen, tab-switch limits, copy and paste off: all of them work, because the exam is the only thing on the screen. |
| Where do sign-ins and saved answers live? | Browsers now keep a framed page’s storage separate from the same site opened directly (storage partitioning), so a sign-in or a saved draft in one does not carry over to the other. Google sign-in pages refuse to open inside frames at all. | In one place: the test’s own page, opened the same way every time. On a live exam, answers reach the server every 20 seconds. |
| What does it do to my website? | A frame loads a whole web application inside your page, often on every visit, whether or not anyone takes the test. | A button or a card is a few hundred bytes of HTML. Nothing loads from TestoZa until somebody taps it. |
Check this first with any tool you are considering: plenty of exam pages refuse to be framed, for the same security reasons. On a laptop a frame is cramped. On a phone it is a keyhole. An exam needs the whole screen to be fair. A page with other things on it is a distraction at best. Anything that depends on “the browser remembers me” is fragile inside a frame. A heavy frame slows the page your visitors came for. A link costs nothing.
Making the button work: words, placement and design
A button nobody taps is decoration. Most of what makes a visitor start a test is in the two lines around it, not in the colour.
Say what the test is
Before the button, answer the four questions a student or parent has: what is it (“Weekly Test 7, Kinematics”), how long (“30 questions, 45 minutes”), does it count (“+4 for a correct answer, −1 for a wrong one, just like JEE Main”), and do I need to sign up (“No account and no app: tap and type your name”). The card style puts the first two in automatically; write the other two in your own words.
Say what happens next
“Opens in a new tab” under the button removes the small worry of losing their place on your site. On a page of several tests, say which one to take first.
Put it where the reading ends
The best place for a test button is the end of the thing it tests: the bottom of a chapter’s notes, the end of a lesson video’s description, after the last solved example. A visitor who has just read the material is the visitor most likely to take the test, and the test tells them whether the reading worked.
Make it easy to tap
Buttons from the generator are about 48 pixels tall: Android’s guidelines ask for at least 48 and Apple’s for at least 44 points, for a comfortable tap on a phone. Keep space around them, don’t put two test buttons side by side on a narrow screen, and test the page on a phone before you publish it.
Build a “Tests” page
If your site has more than a couple of tests, give them a page of their own: one card per test, newest first, with the code box at the top for live exams. Link to it from your menu. It becomes the place students go on their own, which is the whole point of putting tests on a website.
Your test on your site in about ten minutes
The whole job, for a test that already exists:
- Copy the test’s link (1 min)On My Tests, open the test’s menu and choose Share link. A private test has no link: make it public, or run it as a live exam.
- Make the code (1 min)Paste the link into the generator on this page, pick a button, a card or a code box, and copy it.
- Paste it into your site (3 min)WordPress: a Custom HTML block. Google Sites: Embed, then Embed code. Wix: Embed HTML. Blogger: an HTML/JavaScript gadget.
- Write two lines around it (3 min)How many questions, how long, whether a wrong answer costs marks, and that no account is needed.
- Try it on a phone (2 min)Open your page on a phone, tap the button, answer one question and close the tab.
About 10 minutes in all. Minutes assume the test already exists. Building it is a separate job.
Where the results go
The test opens from your website, but it runs on TestoZa, and so do the results. Everything a candidate submits lands in your TestoZa dashboard, whichever page they started from:
- Every attempt, with the score, the time taken and the answers, as soon as it is submitted.
- A rank list and per-question numbers: how many attempted each question, how many got it right, how long they spent, and which wrong option was most popular.
- Excel downloads for your own records, and report cards to print.
- The candidate’s own result on screen when they submit (or later, depending on how you release results), with the answer key.
What does not happen is any of that flowing back into your website. There is no plug-in that shows scores on your WordPress site, no API to pull results into another system and no webhook that fires when a test is submitted. If your website needs to show results — a leaderboard on your homepage, say — the route is to download them and publish what you choose, by hand.
What this can’t do
So nobody is surprised after building a page around it:
- No iframe embed. The test always opens in its own tab. Covered above, and deliberate.
- No results on your website. No plug-in, API or webhook; results live in your TestoZa dashboard and download as Excel.
- No single sign-on with your site. If your website has its own student logins, they don’t carry over. Candidates type their name, roll number or the day’s code instead, which on a phone is usually faster anyway.
- The address bar says TestoZa. The test runs on app.testoza.com, not on your domain. Your institute’s name can appear on the test and in the invitation, but the address is ours.
- A public link is public. Anyone with the link can take a public test, which is right for practice and wrong for a paper that decides something. For those, use a live exam with a batch list, where only the names or roll numbers on your list get in.
Inside those limits, a button on your website is the lightest way to turn a site that students visit into a place where they also practise — and it costs nothing to try with one test.
Frequently asked questions
Can I embed a TestoZa test in an iframe on my website?
No. TestoZa’s pages send X-Frame-Options: SAMEORIGIN and frame-ancestors 'self', so browsers refuse to show them inside another website’s frame; you would see an empty box or a “refused to connect” message. Use a button, card, code box or QR code that opens the test in a new tab instead. It is also the better experience for an exam: the whole screen, working full-screen and tab-switch rules, and answers saved in one place.
How do I add an online test to my WordPress site?
Copy the HTML from the generator on this page, then in the WordPress block editor add a Custom HTML block and paste it (in Elementor, use the HTML widget). Without code, add a Buttons block and set its link to your test. Both open the test in a new tab. No plugin is needed.
How do I put a test on Google Sites?
The simplest way is Insert → Button: name it “Start the test” and paste your test’s link. For a card with the test’s details or a QR code, use Insert → Embed, choose the Embed code tab, paste the HTML from the generator, then click Next and Insert, and resize the box to fit.
How do I add a test to Wix or Blogger?
In Wix, go to Add Elements → Embed Code → Embed HTML, choose Code and paste the HTML, or use a Wix Button linked to your test. In Blogger, use Layout → Add a Gadget → HTML/JavaScript for every page, or switch a post to HTML view and paste the code where the button should go.
Do visitors need an account to take the test from my website?
No, unless you switch on “candidates must sign in” for that test. They tap the button, type their name and start. For a live exam they type the six-digit code and their name or roll number at testoza.com/join.
Which link should I put on my website: a test link or a join code?
A test link for practice anyone can take at any time — set the test to Public and copy it with Share link. For live exams, whose six-digit code changes every sitting, put a code box on your site that opens testoza.com/join, and give out each day’s code in class or in the batch group.
If I edit the test, do I need to update my website?
No. A test’s link is created when it is first saved and stays the same when you edit it, so the button keeps working and the next candidate sees the new version.
Can I show test results on my website?
Not automatically. Results go to your TestoZa dashboard, where you can see the rank list and per-question numbers, print report cards and download everything as Excel. There is no plug-in, API or webhook that sends results to another website; publish what you want from the download.
Is the embed code free?
Yes. The generator, the code and the test link cost nothing, and building and running tests on TestoZa is free. Paid plans (₹49 for 7 days, ₹149 for 30 days, ₹799 for a year) add exam rules such as forced full screen and tab-switch limits, and other extras.
Put one test on your site today
One button, under the notes your students already read. That is the whole experiment:
Related reading: sharing a test on WhatsApp, mobile-friendly online exams, how to conduct an online exam and pricing.
Sources
- How browsers treat frames: X-Frame-Options (MDN), CSP frame-ancestors (MDN), Storage partitioning (MDN), iframe allow attribute (MDN)
- Website builders: WordPress documentation, Google Sites Help, Wix Help Center, Blogger Help
- Tap targets: Apple: accessibility guidelines, Android: touch target size