Template:Code/doc: Difference between revisions
Content added Content deleted
imported>FrozenPlum mNo edit summary |
imported>FrozenPlum m (Put back what's missing) |
||
Line 26: | Line 26: | ||
<!-- Template categories/interwikis here --> |
<!-- Template categories/interwikis here --> |
||
[[Category:Templates]] |
[[Category:Templates]] |
||
[[Category:Formatting templates]] |
|||
</includeonly> |
</includeonly> |
Latest revision as of 22:41, 29 March 2022
[purge]
This is the documentation page, it should be transcluded into the main template page. See Template:Documentation for more informationTo be used if you want to list some short code, which you would like to stand out. Similar to using <code></code> tags, except that it has a grey background.
Usage
Use {{code|Code to display}}
, which results in
.
Code to display
- Unnamed parameter 1
The code to display.
- class=
CSS class(es).
- id=
Id attribute.
- lang=
The language of code.
Examples
{{code|code|lang{{=}}css|border:1px solid #fff}}
=> results in border:1px solid #fff
Note: Template based off wikipedia:Template:Code and mw:Template:Code