W3C

CSS3 module: line

W3C Working Draft 15 May 2002

This version:
http://www.w3.org/TR/2002/WD-css3-linebox-20020515
Latest version:
http://www.w3.org/TR/css3-linebox
Previous version:
none
Editors:
Michel Suignard (Microsoft)
Eric A. Meyer
Authors:
Original CSS2 authors, and
Bert Bos (W3C)
Michel Suignard (Microsoft)
Steve Zilles (Adobe)

Abstract

This document presents a set of CSS line formatting properties. It also includes baseline alignment features as well as related functions like initial line and initial letter effect. It extends on the CSS 2 model [CSS2].

Status of This Document

This document is a working draft of the CSS working group which is part of the Style activity (see summary). It contains a proposal for features to be included in CSS level 3.

Feedback is very much welcome. Comments can be sent directly to the editor, but the mailing list www-style@w3.org (see instructions) is also open and is preferred for discussion of this and other drafts in the Style area.

This working draft may be updated, replaced or rendered obsolete by other W3C documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". Its publication does not imply endorsement by the W3C membership or the CSS Working Group (members only).

To find the latest version of this working draft, please follow the "Latest version" link above, or visit the list of W3C Technical Reports.

Contents


1. Dependencies on other modules

This CSS3 module depends on the following other CSS3 modules:

It has non-normative (informative) references to the following other CSS3 modules:

2. Introduction

This modules specifies the presentation aspects of line within block elements and inline elements. It also covers the design of baseline alignment within each line and the placement of drop initial letter (also known as first letter or drop caps). Most of the properties are new to CSS3.

All described properties, in addition to the noted values, take 'initial' and 'inherit'. These values are not repeated in each of the property value enumeration.

This module uses extensively the 'before', 'after', 'start' and 'end' notation to specify the four edges of a box relative to its text advance direction, independently of its absolute positioning in terms of 'top', 'bottom', 'left' and 'right' (corresponding respectively to the 'before', 'after', 'start' and 'end' positions in a typical Western text layout). This notation is also used extensively in [XSL1.0] for the same purpose.

Finally, in this document, requirements are expressed using the key words "MUST", "MUST NOT", "REQUIRED", "SHALL" and "SHALL NOT". Recommendations are expressed using the key words "SHOULD", "SHOULD NOT" and "RECOMMENDED". "MAY" and "OPTIONAL" are used to indicate optional features or behavior. These keywords are used in accordance with [RFC2119]. For legibility these keywords are used in lowercase form.


3. Line box, Line stacking and Content height

This section describes inline boxes formatting, how lines are stacked together and a mechanism to adjust the content height of inline elements.

3.1. Inline formatting context

In an inline formatting context, boxes are laid out in the inline progression direction, one after the other, following the block progression within the containing block. Borders, padding and inline progression margins are respected between these boxes. The boxes may be aligned within the inline progression in different ways: their after-edges or before-edges may be aligned, or the baselines of text within them may be aligned. The rectangular area that contains the boxes that form a line is called a line box.

The inline progression dimension ('width' in horizontal flow) of a line box is determined by its containing block. The block progression dimension ('height' in horizontal flow) of a line box is determined by the rules given in the section on line height calculations. A line box is generally tall (relative) enough for all of the boxes it contains. However, it may be taller than the tallest box it contains (if, for example, boxes are aligned so that baselines line up). When the block progression dimension of a box B is less than the similar dimension of the line box containing it, the alignment of B within the line box is determined by the baseline alignment properties.

When several inline boxes cannot fit within a single line box, they are distributed among two or more block-progression stacked line boxes. Thus, a paragraph is a stack of line boxes.

Line boxes are stacked together following the strategy determined by the 'line-stacking-strategy' property. Depending on the set value, line boxes can be stacked at constant spacing, in a grid manner or with enough space to accommodate all the line boxes. Using a constant spacing may create a 'bleeding' effect between line boxes.

A containing block defines a root inline element which wraps all the inline children of the block element, including the anonymous inline elements. It inherits the inline behaviors that are set for the block element (like 'line-height') and play an important role in some line stacking strategies.

Although margins, borders, and padding of non-replaced elements do not enter into inline box block-progression dimension calculation (and thus the line box calculation), they are still rendered around inline boxes. This means that if the block-progression dimension of a line box is shorter than the outer edges of the boxes it contains, backgrounds and colors of padding and borders may "bleed" into adjacent line boxes. However, in this case, some user agents may use the line box to "clip" the border and padding areas (i.e., not render them).

3.2. Line Box wrapping

In general, the start edge of a line box touches the start edge of its containing block and the end edge touches the end edge of its containing block. However, floating boxes may come between the containing block edge and the line box edge. Thus, although line boxes in the same inline formatting context generally have the same inline progression advance (that of the containing block), they may vary if available inline-progression space is reduced due to floats. Line boxes in the same inline formatting context may vary in block-progression advance or not, depending on the line stacking strategy.

When the total inline-progression advance of the inline boxes on a line is less than the inline-progression dimension of the line box containing them, their inline-progression distribution within the line box is determined by the 'text-align' property. If that property has the value 'justify', the user agent may stretch the inline boxes as well.

Since an inline box may not exceed the inline-progression width of a line box, long inline boxes are split into several boxes and these boxes distributed across several line boxes. When an inline box is split, margins, borders, and padding have no visual effect where the split occurs. Formatting of margins, borders, and padding may not be fully defined if the split occurs within a bidirectional embedding.

Inline boxes may also be split into several boxes within the same line box due to bidirectional text processing.

Here is an example of inline box construction. The following paragraph (created by the HTML block-level element P) contains anonymous text interspersed with the elements EM and STRONG:
<P>Several <EM>emphasized words</EM> appear
<STRONG>in this</STRONG> sentence, dear.</P>

The P element generates a block box that contains five inline boxes, three of which are anonymous:

To format the paragraph, the user agent flows the five boxes into line boxes. In this example, the box generated for the P element establishes the containing block for the line boxes. If the containing block is sufficiently wide (relative) , all the inline boxes will fit into a single line box:

 Several emphasized words appear in this sentence, dear.

If not, the inline boxes will be split up and distributed across several line boxes. The previous paragraph might be split as follows:

Several emphasized words appear
in this sentence, dear.

or like this:

Several emphasized  
words appear in this 
sentence, dear.

In the previous example, the EM box was split into two EM boxes (call them "split1" and "split2"). Margins, borders, padding, or text decorations have no visible effect after split1 or before split2.

Consider the following example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
  <HEAD>
    <TITLE>Example of inline flow on several lines</TITLE>
    <STYLE type="text/css">
      EM {
        padding: 2px; 
        margin: 1em;
        border-width: medium;
        border-style: dashed;
        line-height: 2.4em;
      }
    </STYLE>
  </HEAD>
  <BODY>
    <P>Several <EM>emphasized words</EM> appear here.</P>
  </BODY>
</HTML>

Depending on the width of the P, the boxes may be distributed as follows:

Image illustrating the effect of line breaking on the
display of margins, borders, and padding.   [D]

3.3. Inline box progression dimension (height in horizontal flow), the 'text-height' property

Each inline box has a block-progression dimension which is derived from the following parameters: the 'text-height' and 'font-size' properties for non-replaced elements, the height or the width for replaced elements (depending on the text flow being horizontal or vertical respectively) and the stacked block-progression advance for inline-block elements (identical to what is done for block-level elements).

The block-progression dimension determines the position of the padding, border and margin for the element but does not necessarily determines the line stacking progression as this is also controlled by the 'line-stacking-strategy'.

Name: text-height
Value: auto | font-size | text-size | max-size
Initial: auto
Applies to: inline elements and parents of element with display:ruby-text
Inherited: yes
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

The 'text-height' property determine the block-progression dimension of the text content area of an inline box. Possible values:

auto
The block-progression dimension is based either on the em square determined by the element font-size property value or the cell-height (ascender + descender) related to the element font-size as chosen by the user agent.
font-size
The block-progression dimension is based on the em square as determined by the element font-size.
text-size
The block-progression dimension is based on the cell-height (ascender + descender) related to the element font-size.
max-size
The block-progression dimension is based on the maximum extents toward the before-edge and after-edge of the box obtained by considering all children elements located on the same line, ruby annotations (elements with 'display:ruby-text') and baseline shifted elements.

When more than one font-size is used (this could happen when glyphs are found in different fonts), it is recommended that the largest font-size provides the em square and the cell-height.

Although the 'text-height' property does not apply directly to block elements, it applies to their anonymous children inline elements (if any).

3.4. Line height adjustment: the 'line-height' property

The 'line-height' property allows to control the amount of leading space which is added before and after the block-progression dimension of either an inline box, a line box or both. The 'line-stacking-strategy' property value determines which effects are active. For example, there are line stacking strategies for which leading is not applied to inline boxes, but only to the line boxes. The sum of the possible leading space and the block progression dimension is called the extended block progression dimension. That extended value is not used for border, margin and padding placement but is used for vertical alignment (relative) and line box block progression dimension.

The leading for an inline element is defined as the difference between the block-progression dimension as determined by the 'text-height' property and the computed value of 'line-height'. Half the leading is called the half-leading, each half-leading is located before and after the block-progression dimension of the element. Depending on the value of the 'line-stacking-strategy', the 'line-height' value will specify the exact extended block-progression dimension of each box generated by the element or be ignored. (Except for inline replaced elements, where the block-progression dimension of the box is given by the 'height' or the 'width' property depending on the text flow.) When the line-height value is ignored for an inline element, the extended block progression dimension is identical to the block progression dimension. Anonymous inline elements use the 'text-height' and 'line-height' property values specified for their parent.

