Mal:Color swatch

Frå Wikipedia – det frie oppslagsverket
{{{4}}}

{{{2}}}
{{{1}}}

[sjå] [endra] [oppdater] Maldokumentasjon


Usage[endre wikiteksten]

Creates a color swatch for use in articles.

Malparametrar[Handsam maldokumentasjon]

ParameterSkildringTypeStatus
Color1

Color, as a CSS-compatible color.

Døme
Red can be specified as "#FF0000" (without quotes).
Strengpåkravd
Title2

The main caption. Appears once, beneath the swatch. Adding a reference is recommended.

Døme
Blue<ref>[ ... ]</ref>
Tekstlinepåkravd
Float3

Specifies the direction to float, if any: "left", "right" or "center". (Note that centering is not technically floating.)

Standard
Left
Strengvalfri
Custom CSSstyle

Advanced. Custom CSS code to be applied to the outer <div> element.

Strengvalfri
Internal caption4

Optional; appears in the swatch and below the title.

Tekstlinevalfri
Text color5

The color of the text that is overlayed onto the swatch.

Standard
Black text.
Døme
If the color displayed is black, set this to e.g. "#FFFFFF", white.
Strengvalfri

Samples[endre wikiteksten]

{{color swatch|#0000FF|Blue}} creates:

Blue
#0000FF


We strongly recommend adding a <ref></ref> to the main title, e.g.:

{{color swatch|#0000FF|Blue<ref>[http://www.w3.org/TR/REC-html40/types.html#h-6.5 HTML 4.01 Specification]</ref>}} creates:

Blue[1]
#0000FF


Optional parameters – floating left, and an internal caption:

{{color swatch|#0000FF|Blue|left|#0000FF}} creates:
#0000FF

Blue
#0000FF


Change the internal caption's color with a fifth value:

{{color swatch|#0000FF|Blue|left|#0000FF|white}} creates:
#0000FF

Blue
#0000FF


Note[endre wikiteksten]

  1. HTML 4.01 Specification

Mal:Sandbox other


Føremål[endre wikiteksten]

Bruk[endre wikiteksten]

Døme[endre wikiteksten]

Sjå òg[endre wikiteksten]