Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

Summary

The HTML <samp> element is an element intended to identify sample output from a computer program. It is usually displayed in the browser's default monotype font (such as Lucida Console).

Content categories Flow contentphrasing content, palpable content.
Permitted content Phrasing content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parent elements Any element that accepts phrasing content.
DOM interface HTMLElement

Attributes

This element only includes the global attributes.

DOM Interface

This element implements the HTMLElement interface.

Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.

Example

<p>Regular text. <samp>This is sample text.</samp> Regular text.</p>

Result

Regular text. This is sample text. Regular text.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<samp>' in that specification.
Living Standard  
HTML5
The definition of '<samp>' in that specification.
Recommendation  
HTML 4.01 Specification
The definition of '<samp>' in that specification.
Recommendation  

Note

A CSS rule can be defined for the samp selector to override the browser's default font face. Preferences set by the user might take precedence over the specified CSS.

See also

문서 태그 및 공헌자

 최종 변경: Sebastianz,