Depending on the value of the 'line-stacking-strategy', the 'line-height' value may provide a minimum or exact extended block-progression dimension for each generated inline box and the line boxes. How the leading space is distributed between the before-edge and the after-edge of inline elements within the line box depends on their vertical-align property value.

When applicable, the minimum extended block-progression dimension consists of a minimum ascent above the block's baseline and a minimum descent below it, exactly as if each line box starts with a zero-width (relative) inline box with the blocks' font and line height properties (what TEX calls a 'strut').

Empty inline elements generate empty inline boxes, but these boxes still have a line height, and thus may influence the line box block progression dimension, as if the empty box contained an infinitely narrow letter.

A inline box which otherwise would influence the line box extended progression dimension may be removed from the computation by using a special value of the line-height property: 'none'. This is equivalent to setting its line-height to the font-size of its ancestor block element.

Name: line-height
Value: normal | <number> | <length> | <percentage> | none
Initial: normal
Applies to: all elements
Inherited: yes
Percentages: refer to the font size of the element itself
Media: visual
Computed value: see prose

Values for this property have the following meanings:

normal
Tells user agents to set the computed value to a "reasonable" value based on the font size of the element. The value has the same meaning as <number>. We recommend a computed value for 'normal' between 1.0 to 1.2.
<length>
The box height is set to this length. Negative values are illegal. The length is the computed value.
<number>
The computed value of the property is this number multiplied by the element's font size. Negative values are illegal. However, the number, not the computed value, is inherited.
<percentage>
The computed value of the property is this percentage multiplied by the element's computed font size. Negative values are illegal.
none
The computed value of the property is the ancestor block element font-size.

Example(s):

The three rules in the example below have the same resultant line height:

DIV { line-height: 1.2; font-size: 10pt }     /* number */
DIV { line-height: 1.2em; font-size: 10pt }   /* length */
DIV { line-height: 120%; font-size: 10pt }    /* percentage */

When an element contains text that is rendered in more than one font, user agents should determine the 'line-height' value according to the largest font size (when appropriate).

Note that replaced elements have a 'font-size' and a 'line-height' property, even if they are not used directly to determine the extended block progression dimension of the box: 'em' and 'ex' values are relative to values of 'font-size and percentage values for 'vertical-align' are relative to values of the extended block progression dimension.

When the 'line-height' value is less than the font size, the final inline box extended block progression dimension will be less than the font size and the rendered glyphs will "bleed" outside the box. If such a box touches the edge of a line box, the rendered glyphs will also "bleed" into the adjacent line box.

3.5. Line Stacking: the 'line-stacking-strategy', 'line-stacking-ruby', 'line-stacking-shift' properties, and the 'line-stacking' shorthand property

Line stacking is the mechanism by which a line box is determined for each line in a block and then these lines are stacked in the block progression direction resolving any spacing constraints between adjacent lines. The line-stacking strategy covers both the determination of the block progression dimension (height in horizontal flow) of a line box and the rules for spacing line boxes.

All line stacking strategies make use of the properties: 'font-size', 'text-height' and 'line-height'.

The line stacking properties are made of the following properties:

  1. The 'line-stacking-strategy' property determines the overall stacking method,
  2. The 'line-stacking-ruby' property determines how elements with 'display=ruby' are stacked,
  3. The 'line-stacking-shift' property determines how elements which are baseline-shifted are stacked,
  4. Finally the 'line-stacking' property is a short-hand for the previous properties.
Name: line-stacking-strategy
Value: inline-line-height | block-line-height | max-height | grid-height
Initial: inline-line-height
Applies to: block-level elements
Inherited: yes
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

This property determines the line stacking strategy for stacked line boxes within a containing block element. The term 'stack-height' is used in the context of this property description to indicate the block-progression advance for the line boxes. Possible values:

inline-line-height
The stack-height is the smallest value that contains the extended block progression dimension of all the inline elements on that line when those elements are properly aligned. Since the line spacing information is already included in the computation of the line box, these line boxes are simply stacked adjacent to one another in the formatted block to which they belong. The 'line-height' property value is taken into account for both the inline elements and the block elements. For inline elements, it defines the extended block progression dimension. For block elements, it defines the minimum extended block progression dimension.
block-line-height
The stack-height is determined by the block element 'line-height' property value. The 'line-height' property value is ignored for inline elements. For alignment purpose, this case is similar to the minimum extended block progression dimension case (strut model). This is the only line-stacking strategy that may cause inline boxes within the line to bleed before and after the line box because the line box is not constrained by its inline boxes.
max-height
The stack-height is the smallest value that contains the block progression dimension of all the inline elements on that line when those elements are properly aligned. The 'line-height' property value is taken into account only for the block elements.
grid-height
The stack-height is the smallest multiple of the block element 'line-height' computed value that can contain the block progression of all the inline elements on that line when those elements are properly aligned. The 'line-height' property value is ignored for inline elements.

When the line-stack strategy dictates that the inline element line-height be ignored, this means that for those elements only their block progression dimensions are considered for the stack-height, not their extended block progression dimensions.

Note. XSL has a similar property with the same name which use different but equivalent values: 'line-height' instead of 'inline-line-height', 'font-height' instead of 'block-line-height'. It also uses 'max-height. The value 'grid-height' is new to the CSS3 property.

 

Name: line-stacking-ruby
Value: exclude-ruby | include-ruby
Initial: exclude-ruby
Applies to: block-level elements
Inherited: yes
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

