SemText

Reference · SemText · Definitions & citations

<sem-reference>

SemText element

You give it an id, a link, and a note. In the text, cite it with a plain link to the id. The element carries the fields a plain list item cannot.

Shares its schema with <sem-references> — the option bullets below belong to that element's contract.

One numbered entry in a reference list. You give it an id, a link, and a note. In the text, cite it with a plain link to the id. The element carries the fields a plain list item cannot.

No options beyond the global attribute catalog are stated for this tag.

Example

sem-reference.html
source
1 <p>Rotate refresh tokens per use<a href="#r-rfc">[1]</a>.</p>
2
3 <sem-references id="refs" kind="bibliography" role="list">
4 <sem-reference id="r-rfc" role="listitem"
5 href="https://www.rfc-editor.org/rfc/rfc6749" cite="RFC 6749">
6 The OAuth 2.0 Authorization Framework, §10.4.
7 </sem-reference>
8 <sem-reference id="r-note" role="listitem">
9 A footnote with no external target.
10 </sem-reference>
11 </sem-references>
render

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

variant: kind="footnotes"

The footnote contract: the same authoring shape with `kind="footnotes"` on the container — the schema styles footnotes as a compact list and bibliography as a hanging indent. The second entry carries no `href`: a footnote with no external target stays a plain numbered note in every tier. JS-off, entries number by CSS counter in DOM order and the authored citation text (`¹` here, `[1]` there) is never renumbered. The schema's distinct compact-list treatment for footnotes is owed by the container block — today's shipped vocabulary styles both kinds as the same numbered list.

variant: kind="footnotes"
sem-reference-footnotes.html
source
1 <p>The refresh grant rotates per use<a href="#fn-rfc">[1]</a>, and the presented token is retired<a href="#fn-rotation">¹</a>.</p>
2
3 <sem-references id="fn" kind="footnotes" role="list">
4 <sem-reference id="fn-rfc" role="listitem" href="https://www.rfc-editor.org/rfc/rfc9700" cite="RFC 9700">
5 OAuth 2.0 Security Best Current Practice, §4.14 — refresh token rotation.
6 </sem-reference>
7 <sem-reference id="fn-rotation" role="listitem">
8 Rotation is a SHOULD, not a MUST: a client holding a token in two places can invalidate its own sibling session.
9 </sem-reference>
10 </sem-references>
render

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

variant: two anchors citing one reference — previews and backlinks

The reading bundle at work: every citing anchor gains a hover and focus preview popover of the entry (`Esc` closes it, the anchor still navigates, `aria-describedby` points at the popover while it is open), and the entry appends one labelled backlink per citing anchor plus the external `↗` link its `href` asks for. Two anchors citing one `id` is the case backlinks exist for. JS-off the same markup is a paragraph and a numbered list: anchors navigate and the `:target` entry highlights — nothing more.

variant: two anchors citing one reference — previews and backlinks
sem-reference-citation-previews.html
source
1 <p>Refresh tokens rotate per use<a href="#pr-rfc">[1]</a>, and each rotation retires the presented grant<a href="#pr-rfc">[1]</a>.</p>
2
3 <sem-references id="pr" kind="bibliography" role="list">
4 <sem-reference id="pr-rfc" role="listitem" href="https://www.rfc-editor.org/rfc/rfc9700" cite="RFC 9700">
5 OAuth 2.0 Security Best Current Practice, §4.14 — refresh token rotation.
6 </sem-reference>
7 </sem-references>
render

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

Source: spec/schema/sem-references.md