This translation is incomplete. Please help translate this article from English.
Sumari
L'element HTML <samp> és un element destinat a identificar la sortida de mostra d'un programa informàtic. Normalment es mostra en la font monotip predeterminada del navegador (com a Lucida Console).
| Categories de contingut | Contingut dinàmic, phrasing content, contingut palpable. |
|---|---|
| Contingut permès | Phrasing content. |
| Omissió de l'etiqueta | Cap, tant l'etiqueta inicial com l’etiqueta final són obligatòries |
| Elements pares permesos | Qualsevol element que accepti phrasing content. |
| Interfície DOM | HTMLElement |
Atributs
Aquest element només inclou els atributs globals.
Interfície DOM
Aquest element implementa la interfície HTMLElement.
Nota d'implementació: fins Gecko 1.9.2 inclosos, Firefox implementa la interfície HTMLSpanElement per a aquest element.
Exemple
<p>Regular text. <samp>This is sample text.</samp> Regular text.</p>
Resultat
Regular text. This is sample text. Regular text.
Especificacions
| Especificació | Estat | Comentari |
|---|---|---|
| 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 |
Nota
Es pot definir una regla CSS perquè el selector samp substitueixi el tipus de font predeterminat del navegador. Les preferències establertes per l'usuari poden tenir prioritat sobre la CSS especificat.

