Build semantic markup and distinguish text, attributes and live holes.
The template language uses indentation to express ownership. A heading belongs inside its section because it is indented beneath that section, just as a Python statement belongs inside a block. Native HTML remains native HTML: labels, buttons and inputs keep the browser's accessibility and validation behavior.
A quoted string in markup is literal text. A hole inserts a Python value. These are separate operations, so a name containing <strong> is displayed as data rather than turning into an element or a script.
Understand the moving parts
A colon introduces content. Elements with attributes use parentheses, and a childless input needs no content body. Attribute names are checked by advisory tooling; the actual browser behavior still deserves a runtime test.
In the card builder, a text field supplies an ordinary string while the emphasis control changes an attribute. Inspect the visible preview and the generated text. Changing data should not require constructing new Python source. Never evaluate a learner's string as a template.
text starts as A readable interface. The input binds it directly; the preview inserts it as escaped data. Toggle emphasis flips strong, which changes the derived font weight between 400 and 800. The course also displays the corresponding markup below the preview.
Try it live
Enter <em>Hello</em> as the card's text, then toggle emphasis and reset the card.
What to observe
Angle brackets stay visible as text. Emphasis changes the preview's attribute; it does not reinterpret your input as HTML.