Jump to content

Template:Code/doc

From DynamicPageList4 Manual
Documentation subpage
View this documentation's related template:
Template:Code (edit).
Template styles: CSS styles (edit).

Note: Template based off wikipedia:Template:Code and mw:Template:Code Use {{code|Code to display}}, which results in Code to display.

Example(s) and usage

[edit source]

{{code|code|lang{{=}}css|border:1px solid #fff}} gives: border:1px solid #fff

Template Data

[edit source]

Wraps the content given in {{#tag:syntaxhighlight}} with the enclose="none" attribute and other attributes specified. Used to list some short code, which to stand out, similar to using <nowiki><code></code></nowiki> tags, except that it has a grey background.

Template parameters

ParameterDescriptionTypeStatus
11

Enter the code to display.

Stringrequired
22 lang text

Enter the language of the code.

Default
text
Stringoptional
classclass

Enter valid CSS class(es).

Default
code
Stringoptional
stylestyle

Enter any valid CSS styles, or a string of them separated by semicolons.

Stringoptional
idid

Enter a valid CSS ID attribute.

Stringoptional
Cookies help us deliver our services. By using our services, you agree to our use of cookies.