Alan Simpson

Alan Simpson

Code Quickies

More Code Quickies

Interactive Quiz

Here is some relatively simple HTML, CSS, and jQuery code for an interactive quiz. If you're feeling brave and think your audience has a sense of humor, you can use the Obnxious version of the quiz insteadl which inclodes sound effects. That obnoxious version is here.

1. Which of the following is a primary color when working with light (rather than inks)?

a) RedCorrect, in light we use RGB (Red, Green, Blue)

b) OrangeThat's not a primary color for ink or light.

c) YellowThat's a primary color for inks, but not for light

d) PurpleThat's not a primary color for ink or light.

2. Which of the following is a JavaScript library?

a) CSSCSS is a language, not a JavaScript library.

b) HTMLHTML is a markup language, not a JavaScript library

c) jQueryCorrect-a-mundo, jQuery is a wildly popular JavaScript library.

d) PythonPython is a programming language, or large snake, but not a JavaScript library.

Here are the two images I used. They're public domain, so feel free to download.

Green checkmark  Red X

All files available from GitHub: Use the Download Zip option under Clone or Download to get all the files in a zip file.