CARVIEW |
Select Language
HTTP/2 301
server: GitHub.com
content-type: text/html
x-origin-cache: HIT
location: https://webplatform.github.io/docs/html/elements/samp/
access-control-allow-origin: *
expires: Wed, 15 Oct 2025 15:53:29 GMT
cache-control: max-age=600
x-proxy-cache: MISS
x-github-request-id: 3A40:1549CF:12193:14D01:68EFC120
accept-ranges: bytes
age: 0
date: Wed, 15 Oct 2025 15:43:29 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210044-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760543010.621475,VS0,VE280
vary: Accept-Encoding
x-fastly-request-id: e5cd765c1728d284aed983935afa9e05d2309e1f
content-length: 162
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
x-origin-cache: HIT
last-modified: Thu, 09 Jan 2020 08:57:10 GMT
access-control-allow-origin: *
etag: W/"5e16eae6-35c2"
expires: Wed, 15 Oct 2025 15:53:30 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 41D2:CAD16:1221E:14DD7:68EFC120
accept-ranges: bytes
age: 0
date: Wed, 15 Oct 2025 15:43:30 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210044-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760543010.914793,VS0,VE290
vary: Accept-Encoding
x-fastly-request-id: a7bf0c988875276579d3bfbf3cfd82e58c325c68
content-length: 3260
samp ยท WebPlatform Docs
This page is In Progress
Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.
samp
Summary
The samp element represents output from a program or computing system.
Overview Table
Examples
This example uses the samp element to create a code sample.
<p>Once the task is run, you should see
<samp>Done, without errors</samp>.</p>
Usage
The samp element is a phrasing-level element. It must not contain block-level elements, but it can contain other phrasing-level elements.
Notes
By default, most browsers render the contents of samp elements in a fixed-width, monospaced font, but you can change that with CSS.
If you are looking to mark up programming code, the code element would be more appropriate.
If you are looking to indicate user input (e.g. from a keyboard), the kbd element is more appropriate.
Related specifications
See also
Related articles
HTML
samp
Text
samp
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]