Summarized test results:
White space

Intended audience: users, XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), CSS coders, Web project managers, and anyone who wants to know how language declarations work in current browsers.

Updated

These tests check whether the way browsers handle white space between source and display is as described in the CSS3 Text module. Far Eastern scripts don't typically use space characters in text, and some South East Asian scripts use spaces to separate phrases or sentences rather than words. This has implications, in particular, for handling of white space around line breaks in the source text.

Note that the snapshot summaries of these test results are for released versions of the browsers tested. Versions that are still in development may provide better support for these features. The tests themselves do not test any vendor prefixes.

Results

All tests so far rely on the normal default of the white-space property.

To see the test, click on the link in the left-most column. To see detailed results for a single test, click on the link in the right-most column. To submit test data for a single test, click on the link in the right-most column and then follow the link on that page.

The tables show the latest results from the W3C Test Framework. Below the tables are summaries of the results at a given date. The table data may be more up-to-date than the summary. The tables may also contain some incorrectly scored tests, and tests that relate to non-released versions of browsers. These are not included in the summary.

Default stylesheet: Wide, fullwidth and halfwidth

Assertion Gecko Presto Trident WebKit Detailed results
Wide characters around line break When displaying text the browser removes line breaks and any adjacent spaces in the source when they fall between two non-Hangul characters with the East Asian Width property of Wide.
Fullwidth characters around line break When displaying text the browser removes line breaks and any adjacent spaces in the source when they fall between two characters with the East Asian Width property of Fullwidth.
Halfwidth characters around line break When displaying text the browser removes line breaks and any adjacent spaces in the source when they fall between two characters with the East Asian Width property of Halfwidth.
Won and half width characters around line break When displaying text the browser removes line breaks and any adjacent spaces in the source when they fall between a Won sign and a character with the East Asian Width property of Halfwidth.
Wide character and non-wide character around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between a character with the East Asian Width property of Wide and another character that is neither Wide, Fullwidth or Halfwidth.
Fullwidth character and non-fullwidth character around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between a character with the East Asian Width property of Fullwidth and another character that is neither Wide, Fullwidth or Halfwidth.
Halfwidth character and non-halfwidth character around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between a character with the East Asian Width property of Halfwidth and another character that is neither Wide, Fullwidth or Halfwidth.
Wide and fullwidth characters around line break When displaying text the browser removes line breaks and any adjacent spaces in the source when they fall between two non-Hangul characters with the East Asian Width properties of Wide and Fullwidth, respectively.
Fullwidth and halfwidth characters around line break When displaying text the browser removes line breaks and any adjacent spaces in the source when they fall between two non-Hangul characters with the East Asian Width properties of Fullwidth and Halfwidth, respectively.

Snapshot summary, 2012-08-23
Chrome 21.0.1180.82, Firefox 14.0.1, Internet Explorer 9.0, Opera 12.01, Safari 5.1.7

No browsers removed white space between characters where expected.

All browsers passed the tests where white space was expected, though this is of little relevance while the other tests fail.

Notes:

  1. When running IE8 on Windows XP, the space was displayed on the page for tests 001-004 and 008-009, but if you copy and paste the displayed result into another application the space is actually missing (desired result), but only for the subtest where there is no additional white space around the line break.

Default stylesheet: Hangul

Assertion Gecko Presto Trident WebKit Detailed results
Hangul characters around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between two characters from the Unicode Hangul block.
Hangul jamo characters around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between two characters from the Unicode Jamo block.
Hangul halfwidth jamo characters around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between two characters from the Unicode Halfwidth Jamo block.

The CSS spec excludes Hangul from the set of characters where white space should be removed from source text line breaks. This is because Korean uses spaces between words, like in English. These tests check that, if the white space between wide characters is removed, Hangul characters are not affected. There are tests for hangual jamo characters in Unicode as well as hangul syllables.

Snapshot summary, 2012-08-23
Chrome 21.0.1180.82, Firefox 14.0.1, Internet Explorer 9.0, Opera 12.01, Safari 5.1.7

All browsers passed these tests, but this is of little relevance while the tests for white space between wide characters fail.

Default stylesheet: Thai

Assertion Gecko Presto Trident WebKit Detailed results
Thai characters around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between two Thai characters.
Thai and Latin characters around line break When displaying text the browser replaces line breaks and any adjacent spaces in the source with a single space when they fall between a Thai and a Latin character.
Thai with ZWSP before line break When displaying text the browser removes line breaks and any adjacent spaces in the source when the first line ends with a ZWSP (zero width space) character.
Thai with ZWSP after line break When displaying text the browser removes line breaks and any adjacent spaces in the source when the first line ends with a ZWSP (zero width space) character.

Thai, Khmer, Myanmar, and other scripts don't use spaces to separate words, but instead use them to separate phrases or sentences. The CSS spec provides for a way to break a long sentence across two lines in the source text by using a ZWSP at the end or beginning of a line. The ZWSP is often used in these scripts to identify word boundaries.

Snapshot summary, 2012-08-23
Chrome 21.0.1180.82, Firefox 14.0.1, Internet Explorer 9.0, Opera 12.01, Safari 5.1.7

All browsers reduced white space around a line break in the source to a single space on display, but no browser removed the white space if there was a ZWSP before or after the line feed. This may cause problems for people creating content in the scripts mentioned above.

Default stylesheet: Inline spaces

Assertion Gecko Presto Trident WebKit Detailed results
Wide, inline spaces When displaying text the browser reduces multiple adjacent spaces in the source to a single space when they fall between two characters with the East Asian Width property of Wide.
Fullwidth, inline spaces When displaying text the browser reduces multiple adjacent spaces in the source to a single space when they fall between two characters with the East Asian Width property of Fullwidth.
Halfwidth, inline spaces When displaying text the browser reduces multiple adjacent spaces in the source to a single space when they fall between two characters with the East Asian Width property of Halfwidth.

These tests serve to check that in the circumstances where white space around a line end in the source is removed for display, that spaces in the middle of a line are not also removed.

Snapshot summary, 2012-08-23
Chrome 21.0.1180.82, Firefox 14.0.1, Internet Explorer 9.0, Opera 12.01, Safari 5.1.7

All browsers passed these tests, but this is of little relevance while the tests for line-end white space between wide, fullwidth and halfwidth characters fail (see above).