Template:Code

{{{1}}}

Template:Documentation

A block or inline source code string.

[Edit template data]

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Languagelang 2

The programming language of the source code. List of valid values is at: Extension:SyntaxHighlight#Supported_languages

Default
  • text (if `inline=true`)
  • bash (if `inline` is not set)
Stringsuggested
Inline?inline

Whether to use inline formatting

Auto value
1
Stringoptional
Classclass

Applies only if `inline=true`

Stringoptional
IDid

Applies only if `inline=true`

Stringoptional
CSS Stylestyle

Applies only if `inline=true`

Stringoptional
Headerheader

Applies only if `inline` is not set

Lineoptional
Code1 code

The code to display.

Stringrequired