Reference · SemText · Facts & recall
<sem-fact>
SemText element
You write the statement, the conclusion drawn from it, and any incorrect-statement to warn against. The id is the token other text cites. It reads as plain sentences with JavaScript off.
Shares its schema with
<sem-facts>
— the option bullets below belong to that element's contract.
No options beyond the global attribute catalog are stated for this tag.
Children
-
<statement>required per fact; the claim itself. -
<conclusion>required per fact; the assertion the statement resolves to (the back of the card, the quiz answer). -
<incorrect-statement>optional, quiz view only; an explicit wrong candidate. Without one, sibling conclusions serve as distractors.
Example
Live render boots with JavaScript — the authored source is alongside.
view-as omitted — list (default): every fact readable, no chrome
`<sem-fact>` is the atomic unit; a container stacks its facts in document order with `view-as` omitted. Each fact shows its `<statement>` (the claim) then its `<conclusion>` (the assertion the claim resolves to). Nothing is interactive and no chrome is added, so the default view reads as an ordinary document.
Live render boots with JavaScript — the authored source is alongside.
view-as="flashcards" — one fact at a time, the flip reveals its conclusion
The same pair as a self-test card. Only the current `<sem-fact>` shows: front is the statement, back is the conclusion, revealed by a click (the flip). The meter is an index — one numbered chip per card, the current one highlighted, answered chips tinted by their ✓ Got it / ✗ Wrong verdict; prev/next walk the deck and a chip jumps straight to its card. When every card carries a verdict the deck ends on a total ("You got X of N") with a Restart control. Not part of the fact's stored data — `view-as` is display-only, and every fact extracts the same pair.
Live render boots with JavaScript — the authored source is alongside.
view-as="quiz" — the fact as a scored question, conclusion as the answer
Quiz turns each fact into one answerable question: the statement is the prompt, the `<conclusion>` is the correct option, and the `<incorrect-statement>` children are the decoys — options render on thin-bordered buttons in a seeded shuffled order. A wrong pick marks that button (✗, spent) and the question stays open: the reader keeps picking until the correct option lands (✓), which scores `1/1 · score 1/1` in the meter and auto-advances after a 500 ms beat. With no `<incorrect-statement>`, sibling conclusions fill the decoy slots.
Live render boots with JavaScript — the authored source is alongside.
Source: spec/schema/sem-facts.md