This property determines the line stacking method for block elements containing ruby annotation elements (element with 'display: ruby-text' or 'display: ruby-text-container'). In all cases the ruby base elements (elements with 'display: ruby-base' or display: ruby-base-container') are considered for line stacking. Possible values:

exclude-ruby
The ruby annotation elements are ignored for line stacking.
include-ruby
The ruby annotation elements are considered for line stacking.

This property is ignored in two cases:

  1. The element text-height property is set to 'max-size'.
  2. The line stacking strategy is set to 'block-line-height'.
Name: line-stacking-shift
Value: consider-shifts | disregard-shifts
Initial: consider-shifts
Applies to: block-level elements
Inherited: yes
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

This property determines the line stacking method for block elements containing elements with base-shift. Possible values:

consider-shifts
In determining the stack-height, include the adjusted top-edge and bottom-edge of any characters that have a baseline-shift.
disregard-shifts
In determining the stack-height, include the unshifted top-edge and bottom-edge of any characters that have a baseline-shift.

This property is ignored in two cases:

  1. The element text-height property is set to 'max-size'.
  2. The line stacking strategy is set to 'block-line-height'.

Note. XSL has a similar property with a different name: 'line-height-shift-adjustment' which use the same values.

Finally, the line stacking strategy can be used using the following shorthand:

Name: line-stacking
Value: <'line-stacking-strategy'> || <'line-stacking-ruby'> || <'line-stacking-shift'>
Initial: see individual properties
Applies to: block-level elements
Inherited: yes
Percentages: N/A
Media: visual
Computed value: see individual properties

4. Baseline alignment

Baseline alignment describes the alignment of textual content and based on information contained in  font tables associated with font resources. Additional descriptions for these font tables are provided in the CSS3 Fonts module.

4.1. Baseline information provided by fonts

The glyphs of a given script are positioned so that a particular point on each glyph, the alignment-point, is aligned with the alignment-points of the other glyphs in that script. The glyphs of different scripts are typically aligned at different points on the glyph. For example, Western glyphs are aligned on the bottoms of the capital letters, certain Indic glyphs (including glyphs from the Devanagari, Gurmukhi and Bengali scripts) are aligned at the top of a horizontal stroke near the top of the glyphs and East Asian glyphs are aligned either at the bottom or center of the EM box of the glyph. Within a script and within a line of text having a single font-size, the sequence of alignment-points defines, in the inline-progression-direction, a geometric line called a baseline. Western and most other alphabetic and syllabic glyphs are aligned to an "alphabetic" baseline, the above Indic glyphs are aligned to a "hanging" baseline and the East Asian glyphs are aligned to an "ideographic" baseline.

three alignment points

This figure shows the vertical position of the alignment-point for alphabetic and many syllabic scripts, illustrated by a Roman "A"; for certain Indic scripts, illustrated by a Gurmukhi syllable "ji"; and for ideographic scripts, illustrated by the ideographic glyph meaning "country". The thin black rectangle around the ideographic glyph illustrates the EM box for that glyph and shows the typical positioning of the "black marks" of the glyph within the EM box.

A baseline-table specifies the position of one or more baselines in the design space coordinate system. The function of the baseline table is to facilitate the alignment of different scripts with respect to each other when they are mixed on the same text line. Because the desired relative alignments may depend on which script is dominant in a line (or block), there may be a different baseline table for each script. In addition, different alignment positions are needed for horizontal and vertical writing modes. Therefore, the font may have a set of baseline tables: typically, one or more for horizontal writing-modes and zero or more for vertical writing-modes.

different baseline positions

Examples of horizontal and vertical baseline positions. The thin lined box in each example is the "EM box". For the Latin glyphs, only the EM box of the first glyph is shown. Example 1 shows typical Latin text written horizontally. This text is positioned relative to the alphabetic baseline, shown in blue. Example 2 shows a typical ideographic glyph positioned on the horizontal ideographic baseline. Note that the EM Box is positioned differently for these two cases. Examples 3 and 4 show the same set of baselines used in vertical writing. The Latin text, example 3, is shown with a glyph-orientation of 90 degrees which is typical for proportionally space Latin glyphs in vertical writing. Even though the ideographic glyph in Example 4 is positioned on the vertical ideographic baseline, because it is centered in the EM box, all glyphs with the same EM Box are centered, vertically, with respect to one another.

The font tables for a font include font characteristics for the individual glyphs in the font. CSS assumes that the font tables include, for each glyph in the font, one width value, one alignment-baseline and one alignment-point for the horizontal writing-modes. If vertical writing-modes are supported, then each glyph must have another width value, alignment-baseline and alignment-point for the vertical writing-modes. (Even though it is specified as a width, for vertical writing-modes the width is used in the vertical direction.)

The script to which a glyph belongs determines an alignment-baseline to which the glyph is to be aligned. The position of this baseline in the design space coordinate system determines the default block progression direction position of the alignment-point. The inline progression direction position of the alignment-point is on the start-edge of the glyph.

alignment in em box

This figure shows glyphs from three different scripts, each with its EM box and within the EM box, the baseline table applicable to that glyph. The alignment-point of each glyph is shown by an "X" on the start edge of the EM box and by making alignment-baseline blue. The baseline-table of the parent element of the characters that mapped to these glyphs is shown as a set of dashed lines.

4.2. Baseline identifiers

The baseline alignment properties control the alignment of child element with respect to their parent. The positions of these baselines are illustrated in the following figure:

different baselines

This figure shows samples of Gurmukhi (a hanging Indic script), Latin and ideographic scripts together with most of the baselines defined below. The thin line around the ideographic glyphs symbolizes the EM box in which these glyphs are centered. In this figure, the position of the "text-before-edge" and "text-after-edge" baselines is computed assuming that the "alphabetic" baseline is the dominant-baseline. The "central" baseline has been omitted from the figure, but it lies halfway between the "text-before-edge" and "text-after-edge" baselines, just about where the "math" baseline is shown.

The baseline-identifiers below are used in this specification. Some of these are determined by baseline-tables contained in a font as described in the section describing the baseline information provided by fonts. Others are computed from other font characteristics as described below. Whether determined by the font or computed, a derived baseline-table is constructed with positions of each of the baselines below.

alphabetic

This identifies the baseline used by most alphabetic and syllabic scripts. These include, but are not limited to, many Western, Southern Indic, Southeast Asian (non-ideographic) scripts.

ideographic

This identifies the baseline used by ideographic scripts. For historical reasons, this baseline is at the bottom of the ideographic EM box and not in the center of the ideographic EM box. See the "central" baseline. The ideographic scripts include Chinese, Japanese, Korean, and Vietnamese Chu Nom.

hanging

This identifies the baseline used by certain Indic scripts. These scripts include Devanagari, Gurmukhi and Bengali.

mathematical

This identifies the baseline used by mathematical symbols.

central

This identifies a computed baseline that is at the center of the EM box. This baseline lies halfway between the text-before-edge and text-after-edge baselines.

Note. For ideographic fonts, this baseline is often used to align the glyphs; it is an alternative to the ideographic baseline.

middle

This identifies a baseline that is offset from the alphabetic baseline in the shift-direction by 1/2 the value of the x-height font characteristic. The position of this baseline may be obtained from the font data or, for fonts that have a font characteristic for "x-height", it may be computed using 1/2 the "x-height". Lacking either of these pieces of information, the position of this baseline may be approximated by the "central" baseline.

text-before-edge

This identifies the before-edge of the EM box. The position of this baseline may be specified in the baseline-table or it may be calculated.

Note. The position of this baseline is normally around or at the top of the ascenders, but it may not encompass all accents that can appear above a glyph. For fonts with ascenders, the value of the "ascent" font characteristic is used. For ideographic fonts, the position of this baseline is normally 1 EM in the shift-direction from the "ideographic" baseline. However, some ideographic fonts have a reduced width in the inline-progression-direction to allow tighter setting. When such a font, designed only for vertical writing-modes, is used in a horizontal writing-mode, the "text-before-edge" baseline may be less than 1 EM from the text-after-edge.

text-after-edge

This identifies the after-edge of the EM box. The position of this baseline may be specified in the baseline-table or it may be calculated.

Note. For fonts with descenders, the position of this baseline is normally around or at the bottom of the descenders. For these fonts the value of the "descent" font characteristic is used. For ideographic fonts, the position of this baseline is normally at the "ideographic" baseline.

There are, in addition, two computed baselines that are only defined for line boxes: 'before-edge' and 'after-edge'. For each line box, there is a dominant-baseline, a baseline-table and a baseline-table font-size which are those of the nearest block-level ancestor element and are applied to its root inline element. Depending on the 'line-stacking-strategy' being used, the line stacking progression (also called stack-height) can be different from the line block progression dimension. The 'before-edge' and 'after-edge' baselines are always based on the block progression dimension and are in fact part of its determination.

For an inline element, the extended inline box includes the maximum extent of their static or relative positioned children located in the same line box and may include leading specified by their line-height value. Depending on the line-stacking-strategy value, the extended line box may have a different block progression dimension. For replaced elements the margin extents are always added.

The following text explains the interaction between the line-stacking-strategy and the various baseline alignment parameters.

The "before-edge" and "after-edge" baselines are defined as follows.

before-edge

The offset of the "before-edge" baseline of the line from the dominant-baseline of the line is determined by ignoring all extended inline boxes whose alignment-baseline is either "before-edge" or "after-edge". For the "before-edge", extents are measured from the dominant-baseline in the direction toward the top (relative) of the extended inline box. The "before-edge" baseline offset is set to the maximum extent of the "before-edges" of the extended inline boxes of the remaining areas. If all the extended inline boxes in a line box are aligned either to the "before-edge" or to the "after-edge", then use the offset of the "text-before-edge" baseline of the line as the offset of the "before-edge" baseline of the line.

after-edge

The offset of the "after-edge" baseline of the line from the dominant-baseline of the line is determined by ignoring all extended inline boxes whose alignment-baseline is after-edge. For the "after-edge", extents are measured from the dominant-baseline in the direction toward the bottom (relative) of the extended inline box. The "after-edge" baseline offset is set to the negative of the maximum of (1) the maximum extent of the "after-edges" of the remaining extended inline boxes and (2) the maximum height of the extended inline boxes that are ignored minus the offset of the "before-edge" baseline of the line.

Note. If all the extended inline boxes in a line box are aligned to the "after-edge" then the specification for the "before-edge" will set the "before-edge" baseline to coincide with the "text-before-baseline" of the line. Then, case (2) above will determine an offset to the "bottom-edge" baseline that will align the "before-edge" of the box with the greatest height to its allocation-rectangle to "before-edge" baseline.

Note. The above specifications for "before-edge" and "after-edge" have the following three properties: (1) all extended inline boxes are below the "before-edge", (2) all extended inline boxes are above the "after-edge", and (3) the distance between the "before-edge" and the "after-edge" cannot be decreased without violating (1) or (2). The specified placement of the "before-edge" and "after-edge" is not the only way that (1)-(3) can be satisfied, but it is the only way they can be satisfied with the smallest possible offset to the "before-edge".

For the purpose of before-edge and after-edge baseline computation, inline boxes include the maximum extent of their static or relative positioned children located in the same line box. Maximum alignment extents are measured by including the half leading extent in the appropriate direction for non replaced elements and by using the margin extents for replaced elements.

Examples showing "before-edge" and "after-edge" alignment:

aligning text and images

The rectangles with lines or arrows are images with an intrinsic size as shown. The rectangles with no arrows represent images that receive the default, dominant baseline, alignment. The alignment of the other rectangles is at the furthest point from the arrow head (which is in the middle when there are two arrowheads). Examples 1 and 2 show the "before-edge" alignment is determined by the tallest non-"before-edge" aligned objects: in example 1 this is the default aligned, arrowhead free rectangular image and in example 2 this is the double headed arrow rectangle. Examples 3 and 4 show defaulting to the "text-before-edge" when all the boxes have either "before-edge" or "after-edge" alignment. In example 3, the images with "before-edge" alignment has a taller member than do the "after-edge" aligned images. In example 4, the tallest image is in the "after-edge" aligned set. Example 5 is a repetition of example 2 with largest image being an "after-edge" aligned image.

There are also four baselines that are defined only for horizontal writing-modes.

top

This baseline is the same as the "before-edge" baseline in a horizontal writing-mode and is undefined in a vertical writing mode.

text-top

This baseline is the same as the "text-before-edge" baseline in a horizontal writing-mode and is undefined in a vertical writing mode.

bottom

This baseline is the same as the "after-edge" baseline in a horizontal writing-mode and is undefined in a vertical writing mode.

text-bottom

This baseline is the same as the "text-after-edge" baseline in a horizontal writing-mode and is undefined in a vertical writing mode.

4.3. Overview of the baseline alignment process

The alignment of an element with respect to its parent is determined by three things: the scaled-baseline-table of the parent and the alignment-baseline and alignment-point of the element being aligned. Prior to alignment, the scaled-baseline-table of the parent may be shifted. The property specifications below provide the information necessary to align the parent and child elements.

There are four properties that control alignment of elements to the above set of baselines: 'dominant-baseline', 'alignment-baseline', 'baseline-shift' and 'alignment-adjust'. These properties are all independent and are designed so that typically only the specification of one of the properties is needed to achieve a particular alignment goal.

The primary baseline alignment property is the 'dominant-baseline' property. This property sets the scaled-baseline-table as a compound value with the three following components:

  1. The dominant-baseline-identifier component is the default 'alignment-baseline' to be used when aligning two inline areas.
  2. The baseline-table component specifies the positions of the baselines in the font design space coordinates. The baseline-table acts something like a musical staff; it defines particular points along the block-progression-direction to which glyphs and inline elements can be aligned.
  3. The baseline-table 'font-size' component is used to scale the positions of the baselines in that baseline table. In a scaled-baseline-table, the positions of the baselines can be adjusted by multiplying the design-space coordinate values by the baseline-table font-size.

Because the value of the 'font-family' property is a list of fonts, to insure a consistent choice of baseline-table we define the nominal font in a font list as the first font in the list for which a glyph data is available. This is the first that could contain a glyph for each character encountered. (For this definition, glyph data is assumed to be present if a font substitution is made or if the font is synthesized.) This definition insures a content independent determination of the font and baseline table that is to be used.

For convenience, the specification will sometimes refer to the baseline identified by the dominant-baseline-identifier component of the "dominant-baseline" property as the "dominant baseline" (in an abuse of terminology).

The model also assumes that each glyph has an 'alignment-baseline' value which specifies the baseline with which the glyph is to be aligned. (The 'alignment-baseline' is called the "Baseline Tag" in the OpenType baseline-table description.) The initial value of the 'alignment-baseline' property uses the baseline identifier associated with the given glyph. Alternate values for 'alignment-baseline' can be useful for glyphs such as a "*" which are ambiguous with respect to script membership.

The model assumes that the font from which the glyph is drawn also has a baseline table, the font baseline-table. This baseline table has offsets in units-per-em from the (0,0) point to each of the baselines the font knows about. In particular, it has the offset from the glyph's (0,0) point to the baseline identified by the 'alignment-baseline'.

The offset values in the baseline-table are in "design units" which means fractional units of the EM. CSS calls these "units-per-em". Thus, the current 'font-size' is used to determine the actual offset from the dominant baseline to the alternate baselines.

The glyph is aligned so that its baseline identified by its 'alignment-baseline' is aligned with the baseline with the same name from the dominant baseline-table.

The offset from the dominant baseline of the parent to the baseline identified by the 'alignment-baseline' is computed using the dominant baseline-table and dominant baseline-table font-size. The font baseline-table and font-size applicable to the glyph are used to compute the offset from the identified baseline to the (0,0) point of the glyph. This second offset is subtracted from the first offset to get the position of the (0,0) point in the shift direction. Both offsets are computed by multiplying the baseline value from the baseline-table times the appropriate font-size value.

If the 'alignment-baseline' identifies the dominant baseline, then the first offset is zero and the glyph is aligned with the dominant baseline; otherwise, the glyph is aligned with the chosen alternate baseline.

The third baseline alignment property is the 'baseline-shift' property. Like the properties other than the "dominant-baseline" property, this property does not change the baseline-table or the baseline-table font-size. It does shift the whole baseline table of the parent element so that when an inner inline element is aligned to one of the parents baselines, the position of the inner inline element is shifted.

The fourth alignment property is the 'alignment-adjust' property. This property is primarily used for replaced elements. The "alignment-adjust" property allows the author to assign where, on the start-edge of the object, the alignment point for that element lies.

For alignment purposes, the margins are added to the replaced elements dimensions.

In addition to the following definition of these properties, an informative appendix: B provides usage examples of these properties.

4.4. Dominant baseline: the 'dominant-baseline' property

Name: dominant-baseline
Value: auto | use-script | no-change | reset-size | alphabetic | hanging | ideographic |
mathematical | central | middle | text-after-edge | text-before-edge
Initial: auto
Applies to: inline-level elements (but see prose)
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

The 'dominant-baseline' property is used to determine or re-determine a scaled-baseline-table. A scaled-baseline-table is a compound value with three components:

Some values of the property re-determine all three values; other only reestablish the baseline-table font-size. Values for the property have the following meaning:

auto
If this property occurs on a block or inline-block element, then the user agent behavior depends on the value of the 'script' property. If the value of the script property is 'auto, the 'auto' value is equivalent to 'alphabetic' for horizontal 'writing-mode' values and 'central' for vertical 'writing-mode' values. If the value of the script property is other than 'auto', the 'auto' value is equivalent to 'use-script'
Otherwise, if this property occurs on an inline-level element, then the baseline-identifier and the baseline-table components remain the same as those of the parent element. The baseline-table font-size also remains the same as the parent's one, unless the computed 'baseline-shift' value actually shifts the baseline; then the baseline-table font-size is set to the value of the 'font-size' property on this element. If there is no parent element, the dominant-baseline components are set as for the block elements.
use-script
The dominant baseline-identifier is set using the computed value of the 'script' property. The 'writing-mode' value, whether horizontal or vertical is used to select the baseline-table that correspond to that baseline-identifier. The baseline-table font-size component is set to the value of the 'font-size' property on this element.
no-change
The dominant baseline-identifier, the baseline-table and the baseline-table font-size remain the same as that of the parent.
reset-size
The dominant baseline-identifier and the baseline table remain the same, but the baseline-table font-size is changed to the value of the 'font-size' property on this element. This re-scales the baseline table for the current 'font-size'.
alphabetic
The dominant baseline-identifier is set to the 'alphabetic' baseline, the derived baseline-table is constructed using the 'alphabetic' baseline-table in the nominal font, and the baseline-table font-size is changed to the value of the 'font-size' property on this element. (The 'alphabetic' baseline is the standard baseline for Roman scripts.)
hanging
The dominant baseline-identifier is set to the 'hanging' baseline, the derived baseline- table is constructed using the 'hanging' baseline-table in the nominal font, and the baseline-table font-size is changed to the value of the 'font-size' property on this element.
ideographic
The dominant baseline-identifier is set to the 'ideographic' baseline, the derived baseline- table is constructed using the 'ideographic' baseline-table in the nominal font, and the baseline-table font-size is changed to the value of the 'font-size' property on this element.
mathematical
The dominant baseline-identifier is set to the 'mathematical' baseline, the derived baseline- table is constructed using the 'mathematical' baseline-table in the nominal font, and the baseline-table font-size is changed to the value of the 'font-size' property on this element.
central
The dominant baseline-identifier is set to be 'central'. The derived baseline-table is constructed from the defined baselines in a baseline-table in the nominal font. That font baseline-table is chosen using the following priority order of baseline-table names: 'ideographic', 'alphabetic', 'hanging' and 'mathematical'. The baseline-table is changed to the value of the 'font-size' property on this element.
middle
The dominant baseline-identifier is set to be 'middle'. The derived baseline-table is constructed from the defined baselines in a baseline-table in the nominal font. That font baseline-table is chosen using the following priority order of baseline-table names: 'alphabetic', 'ideographic', 'hanging' and 'mathematical'. The baseline-table is changed to the value of the 'font-size' property on this element.
text-after-edge
The dominant baseline-identifier is set to be 'text-after-edge'. The derived baseline-table is constructed from the defined baselines in a baseline-table in the nominal font. That font baseline-table is chosen using the following priority order of baseline-table names: 'alphabetic', 'ideographic', 'hanging' and 'mathematical'. The baseline-table is changed to the value of the 'font-size' property on this element.
text-before-edge
The dominant baseline-identifier is set to be 'text-before-edge'. The derived baseline-table is constructed from the defined baselines in a baseline-table in the nominal font. That font baseline-table is chosen using the following priority order of baseline-table names: 'alphabetic', 'ideographic', 'hanging' and 'mathematical'. The baseline-table is changed to the value of the 'font-size' property on this element.

Note: Computed baselines do not (necessarily) choose a defining baseline table from the nominal font. The expected baseline-tables that a font would have are those that correspond to the defined baselines. The catch is that the positions of the defined baselines -- the 'hanging', 'alphabetic', 'mathematical' and 'ideograph' baselines -- can be specified differently for different choices of which of these baselines is dominant. That is, the absolute value of the offset of an alphabetic baseline from the ideographic baseline in ideographic text may be different from the offset of the ideographic baseline from the alphabetic baseline in alphabetic text. Therefore, it matters which baseline-table from the nominal font is used for the defined baselines.

If there is no baseline-table in the nominal font or if the baseline-table lacks an entry for the desired baseline, then the user agent may use heuristics to determine the position of the desired baseline.

4.5. Aligning the alignment point of an element: the 'alignment-baseline' property

Name: alignment-baseline
Value: baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge |
central | middle | ideographic | alphabetic | hanging | mathematical
Initial: baseline
Applies to: inline-level elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

This property specifies how an inline-level element is aligned with respect to its parent. That is, to which of the parent's baselines the alignment point of this element is aligned. Unlike the 'dominant-baseline' property the 'alignment-baseline' property has no effect on its children dominant-baselines.

Note: The 'alignment-adjust' property specifies how the alignment point is determined and defaults to the baseline with the same name as the computed value of the alignment-baseline property.

Except for 'use-script', all baseline values refer to the respective baseline-identifier components of the dominant-baseline of the parent, and glyphs within the element are aligned similarly to the element itself. The description for 'use-script' covers these points specifically. The property values have the following meanings:

baseline
The alignment-point of the element being aligned is aligned with the dominant baseline of the parent.
use-script
If the element 'script' property value is 'auto', the alignment point of each glyph is aligned with the baseline-identifier of the script to which the glyph belongs. If the element 'script' property value is other than 'auto', the alignment point of each glyph is aligned with the baseline-identifier specified by the 'script' property. The baseline-identifier position is determined by using the relevant information related to the parent element dominant-baseline set. The alignment point of the element itself is aligned as for the 'baseline' value.
before-edge
The alignment point of the box is aligned with the 'before-edge' baseline of the line box.
text-before-edge
The alignment-point of the element being aligned is aligned with the 'text-before-edge' baseline of the parent.
after-edge
The alignment point of the box is aligned with the 'after-edge' baseline of the line box.
text-after-edge
The alignment-point of the element being aligned is aligned with the 'text-after-edge' baseline of the parent.
central
The alignment point of the box is aligned with the 'central' baseline of the parent.
middle
The alignment point of the box is aligned with the 'middle' baseline of the parent.
ideographic
The alignment-point of the element being aligned is aligned with the 'ideographic' baseline of the parent.
alphabetic
The alignment-point of the element being aligned is aligned with the lower baseline of the parent.
hanging
The alignment-point of the element being aligned is aligned with the hanging baseline of the parent.
mathematical
The alignment-point of the element being aligned is aligned with the mathematical baseline of the parent.

The values: before-edge, text-before-edge, after-edge and text-after-edge all work relatively to the writing-mode property values. For example 'before-edge' means 'top' in an horizontal writing mode and 'right' in a vertical writing mode.

Note. The reason why 'baseline' is the initial value instead of 'use-script' (called 'auto' in the similar XSL property) has to do with the fact that most fonts today are designed with an alignment point located at the 'alphabetical' level, even for glyphs belonging to non Latin scripts. User agents have to deal with that constraint, and therefore they use the 'baseline' value as initial.

4.6. Setting the alignment point: the 'alignment-adjust' property

Name: alignment-adjust
Value: auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>
Initial: auto
Applies to: inline-level elements
Inherited: no
Percentages: refers to the 'line-height' of the element
Media: visual
Computed value: see text

The 'alignment-adjust' property allows more precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the 'alignment-adjust' property, the position of the baseline identified by the 'alignment-baseline' can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. The user agent should use heuristics to determine the position of a non existing baseline for a given element.

Values for the property have the following meaning:

auto
For each glyph corresponding to textual information within the element, the alignment-point is the intersection of the start-edge of the glyph box and the block-progression-direction position of the alignment point from the font. Padding, border or margin do not affect that alignment point. The alignment point of the inline-level element itself is at the intersection of the start-edge of the first inline box and the baseline identified by the 'alignment-baseline' property if this baseline exists in the baseline-table for the element dominant-baseline. If that specific baseline does not exist, the user agent may use heuristics to determine where that missing baseline would be. For other inline box content like images, the user agent will use heuristics to determine the position of the alignment point. For example when the resulting baseline is 'alphabetic' or 'ideographic', it is expected that the alignment point will be at the intersection of the start-edge and the after-edge of the inline box, including its respective margin. If the resulting baseline is 'hanging', the intersection of the start-edge and the before-edge of the inline box, including its respective margin should be used instead.
When the 'alignment-baseline' property is set to either 'after-edge' or 'before-edge', the 'alignment-adjust: auto' value is equivalent to 'after-edge' or 'before-edge' respectively.
baseline
The alignment point is at the intersection of the start-edge of the element and the dominant-baseline of the element.
before-edge
The alignment point is at the intersection of the start-edge of the element and the before-edge of the extended inline box of the element. This may include or not the line-height of the element, depending on the line-stacking-strategy.
text-before-edge
The alignment point is at the intersection of the start-edge of the element and the 'text-before-edge' baseline of the element.
central
The alignment point is at the intersection of the start-edge of the element and the 'central' baseline of the element.
middle
The alignment point is at the intersection of the start-edge of the element and the 'middle' baseline of the element.
after-edge
The alignment point is at the intersection of the start-edge of the element and the after-edge of the extended inline box of the element. This may include or not the line-height of the element, depending on the line-stacking-strategy.
text-after-edge
The alignment point is at the intersection of the start-edge of the element and the 'text-after-edge' baseline of the element.
ideographic
The alignment point is at the intersection of the start-edge of the element and the 'ideographic' baseline of the element.
alphabetic
The alignment point is at the intersection of the start-edge of the element and the 'alphabetic' baseline of the element.
hanging
The alignment point is at the intersection of the start-edge of the element and the 'hanging' baseline of the element.
mathematical
The alignment point is at the intersection of the start-edge of the element and the 'mathematical' baseline of the element.
<percentage>
The computed value of the property is this percentage multiplied by the computed 'line-height' of the element. The alignment point is on the start-edge of the inline box. Its position along the start-edge relative to the intersection of the dominant-baseline and the start-edge is offset by the computed value. The offset is opposite to the shift-direction (positive value) or in the shift-direction (negative value). A value of '0%' makes the dominant-baseline the alignment point.
<length>
The alignment-point is on the start-edge of the inline box. Its position along the start-edge relative to the intersection of the dominant-baseline and the start-edge is offset by the <length> value. The offset is opposite to the shift-direction (positive value) or in the shift-direction (negative value). A value of '0cm' makes the dominant-baseline the alignment point.

4.7. Repositioning the dominant baseline: the 'baseline-shift' property

Name: baseline-shift
Value: baseline | sub | super | <percentage> | <length>
Initial: baseline
Applies to: inline-level elements
Inherited: no
Percentages: refers to the 'line-height' of the parent element
Media: visual
Computed value: see text

The 'baseline-shift' property allows repositioning of the dominant-baseline relative to the dominant-baseline. The shifted object might be a sub- or superscript. Within the shifted element, the whole baseline table is offset; not just a single baseline. For sub- and superscript, the amount of offset is determined from the nominal font of the parent.

Values for the property have the following meaning:

baseline
There is no baseline shift; the dominant baseline remains in its original position.
sub
The dominant baseline is shifted to the default position for subscripts. The offset for this position is determined by the font data for the parent nominal font as adjusted by the dominant baseline-table font-size of the parent element. If there is no applicable font data the User Agent may use heuristic to determine the offset.
super
The dominant baseline is shifted to the default position for superscripts. The offset for this position is determined by the font data for the parent nominal font as adjusted by the dominant baseline-table font-size of the parent element. If there is no applicable font data the User Agent may use heuristic to determine the offset.
<percentage>
The computed value of the property is this percentage multiplied by the computed 'line-height' of the parent element. The dominant-baseline is shifted in the shift-direction (positive value) or opposite to the shift-direction (negative value) of the parent area by the computed value. A value of '0%' is equivalent to 'baseline'.
<length>
The dominant-baseline is shifted in the shift-direction (positive value) or opposite to the shift-direction (negative value) of the parent area by the <length> value. A value of '0cm' is equivalent to 'baseline'.

Note. Although it may seem that 'baseline-shift' and 'alignment-adjust' properties are doing the same thing, there are important differences. For 'alignment-adjust' the percentage values refer to the 'line-height' of the element being aligned. For 'baseline-shift the percentage values refer to the 'line-height' of the parent element. Similarly, it is the 'sub' and 'super' offsets of the parent that are used to align the shifted baseline rather than the 'sub' and 'super' offsets of the element being positioned. To ensure a consistent sub- or superscript position, it makes more sense to use the parent as the reference rather than the subscript element which may have a changed "line-height" due to "font-size" changes in the sub- or superscript element.
Using the "alignment-adjust" property is more suitable for positioning elements, such as graphics, that have no internal textual structure. Using the "baseline-shift" property is intended for sub- and superscripts where the positioned element may itself be textual. The baseline-shift provides a way to define a specific baseline offset other than the named offsets that are defined relative to the dominant-baseline. In addition, having "baseline-shift" makes it easier for a tool to generate the relevant properties; many formatting programs already have a notion of baseline shift.

4.8. Vertical alignment: the 'vertical-align' shorthand baseline alignment property

Name: vertical-align
Value: auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>
Initial: not defined for shorthand properties
Applies to: inline-level and 'table-cell' elements
Inherited: no
Percentages: refers to the 'line-height' of the element itself
Media: visual
Computed value: see text

This property affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box. The following values only have meaning with respect to a parent inline-level element, or to a parent block-level element, if that element generates anonymous inline boxes; they have no effect if no such parent exists.

Note. Values of this property have slightly different meanings in the context of tables. Please consult the section on table height algorithms for details.

auto
Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box. If the element doesn't have a baseline, align the bottom of the inline box, including its margin with the parent's dominant baseline. If there is no parent or if there is a change of flow orientation between this element and its parent, the dominant baseline is set to 'alphabetic' for horizontal flow and 'central' for vertical flow.
use-script
Align the script preferred baseline of the element (determined by the computed script value) with the equivalent baseline of the parent element.
baseline
Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element. If the inline element doesn't have an 'alphabetic' baseline, align the bottom of the box, including its margin for replaced elements, with the parent's 'alphabetic' baseline. The dominant baseline is set to 'alphabetic' if there is no parent or if there is a flow orientation change between this element and its parent, otherwise it is set to 'no-change'.
central
Align the 'central' baseline of the inline element with the central baseline of the parent.
middle
Align the 'middle' baseline of the inline element with the middle baseline of the parent.
sub
Lower the baseline of the box to the proper position for subscripts of the parent's box. (This value has no effect on the font size of the element's text.)
super
Raise the baseline of the box to the proper position for superscripts of the parent's box. (This value has no effect on the font size of the element's text.)
text-top
Align the top of the box with the before-edge of the parent element's font.
text-bottom
Align the bottom of the box with the after-edge of the parent element's font.
<percentage>
Raise (positive value) or lower (negative value) the box by this distance (a percentage of the computed 'line-height' of the element). The value '0%' means the same as 'baseline'.
<length>
Raise (positive value) or lower (negative value) the box by this distance. The value '0cm' means the same as 'baseline'.

