Close this window

Using the <exercise> tag


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.



<exercise id="texas-exercise">
  <problem id="texas-problem">
    <para id="texas-problem-para">
      What is the capital of Texas?
  <solution id="texas-solution">
    <para id="texas-solution-para">
      Austin is the capital of Texas.

Results in this display:

Exercise 1

What is the capital of Texas?

Attributes(what's this?)

Children(what's this?)

label (one, optional), title (one, optional), problem (one, required), solution (zero or more), commentary (one, optional)

Parents(what's this?)

preformat, para, quote, footnote, note, item, entry, content, section, example, meaning, proof, statement, problem, solution, commentary
Close this window