SemText

Reference · SemText · Definitions & citations

<sem-tag-def>

SemText element

The definition card for a markup tag. You write the tag name and one sem-tag-attr child per attribute; the page shows a tidy table and machines read the same fields back. The reference pages use it, so the vocabulary documents itself.

Documents one tag's contract: its attributes, types, defaults and child tags, as a card. The definition card for a markup tag. You write the tag name and one sem-tag-attr child per attribute; the page shows a tidy table and machines read the same fields back. The reference pages use it, so the vocabulary documents itself. (on `sem-tag-def`): required, string — the documented tag's name (backtick-free, strict tag shape). (optional): string — human display name ("Note") when it differs from the tag name. (optional): free token — grouping label for reference indexes (`annotation`, `layout`, `data` …). (optional): comma/space token list — the documented tag's child tags. per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Example

sem-tag-def.html
source
1 <sem-tag-def tag="sem-note" name="Note" group="annotation"
2 children="sem-note-body sem-note-summary">
3 An inline annotation with an optional variant and a collapsible body.
4 <sem-tag-attr name="variant" type="string" allowed="tip,warning,danger" default="tip">Display variant.</sem-tag-attr>
5 <sem-tag-attr name="collapsed" type="boolean">Starts hidden.</sem-tag-attr>
6 </sem-tag-def>
render

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

Source: spec/schema/sem-tag-def.md