The remaining values refer to the line box in which the generated box appears:

top
Align the before edge of the extended inline box with the before-edge of the line box.
bottom
Align the after edge of the extended inline box with the after-edge of the line box.

The 'vertical-align' property values affect the baseline alignment properties for which it is a shorthand in the following manner:

vertical-align value alignment-baseline alignment-adjust baseline-shift dominant-baseline
auto baseline auto baseline auto
use-script use-script auto auto auto
baseline baseline auto baseline alphabetic (if no parent or different flow from parent)
no-change (otherwise)
sub baseline auto sub auto
super baseline auto super auto
top before-edge auto baseline auto
text-top text-before-edge auto baseline auto
centralcentralautobaselineauto
middle middle auto baseline auto
bottom after-edge auto baseline auto
text-bottom text-after-edge auto baseline auto
<percentage> baseline <percentage> baseline auto
<length> baseline <length> baseline auto

4.9. Inline box alignment: the 'inline-box-align' property

Name: inline-box-align
Value: initial | last | <integer>
Initial: last
Applies to: inline-block-level elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified value (except for initial and inherit)

The 'inline-box-align' property determines which line of a multi-line inline block align with the previous and next inline elements within a line. The alignment strategy for the inline lock itself (i.e. the definition of it alignment point and which parent baseline should be used for the alignment) is determined by the inline block element baseline alignment properties applicable to the line being used for the alignment. This property has no effect for single line inline block. Possible values:

