TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home
TQS 2.0

Back to Reference

ANSWER Element

Contains an individual answer for the question (multiple-choice); contains the correct answer (true-false, type-in-answer).

Syntax
<ANSWER
  CORRECT="correct">answer</ANSWER>
Attributes
CORRECT
Applies only to multiple-choice questions. If set to "1", specifies that this answer is the correct answer. For each question, one answer should be correct. Defaults to not correct.
Placement

The ANSWER element must be a child of the QUESTION element.

Children

No children are supported within the ANSWER element.

Remarks

Multiple-choice answers can contain HTML tags, using proper XML notation.

For true-false questions, the contents of this element should be TRUE or FALSE. For fill-in-answer questions, it must contain the correct answer. The QUESTIONS element's CASESENSITIVE attribute can be set to "1" to indicate that answers are case-sensitive.

Examples

Multiple-choice questions:

<QUESTION>
  <Q>What is the answer?</Q>
  <ANSWER>Not this.</ANSWER>
  <ANSWER>Not this either.</ANSWER>
  <ANSWER CORRECT="1">This.</ANSWER>
</QUESTION>

The following multiple-choice answer will be displayed as:
My final answer.

<ANSWER>My &lt;i&gt;final&lt;/i&gt; answer.</ANSWER>

True-false questions:

<QUESTIONS TYPE="TF">
  <QUESTION>
   <Q>Detroit is the capitol of Michigan.</Q>
   <ANSWER>FALSE<ANSWER>
  </QUESTION>
  ...
</QUESTIONS>

Type-in-answer questions:

<QUESTIONS TYPE="BLANKS">
  <QUESTION>
    <Q>What is the capitol of Michigan?</Q>
    <ANSWER>Detroit<ANSWER>
  </QUESTION>
  ...
</QUESTIONS>

©2020 Bot Productions. All rights reserved.Last Updated: June 14, 2001