Wikipedia:Gallery tag
From Wikipedia, the free encyclopedia
For the screen adaptive gallery template, see Template:Gallery.
For the Wikipedia image use policy for galleries, see WP:IG.
As of version 1.4, MediaWiki supports making image galleries. Although this is an easy way of displaying a large number of images, it does not currently support alt text, needed for accessibility by the visually impaired and other readers who cannot see the images. To create a gallery with alt text, you can use {{Gallery}} instead.
[edit] Syntax
The basic syntax is:
<gallery> File:Wiki.png File:Wiki.png|Captioned File:Wiki.png File:Wiki.png|[[Help:Contents/Links|Links]] can be put in captions. File:Wiki.png File:Wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used… </gallery>
Which produces:
-
Links can be put in captions.
The extended syntax is (see gallery tag help and below for full list of parameters):
<gallery caption="Sample gallery" widths="180px" heights="120px" perrow="3"> File:Wiki.png|Caption text. [...] </gallery>
- Images are separated by new lines.
- Captions are optional.
- Notice that there are no brackets except for links within captions.
- A common mistake is to forget the closing </gallery> tag.
- The default width and height is 120px.
- If
perrow=is omitted, the width is fluid: one row comprises as many images as will fit across the available width. Prior to MediaWiki 1.17, the default was 4.
[edit] See also
| MediaWiki has a page about this at: Help:Images#Rendering a gallery of images |
- m:Template:gallery (backlinks, edit)
- More Gallery Options: See the drop-down box for more CSS gallery code
- mw:Help:Images#Rendering a gallery of images