First Steps: Chemistry

One small lesson, start to finish: a structural formula and a question to check it landed. Copy the markdown below onto a new page and adjust.

The markdown

## Caffeine

<molecule smiles="CN1C=NC2=C1C(=O)N(C(=O)N2C)C" name="Caffeine" width="360" height="260" ></molecule>

<question id="caffeine-n" type="single" points="1">
How many nitrogen atoms does caffeine contain?
<answer feedback="Count the N atoms in the ring system again.">2</answer>
<answer correct="true">4</answer>
<answer feedback="That's more than are actually in the structure.">6</answer>
</question>

What renders

Caffeine

Strukturformel von CaffeineStrukturformel von CaffeineCaffeine

The two parts

  • The molecule (<molecule smiles="..." ></molecule>) takes a SMILES string and server-renders it as a structural formula image — CN1C=NC2=C1C(=O)N(C(=O)N2C)C is caffeine. Because it's a plain <img>, pens and AI feedback both work directly on it.
  • The quiz question (<question type="single">) is a single-choice question. correct="true" marks the right answer, points="1" sets the max score, and it grades itself the moment the student picks an answer — no check block needed for choice questions.

That's a molecule plus a comprehension check. For reaction equations (\ce{...}) and multi-question quiz layouts, see Chemistry: Molecules & Equations and Quizzes & Tabs in the Components section.