liveBook · Manning

Samp element

As explained in Web Design Playground, Second Edition

The HTML samp element marks text as sample output from a computer program or similar system.

Use the <samp> element to mark text as sample output from a computer program or similar system. Browsers display the marked text in a monospace font, giving it a suitably computer-ish look. section 16.1

A sample error message

The error message said <samp>Comic Sans!? Are you kidding me!?</samp>. section 16.1

The error message said <samp>Comic Sans!? Are you kidding me!?</samp>.

Inspect a short example that marks a program-like error message as sample output. section 16.1

How Web Design Playground, Second Edition covers it

How deep it goes
Defines the element and its monospace browser display, without discussing deeper rendering behavior.
Examples
Uses a Comic Sans error message as a concrete sample-output example.
What you can do after
Apply it by marking program output with the samp element in HTML.
How it connects
Connects sample output with HTML text-level elements and monospace typography.

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.