模板:Code/Example
外观
< 模板:Code
| Template | Example | Output |
|---|---|---|
| {{code}} | {{code|lang=css|font-family: 'Times New Roman', serif;}} |
|
{{code|inline=y|lang=css|font-family: 'Times New Roman', serif;}} |
| |
| {{inline-code}} | {{inline-code|1=wfDebug( $text, $dest = 'all' );}}|lang=php}} |
wfDebug( $text, $dest = 'all' );
|
{{inline-code|1=wfDebug( $text, $dest = 'all' );}}|lang=sql}} |
wfDebug( $text, $dest = 'all' );
|
{{Inline-code |
Example:
produces:
Inline:
{{code|inline=y|lang=css|font-family: 'Times New Roman', serif;}}
produces:
font-family: 'Times New Roman', serif;
and is equivalent to:
<syntaxhighlight inline lang="css">font-family: 'Times New Roman', serif;</syntaxhighlight>