Template:Caption/Doc
Use this template to show a figure with a corresponding caption. For accessibility purposes, the template also includes an alt
that will be used by screen readers to describe what the content inside the figure is. Do use the alt text, it is useful in 99% of cases.
Usage
Simply include the figure content as the first argument to the template, and the caption as the second:
{{caption
|alt=The MedaWiki logo, a stylised flower with an empty interior; the petals take colours from orange to burgundy in a gradient
|[[File:MediaWiki-2020-logo.svg|100px]]
|The MediaWiki logo
}}
You can also optionally set an alignment. By default, it will "break" the text before and after it. If setting the alignment to "right" or "left", the text will flow besides the figure. If setting it to "center", the figure will be positioned in the middle, but it will still break the text flow.
{{caption
|alt="The MedaWiki logo, a stylised flower with an empty interior; the petals take colours from orange to burgundy in a gradient"
|align=left
|[[File:MediaWiki-2020-logo.svg|100px]]
|The MediaWiki logo
}}
This text flows alongside the figure.
{{caption
|alt="The MedaWiki logo, a stylised flower with an empty interior; the petals take colours from orange to burgundy in a gradient"
|align=right
|[[File:MediaWiki-2020-logo.svg|100px]]
|The MediaWiki logo
}}
This text flows alongside the figure.
{{caption
|alt="The MedaWiki logo, a stylised flower with an empty interior; the petals take colours from orange to burgundy in a gradient"
|align=center
|[[File:MediaWiki-2020-logo.svg|100px]]
|The MediaWiki logo
}}
This text shows up below the figure.