initial
Use the initial line of the inline block element for alignment purpose.
last
Use the last line of the inline block element for alignment purpose.
<integer>
Use nth line (as determined by the integer value) of the inline block element for alignment purpose.

5. Initial line and Drop initial

5.1. Initial line

On a block element containing inline elements, the initial line is very often presented differently. For example it may use a difference typeface, a color, font-size or even casing (like all uppercase). The presentation of that initial line can be controlled by applying a limited set of style properties to the ::first-line pseudo element. Only the following properties can be applied to the ::first-line pseudo elements:

Although there is no properties only applicable to ::first-line pseudo elements, in essence the 'text-indent' property which is applied to 'block-level' elements is in fact only effective on the first line of the block element.

5.2. Drop Initial overview

Drop initial is a typographic effect emphasizing the initial letter(s) of a block element with a presentation similar to a 'floated' element. It can be described as the combination of the following effects:

The CSS mechanism to 'select' the drop initial content is the ::first-letter pseudo element. The first letter is defined as including all starting punctuation characters (defined in Unicode as 'open' (Ps), 'close' (Pe) and 'other' (Po), if any, followed by the first non-punctuation character cluster. A character cluster may be a single character, a combining sequences (base character followed by combining characters) or a stacked set of characters (like in Thai).

Only the following properties can be applied to the ::first-letter pseudo elements:

In addition, one property: 'text-indent' although applying to block-level elements is in fact effective on its first line of text and has therefore an influence on the indentation of the first-letter versus the start edge of the containing block. Using the 'text-indent' allows the correction of optical effect (like uppercase 'O') or even pushing the starting piece of the initial letter in a 'virtual' margin.

Editor's note: Additional drop initial features are desirable but are not described in this specification:

Some of these features (multiple letter and size) could be achieved by introducing a new display value, like 'display: drop-initial' which when applied to an inline element part of the first line could make it behave like a drop initial inline element.

The following figure shows first a simple case of a three line drop initial, and second a case of a two line drop initial but with a three line size initial letter.

simple drop caps

Typical drop initial cases:  sunken cap and partially raised cap

The bottom horizontal line in the first example shows the alignment between the baseline of the initial letter and the baseline of the third line of its block element. The primary connection point occurs at the intersection of these baselines between the two boxes (the third line box and the initial letter box). The top horizontal line shows a connection point between the top of the ink of the initial letter and the text-before-edge baseline of the initial line. Alternatively, instead of the text-before-edge baseline, a new computed alignment could be used which correspond loosely to the maximum caps-height of the initial line.

Typically the ink of drop initial characters 'fills' the space between the baseline and the text-before-edge, therefore 'taller' characters are processed accordingly. This is shown in the first two pictures of the following figure, using first an accentuated letter, and then a letter without accent.

drop caps showing case with and without accent

Drop initial with accent and without accent

The third picture shows a more correct effect with the acute accent drawn in the upper padding area. This effect is realized by having the secondary connection point between the initial letter caps height and the maximum caps height of the initial line.

Typically characters are stretched in both direction to fill the space between the primary and secondary connection lines (in the absence of an explicit drop initial size). Even if the character has no 'ink' at the primary connection line, the stretching is performed as if there were a 'virtual' point at that level. The following figure demonstrates the effect for the hyphen-minus character. The other two characters demonstrate the variable stretching  made by the drop initial effect.

drop cap with period, hyphen and exclamation point

Drop initial with period, hyphen and exclamation point

For characters that have only ink 'after' (below) their baseline there is really no good strategy. It may be better to use the font EM square as reference for symbols that have no ink at the primary connection line.

Some characters are always expected to be shown as if using their full EM square, even in drop initial situation. For example, this is the case for all ideograms and related characters like the Japanese Kana characters. The following figure shows how the ink of the character representing the number one in CJK (middle picture) is not stretched to hit the top of the text-before-edge of the initial line, but is instead stretched following the same ratio as the character in the left picture. The picture on the right shows that drop initial can also be used in vertical flow.

drop cap with ideographs

Drop initial with ideographic characters

Drop initial characters can be aligned using a variety of baselines for the drop initial alignment point used for the primary connection point. The examples above used the alphabetic and the ideographic baselines. The following figures compares the usage of the text-after-edge baseline (picture on the left) and the alphabetic baseline (picture on the right). Note that when the alphabetic baseline is used for characters that have ink below the baseline, the actual drop initial effect may occur through many more lines to accommodate the text-after-edge constraint.

drop cap with lowercase letters

Drop initial with lowercase characters

drop cap with uppercase q

Drop initial with uppercase character with descender

The drop initial effect may also be used for writing systems which use different alignment strategies. For example, in Devanagari the hanging baseline may be preferred. In that case the primary connection point connects the text-after-edge of the initial letter with the text-after-edge of the nth line, but the secondary connection point connects the hanging baselines of the initial letter and the initial line. This is shown in the following figure:

drop cap with devanagari

Drop initial with hanging devanagari characters

The drop initial effect is typically based on a number of lines, i.e. the combined line-height adjusted by the alignment strategies for the connection lines is used to determine the default size of the drop initial character. However there is a potential circular issue as the activation of the effect modifies the content of the lines and therefore may affect their line-height. The recommended strategy is to determine the drop initial character size using the initial combined line height and to possibly stretch the character along the new baseline if the combined line height is modified by the drop initial effect. The following figure shows the initial text on the left, an incorrect drop initial effect in the middle (no stretch applied) and a correct effect on the right (stretch applied).

drop cap with variable line heights

Drop initial with variable line heights

5.3. Sizing drop initial, the 'drop-initial-size' and the 'drop-initial-value' properties

Name: drop-initial-value
Value: initial | <integer>
Initial: initial
Applies to: ::first-letter pseudo element
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified values (except for initial and inherit)

The 'drop-initial-value' property is the basic property that activates a drop-initial effect. By providing a value different than 'initial or '1', the primary connection point is moved after the initial line. Possible values:

initial
The drop initial letter is aligned on the initial line
<integer>
The drop initial letter is sunken to the nth line (as determined by the integer value).
Name: drop-initial-size
Value: auto | <line> | <length> | <percentage>
Initial: auto
Applies to: ::first-letter pseudo element
Inherited: no
Percentages: refer to combined line height size as provided by drop-initial-value
Media: visual
Computed value: specified values (except for initial and inherit)

The 'drop-initial-size' property controls the partial sinking of the initial letter. Using any other value than 'auto' removes the secondary connection line constraint. Possible values:

auto
The drop initial letter is sized according to the constraints created by the the ink filling strategy and the two connection lines.
<line>
The drop initial letter is sized using the combined line height of the nth lines (as determined by the line value). The letter may be stretched on one dimension if the line height of each line is variable to avoid circular issues.
<length>
The drop initial letter is sized using the length value.
<percentage>
The drop initial letter is sized relatively to the combined line height of the n lines determined by the 'drop-initial-value' property value.

5.4. Aligning drop initial: the 'drop-initial-before-align', 'drop-initial-before-adjust', 'drop-initial-after-align' and 'drop-initial-after-adjust' properties

Name: drop-initial-after-align
Value: <'alignment-baseline'>
Initial: baseline
Applies to: ::first-letter pseudo element
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified values (except for initial and inherit)

The 'drop-initial-after-align' property determines which alignment line within the nth line box (n being defined by the 'drop-initial-value' property) is used at the primary connection point with the initial letter box. The values are the same as the 'alignment-baseline' property values.

Name: drop-initial-after-adjust
Value: central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>
Initial: text-after-edge
Applies to: ::first-letter pseudo element
Inherited: no
Percentages: refer to combined line height size as provided by drop-initial-value
Media: visual
Computed value: specified values (except for initial and inherit)

The 'drop-initial-after-adjust' property sets the alignment point of the drop initial for the primary connection point. Possible values:

central
The alignment point is at the intersection of the end-edge of the element and the 'central' baseline of the element.
middle
The alignment point is at the intersection of the end-edge of the element and the 'middle' baseline of the element.
after-edge
The alignment point is at the intersection of the end-edge of the element and the 'after-edge' of the extended inline box of the element. This may include or not the line-height of the element, depending on the line-stacking-strategy.
text-after-edge
The alignment point is at the intersection of the end-edge of the element and the 'text-after-edge' baseline of the element.
ideographic
The alignment point is at the intersection of the end-edge of the element and the 'ideographic' baseline of the element.
alphabetic
The alignment point is at the intersection of the end-edge of the element and the 'alphabetic' baseline of the element.
hanging
The alignment point is at the intersection of the end-edge of the element and the 'hanging' baseline of the element.
mathematical
The alignment point is at the intersection of the end-edge of the element and the 'mathematical' baseline of the element.
<percentage>
The computed value of the property is this percentage multiplied by the computed 'line-height' of the element. The alignment point is on the end-edge of the inline box and is offset from the after-edge by the computed value. A value of '0%' makes the text-after-edge the alignment point.
<length>
The alignment-point is on the end-edge of the inline box. Its position along the end-edge is offset from the after-edge by the <length> value. A value of '0cm' makes the text-after-edge the alignment point.
Name: drop-initial-before-align
Value: caps-height | <'alignment-baseline'>
Initial: caps-height
Applies to: ::first-letter pseudo element
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified values (except for initial and inherit)

The 'drop-initial-before-align' property determines which alignment line within the initial line box  is used at the secondary connection point with the initial letter box. This property is only effective is the value of the 'drop-initial-size' property is 'auto'. Possible values:

caps-height
The caps-height alignment line is used.
<'alignment-baseline'>
The values are the same as the 'alignment-baseline' property values.
Name: drop-initial-before-adjust
Value: before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>
Initial: text-before-edge
Applies to: ::first-letter pseudo element
Inherited: no
Percentages: refer to combined line height size as provided by drop-initial-value
Media: visual
Computed value: specified values (except for initial and inherit)

The 'drop-initial-before-adjust' property sets the alignment point of the drop initial for the secondary connection point. This property is only effective is the value of the 'drop-initial-size' property is 'auto'. Possible values:

before-edge
The alignment point is at the intersection of the end-edge of the element and the 'before-edge' of the extended inline box of the element. This may include or not the line-height of the element, depending on the line-stacking-strategy.
text-before-edge
The alignment point is at the intersection of the end-edge of the element and the 'text-before-edge' baseline of the element.
central
The alignment point is at the intersection of the end-edge of the element and the 'central' baseline of the element.
middle
The alignment point is at the intersection of the end-edge of the element and the 'middle' baseline of the element.
hanging
The alignment point is at the intersection of the end-edge of the element and the 'hanging' baseline of the element.
mathematical
The alignment point is at the intersection of the end-edge of the element and the 'mathematical' baseline of the element.
<percentage>
The computed value of the property is this percentage multiplied by the computed 'line-height' of the element. The alignment point is on the end-edge of the inline box and is offset from the text-before-edge by the computed value. A value of '0%' makes the text-before-edge the alignment point.
<length>
The alignment-point is on the end-edge of the inline box. Its position along the end-edge is offset from the text-before-edge by the <length> value. A value of '0cm' makes the text-before-edge the alignment point.

6. Properties index

In addition to the specified values, all properties take the initial and inherit values

Property Values Initial Applies to Inh. Percentages Media
alignment-adjust auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length> auto inline-level elements no refers to the 'line-height' of the element visual
alignment-baseline baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical baseline inline-level elements no N/A visual
baseline-shift baseline | sub | super | <percentage> | <length> baseline inline-level elements no refers to the 'line-height' of the parent element visual
dominant-baseline auto | use-script | no-change | reset-size | alphabetic | hanging | ideographic | mathematical | central | middle | text-after-edge | text-before-edge auto inline-level elements (but see prose) no N/A visual
drop-initial-after-adjust central | middle |  after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length> text-after-edge::first-letter pseudo elementno N/A visual
drop-initial-after-align <'alignment-baseline'>baseline::first-letter pseudo elementno N/A visual
drop-initial-before-adjust before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | hanging | mathematical | <percentage> | <length> text-before-edge::first-letter pseudo elementno N/A visual
drop-initial-before-align caps-height | <'alignment-baseline'>caps-height::first-letter pseudo elementno N/A visual
drop-initial-size auto | <line> | <length> | <percentage>auto ::first-letter pseudo elementno refers to combined line height size as provided by drop-initial-valuevisual
drop-initial-value initial | <integer> initial::first-letter pseudo elementno N/A visual
inline-box-align initial | last | <integer> last inline-block-level elements no N/A visual
line-height normal |  number | <length> <percentage> | nonenormal all elements and generated content yes refer to the font size of the element itselfvisual
line-stacking <'line-stacking-strategy'> || <'line-stacking-ruby'> || <'line-stacking-shift'> see individual properties block-level elements yes N/A visual
line-stacking-ruby exclude-ruby | include-rubyexclude-rubyblock-level elements yes N/Avisual
line-stacking-shift consider-shifts | disregard-shifts consider-shiftsblock-level elements yes N/Avisual
line-stacking-strategy inline-line-height | block-line-height | max-height | grid-height inline-line-heightblock-level elements yes N/A visual
text-height auto | font-size | text-size | max-sizeautoinline elements and parents of element with display:ruby-textyes N/A visual
vertical-align auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length> not defined for shorthand properties inline-level and 'table-cell' elements no refers to the 'line-height' of the element itself visual

The following properties are mentioned in this module, but are defined elsewhere:

7. Profiles

There are 3 modules defined by this chapter:

CSS1 line model:

CSS2 line model:

CSS3 line model:

The CSS1 line module is made of the following properties/values:

Name Values Initial Applies to Inherited Percentages Media groups
'line-height' normal | <number> | <length> | <percentage>normal all elements yes relative to the font-size of the element itselfN/A
'vertical-align' baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> baseline inline-level elements no N/A N/A

The following table describes the CSS2 text module. Because all properties have added the 'inherit' value and have a media type, all CSS1 properties have been specified below as well. In addition, the 'vertical-align' has a new value: <length>. Properties that applies to all elements also applies to generated content. Finally, 'vertical-align' also applies to table-cell elements.

.Name Values Initial Applies to Inherited Percentages Media groups
'line-height' normal | <number> | <length> | <percentage>normal all elements and generated contentyes relative to the font-size of the element itselfN/A
'vertical-align' baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length> | inherit baseline inline-level and table-cell elements no N/A visual

The CSS3 module adds the following properties:

It also modifies the following properties as described:


8. Glossary

Hiragana
Japanese syllabic script, or character of that script. Rounded and cursive in appearance. Subset of the Japanese writing system, used together with kanji and katakana. In recent times, mostly used to write Japanese words when kanji are not available or appropriate, and word endings and particles. Also see Katakana.
Ideograph
A character that is used to represent an idea, word, or word component, in contrast to a character from an alphabetic or syllabic script. The most well-known ideographic script is used (with some variation) in East Asia (China, Japan, Korea,...).
Kana
Collective term for hiragana and katakana.
Katakana
Subset of the Japanese writing system consisting of phonetic characters used to represent Roman words. Also see Hiragana.
Ruby
A run of text that appears in the vicinity of another run of text and serves as an annotation or a pronunciation guide for that text.


Appendix A: Usage of baseline alignment (informative)

The following appendix shows some examples of baseline alignment, exercising the related properties .

A simple example of alignment is shown in the following figure. The figure shows the presentation of two inline elements, one inside the other. These inline elements make up the content of a line in a block where the writing-mode is "lr-tb" and the font is "Helvetica". The structure of the example is as follows:

<p><span class="outer">Apex <span class="inner">Top</span></span></p>

with the style being defined as:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }

