From MozillaWiki
Jump to: navigation, search


Documentation icon Template documentation[view] [edit] [history] [purge]


{{samp}} is a front-end for the HTML element <samp>, which is used to denote sample output in text.


There are 2 parameters, of which 1 is unnamed and required, and 1 is named and optional.


The template's syntax is

  • {{samp|custom text |style= }}

Required parameter


Custom text

The text you wish to enclose in <samp> tags.

  • {{samp|1}}

Optional parameter


Custom text styling

You can override the default output styling by using this parameter to specify CSS properties with appropriate values.

  • When entering the CSS properties and values, use the normal format, separating the property from its value with a colon (:), and ending each property:value pair with a semicolon (;), e.g. css-property-1:value; css-property-2:value; css-property-3:value;. But, don't enclose the entry in double quotation marks ("…"). That is done automatically.
  • {{samp|1|style=prop1:valueA; prop2:valueB;}}


Case What you type What you see
Basic use Sample text}} Sample text
style style=color:green;background-color:#fff0d0;|This sample text has been styled}} This sample text has been styled
Wiki-formatting You ''can'' '''use''' {{sup|wiki}} <big>markup</big>}} You can use wiki markup

See also

  • {{abbr}}: inserts <abbr> tags to include a tooltip explanation of an abbreviation.
  • {{bdi}}: inserts <bdi> tags to allow for inline changes in text direction.
  • {{bdo}}: inserts <bdo> tags, forcing inline changes in text direction.
  • {{code}}: inserts <code> tags.
  • {{mark}}: inserts <mark> tags, highlighting the enclosed text.
  • {{var}}: inserts <var> tags.
  • {{varserif}}: inserts <var> tags with serif font styling.