samp

< html‎ | elements
Jump to: navigation, search

samp

This article is In Progress.


W3C Recommendation

Summary

The samp element represents output from a program or computing system.


Overview Table

DOM Interface HTMLElement


Compatibility

There is no data available for topic "html", feature "samp". If you think that there should be data available, consider opening an issue.

Examples

This example uses the samp element to create a code sample.

HTML

<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.



See also

Related articles

HTML


















































… further results

Text


















































… further results

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]