SemText

Reference · SemText · Facts & recall

<sem-question>

SemText element

You write the question and one or more sem-option children. It pairs with the quiz views of sem-facts. Works as plain markup with JavaScript off.

A question with answer choices, for self-testing. You write the question and one or more sem-option children. It pairs with the quiz views of sem-facts. Works as plain markup with JavaScript off.

Example

sem-question.html
source
1 <sem-question type="mc">
2 <p data-kind="prompt">Which header carries the OIDC token?</p>
3 <sem-option correct>Authorization</sem-option>
4 <sem-option>Cookie</sem-option>
5 </sem-question>
6
render

Live render boots with JavaScript — the authored source is alongside.

Source: spec/conventions.md