How to make a question box before site loads?

I am not sure what to use, javascript or php or what. Also I’m a noob, so detail is much appreciated. Or maybe point to a tutorial or blog showing…
When a user visits a site, before the page loads I would like a small box (or something, just something simple) to come up (a question). This question will have a specific (one answer) answer. The user can only enter the site if the correct answer is inputed into the box.

Have a landing page, that only has this question. Once submitted you can redirect them to the proper site with a session flag that allows them into the site.