CSS1 Test Suite: 5.4.4 vertical-align

The style declarations which apply to the text below are:

    P {font-size: 12pt;}
    .one {vertical-align: sub;}
    .two {vertical-align: super;}
    .three {vertical-align: top; font-size: 12pt;}
    .four {vertical-align: text-top; font-size: 12pt;}
    .five {vertical-align: middle; font-size: 12pt;}
    .six {vertical-align: bottom; font-size: 12pt;}
    .seven {vertical-align: text-bottom; font-size: 12pt;}
    .eight {vertical-align: baseline; font-size: 12pt;}
    .nine {vertical-align: 50%; font-size: 12px; line-height: 16px;}

    P.example {font-size: 14pt;}
    BIG {font-size: 16pt;}
    SMALL {font-size: 12pt;}
    .ttopalign {vertical-align: text-top;}
    .topalign {vertical-align: top;}
    .midalign {vertical-align: middle;}

The first four words in this sentence should be subscript-aligned. The font size of the superscripted text should not be different from that of the parent element.

The first four words in this sentence should be superscript-aligned. The font size of the subscripted text should not be different from that of the parent element.

The first four words in this sentence should be top-aligned, which will align their tops with the top of the tallest element in the line (probably the orange rectangle).

The first four words in this sentence should be text-top-aligned, which should align their tops with the top of the tallest text in the line.

The image at the beginning of this sentence should be middle-aligned, which should align its middle with the point defined as the text baseline plus half the x-height.

The first four words in this sentence should be 12pt in size and bottom-aligned, which should align their bottom with the bottom of the lowest element in the line.

The first eight words ("eight" has a descender) in this sentence should be 12pt in size and text-bottom-aligned, which should align their bottom with the bottom of the lowest text (including descenders) in the line.

The first four words in this sentence should be 12pt in size and baseline-aligned, which should align their baseline with the baseline of the rest of the text in the line.

The first four words in this sentence should have a font-size of 12px and a line-height of 16px; they are also 50%-aligned, which should raise them 8px relative to the natural baseline.

In the following paragraph, all images should be aligned with the top of the 14-point text, which is identical to the first section of text, whereas any size text should be aligned with the text baseline (which is the default value).

This paragraph contains many images of varying heights and widths all of which should be aligned with the top of a 14-point text element regardless of the line in which the images appear.

In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should be aligned with the text baseline (which is the default value).

This paragraph contains many images of varying heights and widths all of which should be aligned with the middle of a 14-point text element regardless of the line in which the images appear.

In the following paragraph, all elements should be aligned with the top of the tallest element on the line, whether that element is an image or not. Each fragment of text has been SPANned appropriately in order to cause this to happen.

This paragraph contains many images and some text of varying heights and widths all of which should be aligned with the top of the tallest element in whichever line the elements appear.

TABLE Testing Section

The first four words in this sentence should be subscript-aligned. The font size of the superscripted text should not be different from that of the parent element.

The first four words in this sentence should be superscript-aligned. The font size of the subscripted text should not be different from that of the parent element.

The first four words in this sentence should be top-aligned, which will align their tops with the top of the tallest element in the line (probably the orange rectangle).

The first four words in this sentence should be text-top-aligned, which should align their tops with the top of the tallest text in the line.

The image at the beginning of this sentence should be middle-aligned, which should align its middle with the point defined as the text baseline plus half the x-height.

The first four words in this sentence should be 12pt in size and bottom-aligned, which should align their bottom with the bottom of the lowest element in the line.

The first eight words ("eight" has a descender) in this sentence should be 12pt in size and text-bottom-aligned, which should align their bottom with the bottom of the lowest text (including descenders) in the line.

The first four words in this sentence should be 12pt in size and baseline-aligned, which should align their baseline with the baseline of the rest of the text in the line.

The first four words in this sentence should have a font-size of 12px and a line-height of 16px; they are also 50%-aligned, which should raise them 8px relative to the natural baseline.

In the following paragraph, all images should be aligned with the top of the 14-point text, which is identical to the first section of text, whereas any size text should be aligned with the text baseline (which is the default value).

This paragraph contains many images of varying heights and widths all of which should be aligned with the top of a 14-point text element regardless of the line in which the images appear.

In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should be aligned with the text baseline (which is the default value).

This paragraph contains many images of varying heights and widths all of which should be aligned with the middle of a 14-point text element regardless of the line in which the images appear.

In the following paragraph, all elements should be aligned with the top of the tallest element on the line, whether that element is an image or not. Each fragment of text has been SPANned appropriately in order to cause this to happen.

This paragraph contains many images and some text of varying heights and widths all of which should be aligned with the top of the tallest element in whichever line the elements appear.