The other baseline alignment initial values apply. Since a horizontal writing-mode is in use, the dominant-baseline-identifier is set to "alphabetic" and the baseline-table is taken from the nominal-font for the block in which the line appears, which, in this case, is Helvetica.

In the figure, the positions of the baselines relative to the current font size are shown as red (staff) lines. These lines are labeled with abbreviations of the names of the baselines (e.g., TBE for "text-before-edge"). The baseline identified by the dominant-baseline-identifier (A) is shown in blue. There is a break in the staff lines to separately show the inner inline element. This is not necessary for this example, but this distinction will become important in subsequent examples.

The "alignment-baseline" property is the primary control on the positioning of an inner element with respect to its parent. The initial value of the "alignment-baseline" property is "baseline". This aligns the dominant-baseline of the inner inline element with the dominant baseline of the outer inline element. This is shown by the short blue line that connects the two separated staffs (A) in the figure.

The glyphs that are in the content of the two elements are aligned based on the script to which the glyph belongs. Since this example only has Latin glyphs, they are aligned to the "alphabetic" baseline.

alphabetic baseline

An inner inline element containing Latin characters aligned to an outer inline element also containing Latin characters.

In the next figure, the content of the inner inline element is in Gurmukhi, the script of the Punjabi language. The Gurmukhi syllables are read as "guru". Rather than use Unicode values for these characters, they are symbolized by placing the Latin transliteration in italic type. The structure of the example becomes (assuming the same style):

