textUnderlinePosition Property

This example demonstrates the difference between how the auto value of the textUnderlinePosition property works when the LANG attribute of an object containing vertical inline text is set to ja, which is the language code abbreviation for the Japanese language.

Paragraph 1

The following P element has vertical inline text because an embedded style rule sets its writingMode property to tb-rl. The LANG attribute of this P element is not explicitly set. There is a SPAN element nested inside the P element. The color of the text in the SPAN is red, and the text is underlined. Because the LANG attribute of the P (or SPAN) element is not explicitly set, the SPAN element's underline decoration appears below, or after, the text.

This P element has vertical inline text because an embedded style rule sets its writingMode property to tb-rl. The LANG attribute of this P element is not explicitly set. This is underlined text in a SPAN element that is nested inside the P element. Because the LANG attribute of the P (or SPAN) element is not explicitly set, the SPAN element's underline decoration appears below, or after, the text.

Paragraph 2

The LANG attribute of the following P element is set to ja. There is a SPAN element nested inside this P element also, and its text is also red and underlined. Because the LANG attribute of this P element is set to ja, the SPAN element's underline decoration appears above, or before, the text.

This is some text in a second P element. The LANG attribute of this P element is set to ja. This is underlined text in a SPAN element that is nested inside the P element. Because the LANG attribute of the P element is set to ja, the SPAN element's underline decoration appears above, or before, the text.

Click the following button to verify that the value of the textUnderlinePosition property of the document is set to auto, which is the default.