Vertical alignment image test

Vertical alignmentEdit

One of these options may optionally be specified to control the vertical alignment of the image with respect to adjacent text.
These vertical alignment options apply only to plain images, which do not cause breaks and are not floated (that is, they do not work with images that need text to flow around them. To make text flow around an image, place the image preceding the text and use the thumb parameter).

In the following list, each option's explanation is preceded by what File:Flag of Hungary vertical.svg looks like when aligned using the listed option, using the markup
of [[File:Flag of Hungary vertical.svg|option|frameless|upright=0.1|link=|alt=]]

middle:
 (This is the default.) Align the vertical middle of the image with the baseline of the text plus half the x-height of the text, so that the image is vertically centered around a lower case "x" in the text.

baseline:
 Align the bottom of the image with the baseline of the text.

sub:
 Align the bottom of the image to the same level that the bottom of a subscript would be, such as the bottom of the "2" in "X2".

super:
 Align the bottom of the image to the same level that the bottom of a superscript would be, such as the bottom of the "2" in "X2".

text-top:
 Align the top of the image to the top of the text. This is often a bit higher than the top of a capital letter, because of ascenders in letters like lower-case "h".

text-bottom:
 Align the bottom of the image to the bottom of the text. This is somewhat lower than the baseline, because of descenders in letters like lower-case "y".

top:
 Align the top of the image to the top of the line containing the text. Normally this is slightly higher than the top of the text, to make space between lines of text.

bottom:
 Align the bottom of the image to the bottom of the line containing the text. Normally this is slightly lower than the bottom of the text.