0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Represents sample or quoted output from a computer program. Rendered in monospace font.
Description
The <samp> element represents sample output from a computer program. VB styles it in var(--font-mono) at 0.9em. It is part of VB's code-family elements alongside <code>, <kbd>, and <var>. Browser translation tools will translate it unless you add the HTML translate="no"attribute (see Internationalization).
<p>The command returned: <samp>Hello, World!</samp></p><p>Error message: <samp>File not found: config.json</samp></p>
Block output
123456
<pre><samp>$ npm installadded 125 packages in 3.2s$ npm run buildBuild completed successfully.Output: dist/bundle.js (45.2 KB)</samp></pre>
Mixed with kbd
Pair <kbd> (user input) with <samp> (system response) to document command-line workflows:
Input + output
12
<p>Type <kbd>git status</kbd> and the system responds with<samp>On branch main</samp>.</p>
CSS Reference
samp CSS
12345678910
samp {font-family: var(--font-mono);font-size: 0.9em;overflow-wrap: break-word; /* long paths, URLs and hashes wrap */}/* Inline code and output keep their own direction on RTL pages */:is(code, samp):not(pre *) {unicode-bidi: plaintext;}
Unlike <code>, <samp> has no background or padding — output text should feel like raw system text, not highlighted code.
Long unbroken output such as file paths, URLs or hashes wraps inside narrow containers instead of overflowing. Inside a <pre> block the output keeps its exact line breaks.
On a right-to-left page, inline <samp> and <code> are isolated from the surrounding text and take their direction from their own content. Without this, output such as File not found: config.json. could have its edge punctuation moved to the wrong end. Block output in <pre> is always left-to-right unless the <pre> has its own dir.
Accessibility
Screen readers read <samp> as regular text — the monospace styling is visual only
Provide context: "The system responded with..." or "Error:" before the output