<p><span class="outer">Apex <span class="inner">guru</span></span></p>

The only change from the previous example is that the glyphs of the Gurmukhi script are aligned to the "hanging" baseline of the inner inline element. The alignment of that element itself, with respect to the outer inline element, is unchanged. The "hanging" baseline position is computed from the font-table part of the dominant-baseline set of the parent element (in this case the outer inline element which is getting itself the set from its parent, the block element).

alphabetic alignment

An inner inline element containing Gurmukhi characters aligned to an outer inline element containing Latin characters.

In the next figure, fragments of the text of the previous examples make up the content of the outer inline element. The inner inline element has a change of font-size, however. The structure is:

<p><span class="outer">Apguru <span class="inner">Exji</span></span></p>

with the following style:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }
span.inner { font-size: .75em; }

In this example, the alignment of the inner inline element itself does not change, nor does the alignment of the smaller glyphs inside the inner element. The Latin glyphs are still aligned to the "alphabetic" baseline and the Gurmukhi glyphs, which are pronounced "ji" are aligned to the "hanging" baseline. Note also that just changing the "font-size" property did not change the baseline-table in effect in the inner inline element.

baselines and font size

The inner inline element has a reduced font-size.

The next figure is equivalent to the previous example with the Gurmukhi character replaced by ideographic characters. These are aligned to the "ideographic" baseline.

