Close this window

Using the <exercise> tag

Description The exercise tag is used to present a question or task to the reader, with an optional answer hidden from view until the reader wants to reveal it. The question or task is contained within a problem tag and the answer is contained within a solution tag, both of which are inside the exercise tag.
Example
This CNXML:
<exercise id="exerciseexample">
  <problem>
    <para id="prob_1">
      What is the capital of Texas?
    </para>
  </problem>
  <solution>
    <para id="sol_1">
      Austin is the capital of Texas.
    </para>
  </solution>
</exercise>
	
Results in this display:
Problem 1
What is the capital of Texas?
[ Click for Solution 1 ]
Attributes (what's this?)
Children (what's this?)problem (one, required), solution (zero or more)
Parents (what's this?)para, content, section, example, meaning, proof, statement, problem, solution