Reference

What each element receives from the stylesheet, and which attribute changes it. Nothing here needs a class; nothing here is optional to the extent that the page stops making sense.


Landmarks

Structural elements
Element Receives Change it with
htmlDocument font (--font-ui), colour scheme, base size.Tokens.
headerOpening block; data-layout="hero" for a title page.data-layout
navInline row of links; singles out aria-current.data-layout="spread", data-nav
mainThe document column, centred, with vertical rhythm.—
articleA self-contained piece; headings inside get the outline.data-layout="prose"
sectionA thematic run inside an article.—
asideSet-off block for qualifying matter.data-callout
footerSmall print, separated by a hairline.—
hrA hairline rule between sections, at the full measure.—

Text and flow

Inline and block text
Element Receives
h1–h6The type scale, --font-heading, tight leading, balanced wrapping.
pThe document font at reading size, with vertical rhythm between paragraphs.
strong, emWeight and stress, no colour change.
smallOne step down the scale, for provenance and captions.
markAccent-tinted highlight, for a passage that was found.
abbrDotted underline when a title is present.
time, dataTabular figures, so dates and values line up.
del, insStruck and underlined, distinct from each other at a glance.
blockquoteIndented measure with an accent rule at the left; footer inside it carries the attribution.
cite, qItalic citation, inline quotation with the right marks.
sub, supTrue raise and drop, without disturbing the leading.
addressContact and authorship block, italic.

Lists and definitions

Sequence, peers, terms
Element Receives
ulReal bullets, indented once, with nesting that keeps its measure.
olNumbers aligned on the figure, not on the text.
dlTerm and definition as a two-column rhythm; dd hangs under its dt.
liTight leading inside items, the parent's rhythm between them.

Tables

Tables are the argument form of technical writing, so they are styled as one: hairlines instead of boxes, a caption that says what the columns mean, no zebra striping to hide a bad axis.

Table parts
Element Receives
tableFull measure, figure-aligned numerals, hairline separators.
captionSits above the grid, small caps register, left-aligned.
theadRule under the header row; header cells keep their weight.
th scope="row"Row headers read as labels, never as data.
tdNumeric columns can be aligned with data-* on the cell's content; the default is left for text.
tfootSummary row above a rule, still inside the table's measure.

Code and data

Reading machine output
Element Receives
code--font-mono inline, tinted surface, no size change to the line.
preBlock surface with its own scroll, mono at a smaller step, leading opened for reading.
pre > codeLosest the inline surface so the block owns the background.
kbd, samp, varKey caps, program output, variables — three distinct registers.
figure[data-pane]One half of a side-by-side: data-pane="code" and data-pane="result".
[data-pane-body]The live rendering inside the result pane, padded from its frame.
[data-diff]Diff block; with data-diff-line="added|removed|context|hunk" and data-diff-file.

Forms

Inputs, at their defaults
Element Receives
formVertical rhythm; data-layout="inline" for a single row.
fieldset, legendA rule and a legend that behaves like a heading.
labelSmall register, bound to its input by for.
input, select, textarea--font-ui, hairline border, accent focus ring, sized by type.
button, [role="button"]Secondary by default: hairline border, surface fill. data-variant="primary" makes it the one next step — ink fill, paper label, accent on hover and focus. data-size="sm|md|lg" scales it.
output, progress, meterInline status with tabular figures.

Figures and media

Anything that needs a caption
Element Receives
figureFull width, framed, with room for a caption above or below.
figcaptionSmall register; when it is the first child it reads as a label.
img, video, audioBlock-level, never wider than the measure; no borders, no rounding.
pictureInherits the img contract; the source order is yours.

Disclosure and metadata

Machine authorship, made legible
Element Receives
details, summaryA real disclosure triangle, replaced by a marker of the same weight as the text.
[data-ai-disclosure]A badge declaring authorship: ai-generated, ai-assisted, mixed, autonomous.
[data-badge]A small status token, sized to the small register.
[data-byline]Author line with tabular date.
[data-hash]Verification fragment in mono, de-emphasised.

data-layout

One attribute, a fixed vocabulary of shapes. It never describes appearance — only the arrangement the document already implies.

Layout values
Value Shape Use it for
heroCentred title block with actionsA document's opening
spreadEnds pushed apartA site row: mark left, links right
row, col, stackFlow along one axisGroups of peers
centerBoth axes centred, boundedStandalone notices
proseReading measure, centredLong-form text
docsSidebar, document, optional marginDocumentation pages like this one
grid-2, grid-3Equal columns, collapsing on narrow screensParallel claims, feature trios
card-gridAuto-fitting cards with a minimum measureCollections of short pieces
statsFigure-led row, tabular numeralsNumbers that carry the argument
consoleDense mono block with a frameSession output, logs
installSingle command, full measure, framedThe one line a reader must copy
actionsButtons in a row, wrappingWhat to do next
reportNumbered sections with a ruleFindings, audits
timeline, timeline alternateVertical spine with nodesSequence with dates
vertical, inlineStacked or in-line, for single controlsSmall components

Component attributes

Other data attributes
Attribute Values Effect
data-card—Frames a short article as one item in a grid
data-callouttip, warning, errorSet-off note with an accent rule and a label
data-callout-title—Names the callout's rule
data-panecode, resultHalf of a side-by-side demonstration
data-pane-body—The padded rendering inside a result pane
data-diff—Diff frame; pair with the line attributes below
data-diff-lineadded, removed, context, hunkLine role, coloured by role not by hand
data-chart—Bar chart from a definition list or table
data-chart-labels, data-chart-spacing, data-chart-stacked, data-chart-reverse—Axis labels, gap, stacking, order
data-nav, data-nav-links, data-nav-togglesidebar, …Navigation shapes
data-variantprimaryOn a button, input[type="submit"] or [role="button"]: ink fill with a paper label, accent on hover and focus. One per view — it marks the next step, not a decoration.
data-sizesm, md, lgScale of a control or badge

Document state

Attributes a page sets on itself
Attribute Values Effect
data-ai-disclosureai-generated, ai-assisted, mixed, autonomousMachine-authorship badge on the document
data-modeinteractive, autonomousWho is expected to be reading
data-session, data-session-meta—Frames a session transcript and its metadata
data-redactedlabel, revealWithheld text, and the control that reveals it
data-reading-progress—Progress for a long document
data-collapsed, data-show-disclosure—Section state and its toggle
data-paper, data-hero, data-agent-native, data-abstract—Article-level treatments for generated prose
data-demo—Marks a block as a demonstration
data-no-print—Removed from the printed page