baselines and font size

The previous figure redone with ideographic glyphs instead of Gurmukhi glyphs. The EM boxes are shown for the ideograms to clarify the alignment of these glyphs.

To change the scaling of the lines of the baseline table, it is necessary to use the "dominant-baseline" property on the inner inline element. The value of "reset-size" causes the baseline-table font-size to be reset from the font-size of the element on which the "dominant-baseline" property appears. The next figure shows the effect of this, using the structure:

<p><span class="outer">Apguru <span class="inner">Exji</span></span></p>

with the following style:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }
span.inner { font-size: .75em; dominant-baseline: reset-size; }

The alignment of the inner inline element, with respect to the outer inline element, is still determined by aligning the dominant baselines (alphabetic). But, the baseline-table of the inner inline element has been rescaled to the font-size of the inner inline element. Hence the smaller glyphs align with each other.

baseline tables

The baseline-table of the inner inline element has been resized to match the font-size of the inner inline element.

But, what if it is more important that the small Gurmukhi glyphs align with the large Gurmukhi glyphs than having the Latin glyphs align. There are at least two ways to achieve this. The structure:

<p><span class="outer">Apguru <span class="inner">Exji</span></span></p>

with the following style:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }
span.outer {dominant-baseline: hanging }
span.inner { font-size: .75em; dominant-baseline: reset-size; }

is illustrated in the next figure. The "hanging" baseline becomes the dominant baseline and the initial value of the "alignment-baseline" property causes the (newly) dominant "hanging" baselines to be aligned as is shown by the connection of the blue baselines.

dominant baseline

Changing the dominant baseline to the "hanging" baseline causes the inner inline element to be aligned on its parent's "hanging" baseline.

It is also possible to achieve the effect of the above figure without changing the dominant baseline. Instead it is sufficient to explicitly specify that the inner inline element is aligned on its "hanging" baseline. This is done by:

<p><span class="outer">Apguru <span class="inner">Exji</span></span></p>

with the following style:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }
span.inner { font-size: .75em; dominant-baseline: reset-size; alignment-baseline: hanging; }

The only change this approach would make in the above figure is to color the "hanging" baseline red and keep the "alphabetic" baseline as the (blue) dominant baseline. This baseline in the inner inline element would not (as it does not in the above figure) align with the "alphabetic" baseline in the outer inline element.

Another baseline alignment property is the "baseline-shift" property. Like the properties other than the "dominant-baseline" property, this property does not change the baseline-table or the baseline-table font-size. It does shift the whole baseline table of the parent element so that when an inner inline element is aligned to one of the parents baselines, the position of the inner inline element is shifted. This is illustrated in the next figure. The structure which creates this figure is:

<p><span class="outer">Apex <span class="inner">1ji</span></span></p>

with the following style:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }
span.inner { baseline-shift: super; }

Because the whole set of baseline-table staff lines are shifted to the position of the superscript baseline: it does not matter to which baseline the glyphs in the superscript are aligned. The European number "1" is aligned to the "alphabetic" baseline and the Gurmukhi syllable "ji" is aligned to the "hanging" baseline.

baseline shift

Using a "baseline-shift" for a superscript (or a subscript).

It is more common for the font-size of the superscript text to be smaller than the font-size of the text to which it is appended. Consider:

<p><span class="outer">Apex <span class="inner">1ji</span></span></p>

with the following style:

p { writing-mode: lr-tb; font: Helvetica; }
span { alignment-baseline: use-script; }
span.inner { baseline-shift: super; font-size: .75em; }

Because changing the font-size on a superscript (or subscript) is common, this is the one case where changing the font-size does cause the baseline-table font-size to be reset when the "dominant-baseline" property has its initial value. After the rescaling, the default alignment to the dominant baseline positions the inline element for the superscript to the dominant baseline position in the shifted baseline-table of the parent element.

baseline shift

Reducing the font-size of the superscript automatically resets the baseline-table size so that mixed languages in the superscript stay mutually aligned.


Acknowledgments

In additions to the authors, this specification would not have been possible without the help from:

Stephen Deach, Sujal Parikh, Grzegorz Zygmunt, Chris Wilson, David M Brown.


References

Normative references

Other references

[CSS2]
Bert Bos; H�kon Wium Lie; Chris Lilley; Ian Jacobs. Cascading Style Sheets, level 2. 1998. W3C Recommendation. URL: http://www.w3.org/TR/REC-CSS2
[CSS3-background]
Tim Boland; Bert Bos. CSS3 module: backgrounds. 19 February 2002. W3C working draft. (Work in progress.) URL: http://www.w3.org/TR/2002/WD-css3-background-20020219
[CSS3-color]
Tantek �elik; Chris Lilley. CSS3 module: color. 5 March 2001. W3C working draft. (Work in progress.) URL: http://www.w3.org/TR/2001/WD-css3-color-20010305
[CSS3-fonts]
Michel Suignard; Chris Lilley. CSS3 module: fonts. 31 July 2001. W3C working draft. (Work in progress.) URL: http://www.w3.org/TR/2001/WD-css3-fonts-20010731
[HTML40]
Raggett, D.; Le Hors, A.; Jacobs, I.. HTML 4.0 Specification (revised). Apr 1998. W3C Recommendation. URL: http://www.w3.org/TR/1998/REC-html40-19980424
[HTML401]
Raggett, D.; Le Hors, A.; Jacobs, I.. HTML 4.01 Specification. Dec 1999. W3C Recommendation. URL: http://www.w3.org/TR/1999/REC-html401-19991224
[ISO15924]
Code for the representation of names of scripts. International Organization for Standardization.. 1998. ISO 15924:1998. Draft International Standard
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. Internet RFC 2119. URL: http://www.ietf.org/rfc/rfc2119.txt
[SVG1.0]
Various. Scalable Vector Graphics (SVG) 1.0 Specification. Sep 2001. W3C Recommendation. URL: http://www.w3.org/TR/2001/REC-SVG-20010904
[UNICODE]
The Unicode Consortium. The Unicode Standard: Version 3.1.0. Addison Wesley Longman. 2000. ISBN 0-201-61633-5. The latest version of Unicode. For more information, consult the Unicode Consortium's home page at <a href="http://www.unicode.org/">http://www.unicode.org/</a> URL: http://www.unicode.org/unicode/standard/versions/enumeratedversions.html#Unicode_3_1_0
[UTR-24]
Mark Davis. Script Names. 27 September 2001. Unicode Technical Report #24. URL: http://www.unicode.org/unicode/reports/tr24/tr24-3.html
[XHTML1.0]
Steven Pemberton; et al. XHTML 1.0: The Extensible HyperText Markup Language. Jan 2000. W3C Recommendation. URL: http://www.w3.org/TR/2000/REC-xhtml1-20000126
[XHTMLMOD]
Adams, Robert; Altheim, Murray; et al. Modularization of XHTML. Apr 2001. W3C Recommendation. URL: http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410
[XML1.0]
Tim Bray; Jean Paoli; C. M. Sperberg-McQueen; Eve Maler. Extensible Markup Language (XML) 1.0 (Second Edition). Oct 2000. W3C Recommendation. URL: http://www.w3.org/TR/2000/REC-xml-20001006
[XSL1.0]
Adler, Sharon; Berglund, Anders; et al. Extensible Stylesheet Language (XSL) Version 1.0. Oct 2001. W3C Recommendation. URL: http://www.w3.org/TR/2001/REC-xsl-20011015

Changes from Previous Working Draft

New draft, but with a large piece taken out from former versions of CSS3 text and CSS2