asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > SAMP Element

<samp> Element


Specifies a code sample.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

The <samp> element represents sample ( or quoted ) output from a computer program.

The element is similar in function to the <code> and <kbd> elements, that render text in the browser’s default fixed-width font.

samp is used for inline formatting. For sections of code samples where block formatting is important, use the <pre> element to preserve the space characters and line breaks used in the code structure.

Attributes

The <samp> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following shows how the samp element may be used.

Here is some text in a <samp>fixed-width font.</samp>

which would render on a Web page as

Here is some text in a fixed-width font.

External References

See Also

CODE   KBD   PRE   TT   XMP


Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note