Template:Highlight: Difference between revisions
m (Faalagorn moved page Template:Highlight to Template:Highlight over redirect: Correct name) |
(merged doc with template page & removed unimplemented features from doc) |
||
Line 1: | Line 1: | ||
<span style="background-color:{{{2|yellow}}}">{{{1}}}</span> | <noinclude> | ||
{{documentation/sandbox|doc= | |||
</ | For adding yellow highlight to specified text. The highlight color can be changed. Please keep template usage to talk pages only. | ||
==Usage== | |||
<code><nowiki>{{Highlight | text | color (optional) | expiration (optional)}}</nowiki></code> | |||
===Parameters=== | |||
;<code>1</code> {{sup|required}} | |||
:Enter the text to be highlighted. | |||
;<code>2</code> | |||
:Colors may be specified by word (e.g., "red", "blue", "lightgreen") or in hexadecimal format (e.g., "#ff0066", "#c0c0c0"). If no value is given for the color, the template defaults to yellow. | |||
==Examples== | |||
{{{!}} class="wikitable" | |||
{{!}}- | |||
! Code !! Output !! Notes | |||
{{!}}- | |||
{{!}} <pre>{{Highlight|text}}</pre> {{!}}{{!}} {{Highlight | text}} {{!}}{{!}} The default highlight color is yellow | |||
{{!}}- | |||
{{!}} <pre>{{Highlight|text|lightblue}}</pre> {{!}}{{!}} {{Highlight | text | lightblue}} {{!}}{{!}} The second parameter is the highlight color | |||
{{!}}} | |||
==See also== | |||
*[[Wikipedia:Template:Highlight round]] – highlights the included text using a rounded box with shadows | |||
*[[Wikipedia:Template:tq]] – for quoting text on talk pages | |||
*[[Wikipedia:Template:font color]] | |||
}} | |||
</noinclude><includeonly><span style="background-color:{{{2|yellow}}}; color:black;">{{{1}}}</span></includeonly> |
Revision as of 15:55, 6 April 2024
For adding yellow highlight to specified text. The highlight color can be changed. Please keep template usage to talk pages only.
Usage
{{Highlight | text | color (optional) | expiration (optional)}}
Parameters
1
Required- Enter the text to be highlighted.
2
- Colors may be specified by word (e.g., "red", "blue", "lightgreen") or in hexadecimal format (e.g., "#ff0066", "#c0c0c0"). If no value is given for the color, the template defaults to yellow.
Examples
Code | Output | Notes |
---|---|---|
{{Highlight|text}} |
text | The default highlight color is yellow |
{{Highlight|text|lightblue}} |
text | The second parameter is the highlight color |
See also
- Wikipedia:Template:Highlight round – highlights the included text using a rounded box with shadows
- Wikipedia:Template:tq – for quoting text on talk pages
- Wikipedia:Template:font color
Editors can experiment in this template's sandbox.