More actions
m Change ref link. Add sample. |
m Fix typo. Add Parameter section. |
||
| Line 3: | Line 3: | ||
; Syntax | ; Syntax | ||
: {{T|Co| | : {{T|Co|text color|background color|text}} | ||
: {{T|Co| | : {{T|Co|text color|text}} | ||
: Sample | :; Parameters | ||
::; text color : Sets the text color. Default value is "inherit"<ref>inherit - The color used by the HTML parent element.</ref>. Colors can be given either by color name<ref>https://www.w3schools.com/colors/colors_names.asp [2022-05-29]</ref> (e.g. {{Co|red|red}} or {{Co|green|green}}) or values<ref>https://www.w3schools.com/colors/colors_hex.asp [2022-05-29]</ref> (like {{Co|#0000FF|#FF0000}}). | |||
::; background color : Sets the background color. Default value is "inherit". For valid values see text color. | |||
::; text : The text to be colored. | |||
; Sample | |||
: {{code|<nowiki>{{co|red|This text isn't yellow.}}</nowiki>}} gives ... | : {{code|<nowiki>{{co|red|This text isn't yellow.}}</nowiki>}} gives ... | ||
: {{co|red||This text isn't yellow.}} | : {{co|red||This text isn't yellow.}} | ||