Creating a Quiz With QuizMaster

The format for QuizMaster quiz files is based loosely on the format of Windows .ini files. These are ASCII text files (or Simple Text files, in Mac parlance). They consist of section headings labeled with [square brackets] and one or more lines in each section, each line consisting of a key = value pair.

You can create QuizMaster quiz files with Notepad, Simple Text, BBEdit, WordPad, or any full-featured word processor. All you need to do is save the file as plain ASCII text when you're done.

This file will first show you what the rules are for setting up quiz files, then it will give a few examples.


The following sections are allowed in a quiz file: [Default], [Introduction], [Evaluation] and [QuestionN]. For [QuestionN] sections, you must substitute a positive integer for the italicized letter N -- actual sections will be named [Question1], [Question2] and so on.

Every quiz must have, at the very least, a [Question1] section (which asks a single question) and an [Evaluation] section (which defines the results of the person's quiz based on their answer).

The [Default] section sets default values for the entire quiz. Values in the [Default] section can be overridden in individual questions. You can use the [Default] section to save yourself some typing if you want certain things about your quiz to remain the same from question to question. This is most often useful if you want to change the color or text style of your quiz, as described later.

The [Introduction] section, if any, sets text that can be displayed before the first question. This is useful if you want to provide any special instructions (such as the famous "all technicalities count" in the Rice Purity Test) or other guiding information.

After the [Introduction] is displayed, QuizMaster will display [Question1], [Question2] and so on, until it reaches the first [QuestionN] section that doesn't exist. It will then total up the number of points the user has scored and display the appropriate text from the [Evaluation] section. This means that if you have [QuestionN] sections numbered 1, 2, 3, 4, 5, 7, 8 and 9, QuizMaster will always jump to the [Evaluation] after [Question5]; questions 7, 8 and 9 will never be displayed.

What Goes Inside Sections

Each section consists of as many lines as you like, and each line should start with one of the various QuizMaster commands (listed and described below), followed by an equal sign and the value you want to use for that command. For example, to use a QuestionType command (described below) with a value of TrueFalse, you would include the line "QuestionType = TrueFalse" in your quiz file. This will be made clear in the examples that are sprinkled throughout the descriptions of QuizMaster commands.

For readability, you may include optional spaces on either side of the equal sign, and they will be ignored. If a single section has more than one of a given command, the last one will override previous ones. The only exception is with the ExtraText command, which is designed to be used more than once per section.

You may also include comments in your quiz files. Any line that starts with a semicolon (;) or a hash sign (#) will be ignored by QuizMaster when it reads your quiz file. This allows you to leave notes that you or another human can read later without having them displayed for people taking quizzes.

QuizMaster Commands

The following commands are available for use in your quiz files:


Value: Any text, including comment lines, may be included in the value for a QuestionText command. QuizMaster will automatically stop reading the QuestionText value at the beginning of the next command.

You may include HTML tags in your QuestionText value as long as you only use character-level formatting in your text values. "Character-level" formatting means HTML tags that affect the appearance of characters rather than whole lines, paragraphs, or other blocks of text. Some examples of character-level tags are <EM>, <STRONG>, <B>, <I>, <CITE>, <TT>, <FONT>, <BR>, <A> and <IMG>. If you use block-level tags, such as <P>, <TABLE>, <HR>, <DIV> or <CENTER>, the results will probably be quite ugly.

Additionally, if you use HTML tags in your QuestionText values, you must take care to close any tags you open; QuizMaster will not close them for you. If you include a <B> tag without a matching </b>, all text for the remainder of that question will be rendered in bold-face, which is probably not what you want.

Areas of Use: There must be one QuestionText command for each [Question] section in your quiz. Alternatively, you can include a single QuestionText command in the [Default] section, and it will be displayed for all questions except the Introduction.

Purpose: Sets the text of the question to be asked of the user.

Example: To make a [Question] section ask the user what the capital of Alaska is, include a line like the following.

QuestionText = What is the capital of Alaska?


Value: Must be one of the following: SingleChoice, MultipleChoice, YesNo, TrueFalse, DropBox.

Areas of Use: Must be used in each [Question] section, unless used in the [Default] section. If used in [Default], may still be used in [Question] sections to override the default value.

Purpose: Sets the type of question to be asked. Using the SingleChoice value tells QuizMaster to supply a question for which only one answer may be selected, using radio buttons as the control type on the form on the Web page. (This is what we normally think of as a question on a "multiple choice" exam.) The MultipleChoice value tells QuizMaster to allow the user to pick as many answers as desired, using check boxes. The DropBox value tells QuizMaster to supply a single drop-down box after the question.

Note that these three values do not set any of the text for the answers; they only determine the type of control used next to the text. The actual text is set by the AnswerNText command (see below).

The TrueFalse and YesNo values are a pair of special cases: they both tell QuizMaster to supply a SingleChoice question with two radio buttons. The first radio button will be labeled "True" or "Yes" and the second button "False" or "No", in accordance with the QuestionType value used.

Essentially, QuestionType = TrueFalse is equivalent to:

QuestionType = SingleChoice

See the description of the AnswerNText control, below.

Example: To make a given question use check boxes for its answers, use the following command. Note that this does not specify what the answers are; that is done with AnswerNText, described below.

QuestionType = MultipleChoice


Note: The variable N should be replaced with a positive integer to yield Answer1Text, Answer2Text, and so on.

Value: One line of free-form text, ending with a new line, hard return, or line-break. (Automatic line-wraps, also known as "soft returns", may be included in the text.)

Areas of Use: To be used in [Question] sections. Use one of these for each potential answer to your question.

Purpose: To specify the text associated with each potential answer to a question.

Example: To make a question have 4 possible answers, reading "Luke Skywalker", "Darth Vader" "Princess Leia" and "Chewbacca", use the following lines in your [Question] section:

Answer1Text = Luke Skywalker
Answer2Text = Darth Vader
Answer3Text = Princess Leia
Answer4Text = Chewbacca


Note: The variable N should be replaced with a positive integer to yield Answer1Value, Answer2Value, and so on.

Value: A single mathematical value -- it may be positive, negative, zero, or even fractional. Where not specified, it will be assumed to be zero.

Areas of Use: To be used in [Question] sections in conjunction with AnswerNText commands. Use one of these for each potential answer to your question.

Purpose: To set the number of points acquired by a user for selecting a given answer. When a user selects an answer to a question, QuizMaster checks which of the AnswerNText values the user picked, and increases the user's point total by the number indicated in the AnswerNValue command with the matching N. For a better understanding, see the example.

Example: To set up point values for answers to a question, include lines like the following in your [Question] section:

Answer1Text = Blue
Answer1Value = 1
Answer2Text = Red
Answer2Value = 3
Answer3Text = Green
Answer3Value = -3

If a user selects the answer "blue", he or she will gain one point. If the user selects "red" as an answer, he or she will gain three points. And if the user picks "green", he or she will lose three points.


Note: The variable N should be replaced with a positive integer to yield Answer1Control, Answer2Control, and so on.

Value: Either "CheckBox" or "Radio".

Areas of Use: Only allowed in [Question] sections.

Purpose: To allow use of more than one type of control in a single question. This allows you to drop a couple of exclusive options into a set of check boxes, or add one or more check boxes to a range of radio buttons. This is especially useful when combined with the ExtraText command (see below).

Examples: The following commands, if included in a [Question] section, will present a user with check boxes for each clothing item (set by the QuestionType = MultipleChoice command at the beginning), but use radio buttons for the "I am male" and "I am female" answers.

QuestionType = MultipleChoice
QuestionText = Check any items of clothing you're currently wearing.
Answer1Text = Pants
Answer2Text = Skirt
Answer3Text = Shoes
Answer4Text = T-shirt
Answer5Text = I am male.
Answer6Text = I am female.

Answer5Control = Radio
Answer6Control = Radio

This example will present the user with some options for selecting a pizza, using the ExtraText command (discussed below) to insert text between the radio-button and check-box answers.

QuestionType = SingleChoice
QuestionText = How large would you like your pizza to be?

Answer1Text = Small
Answer2Text = Medium
Answer3Text = Large

ExtraText = And which toppings would you like on it?

Answer4Text = Pepperoni
Answer5Text = Onions
Answer6Text = Sausage
Answer7Text = Extra Cheese

Answer4Control = CheckBox
Answer5Control = CheckBox
Answer6Control = CheckBox
Answer7Control = CheckBox


Note: The ExtraText command is the only one which may be used multiple times in a single section.

Value: As many lines as desired of free-form text, including comment lines, if desired. QuizMaster will automatically end the value at the next command, as with QuestionText (see above). Another similarity with QuestionText is that you may include HTML code if it is character-level formatting only. Again, you must take care to close all tags.

Areas of Use: Must be used in the [Introduction] section, if such a section is present. May also be used in [Question] and [Default] sections.

Purpose: To include multiple paragraphs of text on a single page. When used in the [Introduction] section, each ExtraText command will form a separate paragraph of introductory text. When used in a [Question] section, ExtraText values will be printed after the initial QuestionText paragraph, and so may be used to create questions that are more than one paragraph long. When used in the [Default] section, ExtraText values will be printed for every question, following all other ExtraTexts and immediately preceding the available answers.

Finally, when used after an answer command (AnswerNText, AnswerNValue or AnswerNControl), an ExtraText command can supply text that will be printed after that answer and before the next one.

Examples: The first example shows how to use ExtraText commands to form an [Introduction] section with three separate paragraphs. Note that you can include equal signs in your text.

ExtraText = This quiz will test your knowledge of George Lucas' <CITE>Star Wars</cite> movies. You have watched them all, haven't you? If not, shame on you! They're American classics.

ExtraText = The following abbreviations are used in this quiz: SW = Star Wars, TESB = The Empire Strikes Back, and ROTJ = Return of the Jedi.

ExtraText = Now, on to the quiz. May the Force be with you!

The next example shows how to use ExtraText commands to add extra paragraphs to a single question.

QuestionText = Who wrote the following quotation?
ExtraText = <BLOCKQUOTE>"Once upon a midnight dreary,<BR>While I pondered, weak and weary<BR>Over many a quaint and curious volume of forgotten lore..."</blockquote>

This final example shows excerpts from two different sections, demonstrating how to use the ExtraText command in the [Default] section to place a repeating piece of text after each question. The admonition against using a calculator will be shown after every question in the quiz. On the fifth question, the admonition against calculators will be shown after the question and after the hint.

ExtraText = You may not use a calculator to aid you.
. . .
QuestionText = What is the length of the hypotenuse of a right triangle for which one side is four inches long and the other is three inches long?
ExtraText = Hint: use the Pythagorean Theorem.


Value: One line of free-form text, ending with a new line, hard return, or line-break. (Automatic line-wraps, also known as "soft returns", may be included in the text.)

Areas of Use: May be used optionally in [Introduction] and [Question] sections.

Purpose: To specify the text displayed on the button at the bottom of a question page. If SubmitButtonText is not used, the button will display the default text "Question #X >>", where X is the number of the next question.

Example: To make the button at the bottom of the page be much more informal than usual, include the following command in a [Question] or [Introduction] section:

SubmitButtonText = Gimme da next question!


Value: One line of free-form text, ending with a new line, hard return, or line-break. (Automatic line-wraps, also known as "soft returns", may be included in the text.)

Areas of Use: May be used in any section.

Purpose: To change the font face of text displayed in your quiz, like the <FONT FACE="font name"> HTML tag. The FontFace command takes the same type of list of font names as the HTML tag does, separated by commas, and applies the equivalent HTML tag to all text on the page displayed by that section (whether a question, the introduction, or the final evaluation page). If the FontFace command is used in the [Default] section, it will affect all text in the entire quiz, unless overridden in a specific section.

Example: To make all text in your quiz completely unreadable to over 95% of the Internet, use the following command in the [Default] section.

FontFace = Wingdings, Zapf Dingbats

(Both of these fonts consist of decorative characters rather than normal letters, and ship as standard items with the Windows and MacOS operating systems, respectively. Unix users may also have one or both of them installed. As an example, using this FontFace command, the word "QuizMaster" would display as QuizMaster, which few people can read.)


Value: Except for BodyBackground, these commands all take a six-digit color specification in HTML format, or a single-word color description from a list of sixteen standard colors. These specifications can be found in any good HTML guide, and so will not be included here.

BodyBackground takes a reference to an image file name, starting with a slash and proceeding to the name of a file on the same server as QuizMaster.

Areas of Use: All these commands may be used in any section.

Purpose: To mimic the action of the arguments to the HTML <BODY> tag, allowing users easy control over the color of text and backgrounds for their quizzes. You can find out more about the <BODY> tag from any good book or tutorial on HTML.

Example: To make a particular section display in red letters on a black background, include the following commands in that section:

BodyBgColor = 000000
BodyText = FF0000


Value: Either the word "large" or "small". In the [Evaluation] section, the word "suppress" is also allowed.

Areas of Use: FirstText may be used in any section.

Purpose: To alter the appearance of the first paragraph or line of text on the page. For [Introduction] sections, this is the first of the ExtraText commands (see above). For [Question] sections, this is the actual QuestionText itself. For the [Evaluation], this will affect the standard first paragraph that's auto-generated by QuizMaster, which reads "You have scored xx points, out of a range from yy (minimum description) to zz (maximum description)." (Of course, QuizMaster replaces those variables with the actual numbers and replaces the descriptions with the values from MinDesc and MaxDesc, described below.) If you use the special value "suppress" in the [Evaluation] section (or the [Default] section), this automatic paragraph will not appear. The "suppress" value will have no effect on questions or on the introduction.

If you use the "large" or "small" value, the affected paragraph will be displayed a bit bigger or a bit smaller than other text. This allows you to call extra attention to the substance of the question, minimize the impact of the point tally in an evaluation, or otherwise play with sizes.

Example: The following command used in the [Default] section will make QuizMaster show all QuestionText values slightly larger than the other text on the page.

FirstText = large


Value: A single line of text.

Areas of Use: In [Introduction], [Question] and [Evaluation] sections.

Purpose: To allow you to customize the title text at the very top of a page. If TitleText is not used, QuizMaster automatically supplies the title "Introduction" for the introduction, "Question N" for each question (substituting the actual question number for N, of course), and "Evaluation for UserName" for the evaluation (substituting the actual name the person entered at the beginning of the quiz for UserName), or just "Evaluation..." if no UserName was supplied. The TitleText command overrides these automatically generated titles.

Example: To use a much more informal title for your [Introduction] section, use the following command:

TitleText = Stuff You Oughta Know Before You Starts This...


Note: The variable N should be replaced with a positive integer to yield Range1Cap, Range2Cap, and so on.

Value: A number (positive, negative, or even decimal). While this number should fall within the range of possible point values that someone could score, nothing horrible will happen if one or more of them doesn't.

Areas of Use: The RangeNCap command may only be used in the [Evaluation] section.

Purpose: To set limits on groups of point-ranges for evaluating a person's final score. When QuizMaster runs out of questions to ask and proceeds to the [Evaluation] section, it will compare the quiz-taker's score with the various RangeNCap values and determine which range the person's score falls into. Range1 is automatically considered to start at the lowest possible score that can be achieved (even if that is a negative number), and the value of Range1Cap sets the highest score someone can get and still fall into Range1. The value of Range2Cap sets the highest number someone can get and still fall into Range2, and so on. If the highest RangeNCap value is not as high as the highest possible score, then all scores higher than that value are considered to be a final range of their own.

Example: Assuming a quiz can yield scores from 0 to 100 points, the following example will break the scores into four categories of equal size. Scores above 75 will automatically be considered to fall into Range4.

Range1Cap = 25
Range2Cap = 50
Range3Cap = 75


Note: The variable N should be replaced with a positive integer to yield Range1Text, Range2Text, and so on.

Value: As many lines as desired of free-form text, including comment lines, if desired. QuizMaster will automatically end the value at the next command, as with QuestionText (see above). Another similarity with QuestionText is that you may include HTML code if it is character-level formatting only. Again, you must take care to close all tags.

Areas of Use: The RangeNText command may only be used in the [Evaluation] section.

Purpose: To specify the text presented to the user for each of the possible categories he or she might fall into based on his or her score. Once a user's score has been assigned to a range based on its comparison with the RangeNCap values (see above), the matching text is displayed on the evaluation page after the standard presentation of the user's score (as described in FirstText; see above).

Note that the highest value of N for RangeNText can be one number greater than the highest N value for RangeNCap; in such a case, QuizMaster will simply assume that the highest-numbered range extends all the way to the highest score a user can achieve.

Example: Again assuming a range of possible scores from 0 to 100, as in the past example, the following commands will separate the scores into four equal-sized groups and present text to the users telling them which group they fell into.

Range1Cap = 25
Range1Text = You were in the lowest 25 percent.
Range2Cap = 50
Range2Text = You scored between 26 and 50 percent.
Range3Cap = 75
Range3Text = You scored above 50, but not higher than 75.
; Note no Range4Cap necessary.
Range4Text = You were in the top 25 percent!


Value: As many lines as desired of free-form text, including comment lines, if desired. QuizMaster will automatically end the value at the next command, as with ExtraText (see above). Another similarity with ExtraText is that you may include HTML code if it is character-level formatting only. Again, you must take care to close all tags.

Areas of Use: The RangeNExtraText command may only be used in the [Evaluation] section.

Purpose: To allow multiple paragraphs in a user's evaluation. RangeNExtraText values may be used like ExtraText values to add more paragraphs to the RangeNText with the corresponding N value. You may use as many RangeNExtraText commands as you like in an [Evaluation] section, for as many values of N as are set up by the RangeNCap commands.

Example: If the following commands are present in your [Evaluation] section, users will see multi-paragraph evaluations.

Range1Cap = 3
Range2Cap = 6
Range3Cap = 9

Range1Text = You're pretty much at the bottom end of the scale -- sort of like a bottom-feeder.
Range1ExtraText = Of course, that shouldn't be seen as a <EM>bad</em> thing: scavengers are a crucial part of any ecosystem, and without them, wastes would pile up until all other life in the area was choked out.
Range2Text = You scored right in the middle of the range. This is very moderate of you.
Range2ExtraText = The ancient Greeks would have approved -- they felt that people should cleave to the "Golden Mean" and avoid excess of all types.
Range2ExtraText = Of course, Lord Byron would have scoffed at this notion, but then, he's just as dead as the ancient Greeks, isn't he?
Range3Text = You scored on the high end of the range. This might not be such a good thing, though -- suppose this were a test to see if you were an alcoholic?
Range3ExtraText = Since it isn't though, you can take some pride in your achievement.


Values: A single line of text.

Areas of Use: The MinDesc and MaxDesc commands are only usable in the [Evaluation] section.

Purpose: To provide descriptions to be used in the standard first paragraph of the user's evaluation, as described in FirstText (see above). These allow you to provide custom descriptions of the meanings of the two endpoints of your point-scale.

If the FirstText = suppress command is used in the [Evaluation] section, the contents of MinDesc and MaxDesc will be ignored. If the evaluation FirstText is not suppressed and no MinDesc or MaxDesc is supplied, QuizMaster will leave out the description entirely, including the surrounding parentheses.

Example: The following commands might be appropriate in a quiz that measured a person's knowledge of Star Wars trivia: If used, the automatic first paragraph in the evaluation might read "You have scored 23 points, out of a range from 0 (womp-rat) to 50 (Jedi Master or George Lucas)."

MinDesc = womp-rat
MaxDesc = Jedi Master or George Lucas

Summary of Commands and Sections

The following table summarizes which commands are required, optional, or forbidden in which sections. If a command is marked "required" for a given section, QuizMaster will not abort or give an error message if that command is missing, but the quiz will be incomplete and will look odd to the viewer.

Additionally, if a command is marked "odd" for a certain section, that means that it is allowed, but it would be very strange to use it there. Again, QuizMaster will not complain if you do this. It's very forgiving.

Name of Command Status in [Default]? Status in [Introduction]? Status in [QuestionN]? Status in [Evaluation]?
AnswerNControl Odd Forbidden Optional Forbidden
AnswerNText Odd Forbidden Required* Forbidden
AnswerNValue Odd Forbidden Required* Forbidden
BodyALink Optional Optional Optional Optional
BodyBackground Optional Optional Optional Optional
BodyBgColor Optional Optional Optional Optional
BodyLink Optional Optional Optional Optional
BodyText Optional Optional Optional Optional
BodyVLink Optional Optional Optional Optional
ExtraText Optional Required Optional Optional
FirstText Optional Optional Optional Optional
FontFace Optional Optional Optional Optional
MaxDesc Forbidden Forbidden Forbidden Optional
MinDesc Forbidden Forbidden Forbidden Optional
QuestionText Odd Forbidden Required Forbidden
QuestionType Optional Forbidden Required† Forbidden
RangeNCap Forbidden Forbidden Forbidden Required
RangeNExtraText Forbidden Forbidden Forbidden Optional
RangeNText Forbidden Forbidden Forbidden Required
SubmitButtonText Optional Optional Optional Forbidden
TitleText Optional Optional Optional Optional

* Unless QuestionType equals TrueFalse or YesNo.
† Unless supplied in [Default] section.

Sample Problems and Solutions


You want to make most of your quiz in one color combination (say, blue text on a green background), but set one or two questions apart by using a different color combination (say, red text on a yellow background).


Set the most usual color combo in the [Default] section using the BodyBgColor, BodyText and other appropriate commands, then override the values in the particular questions you want to highlight.

; Set green background, blue text.
BodyBgColor = 00FF00
BodyText = 0000FF

; Color values from [Default] section will be used in the absence
; of any color commands within this question.
QuestionText = Here is some blue text on a green background.

QuestionText = Here's more blue-on-green action.

; Now we override the [Default] value.
BodyBgColor = FFFF00
BodyText = FF0000
QuestionText = This text is red against a yellow background.

QuestionText = This is back to the normal color combo.


You want to make a question with answers reading "Yes", "No" and "Maybe".


You can set up each one separately, but since the YesNo value for the QuestionType command is equivalent to specifying the following:

QuestionType = SingleChoice
Answer1Text = Yes
Answer2Text = No

you can simply phrase your question as follows, and it will work out fine.

QuestionType = YesNo
QuestionText = Do you want a cookie?
Answer3Text = Maybe

Naturally, you can do the same trick with TrueFalse questions, and you can add more options with Answer4Text, Answer5Text, and so on.


You want to have a continuum of answers with the first and last answer labeled, but with no labels on the intervening answers. For example, you want to have a range of seven radio buttons, with the first labeled "Strongly Agree" and the last labeled "Strongly Disagree", but you don't want to have to come up with descriptions for the other five answers.


Use an HTML comment as your AnswerNText value. Since QuizMaster will stop processing AnswerNText values on the first blank one, you must include something there, but if you use an HTML comment, QuizMaster will faithfully place it into the HTML form that bears your quiz, where it will be ignored by a user's browser. HTML comments must start with "<!-- " (note that there are two dashes and a space) and end with " -->" (two dashes again).

Therefore, the following example will provide a range of seven radio buttons, only the first and last of which have any visible text labels.

Answer1Text = Strongly Agree
Answer2Text = <!-- no text -->
Answer3Text = <!-- no text -->
Answer4Text = <!-- no text -->
Answer5Text = <!-- no text -->
Answer6Text = <!-- no text -->
Answer7Text = Strongly Disagree