Template:Code
Appearance
Template documentation
|
|---|
| Note: portions of the template sample may not be visible without values provided. |
| View or edit this documentation. (About template documentation) |
| Editors can experiment in this template's sandbox and test case pages. |
Usage
This template displays text in a monospace code format, useful for showing code snippets, commands, or technical text inline.
Examples
{{Code|print("Hello World")}}→print("Hello World"){{Code|sudo apt-get install}}→sudo apt-get install{{Code|var x = 10;}}→Use {{Code|cd /home/user}} to change directory→ Usecd /home/userto change directory
Parameters
- 1 (required): The text to display in code format
- 2 (optional): Programming language (for documentation purposes)