Text

Back to the index.

CSS3 text | CSS3 text decoration | CSS3 fonts

Here are the tests for the Text and Text Decoration modules.

This is the desktop table. See also the mobile table.

Last major update on 23 February 2013.

Fonts

Here are a few common font declarations. Eventually I’m going to do full font tests, at which time they’ll be moved to the Fonts compatibility table.

Declaration IE7 IE8 IE9 IE10 FF 19 Win FF 19 Mac Safari 6.0.2 Mac Chrome 25 Win Chrome 25 Mac Yandex 1.5 Mac Opera 12.14 Win Opera 12.14 Mac
Italic Yes Yes Yes Yes Yes
 
Small-caps Yes Yes Yes Yes Yes
 
Bold, in several flavours Basic Yes Basic Yes Yes Basic Yes Basic
Basic
Browser only supports normal and bold, even though it has a font with more than two weights installed.

Decoration

Declaration IE7 IE8 IE9 IE10 FF 19 Win FF 19 Mac Safari 6.0.2 Mac Chrome 25 Win Chrome 25 Mac Yandex 1.5 Mac Opera 12.14 Win Opera 12.14 Mac
Yes Almost Yes Yes Almost
Almost
Browser also supports blink. Yes, this is a value judgement. Also, there are some differences between the supporting browsers. Have fun.
Prefixed No Yes No No No
 
Create a text-shadow. No Yes Yes Yes Yes Yes
 
almost Yes almost almost almost
Almost
Browser does not support full-width.

Alignment and justification

Declaration IE7 IE8 IE9 IE10 FF 19 Win FF 19 Mac Safari 6.0.2 Mac Chrome 25 Win Chrome 25 Mac Yandex 1.5 Mac Opera 12.14 Win Opera 12.14 Mac
To align the text left, center, or right Incomplete Yes Yes Yes Incomplete
Incomplete
Browser does not support start and end.

No browser supports start end.

To align the last line of text. Prefixed No Yes No No No
 
Incomplete No No No No

IE7 and up support distribute and the non-standard newspaper. IE8 added support for inter-ideograph and the -ms- prefix. So from IE8 on the three values are supported prefixed and unprefixed. All six values do exactly the same.

Spacing

Declaration IE7 IE8 IE9 IE10 FF 19 Win FF 19 Mac Safari 6.0.2 Mac Chrome 25 Win Chrome 25 Mac Yandex 1.5 Mac Opera 12.14 Win Opera 12.14 Mac
Yes Yes Yes Yes Yes

I read, but did not test, that there are sub-pixel bugs in at least IE9 and lower.

To set the size of the tabs No -moz- No Yes -o-
Incomplete Yes Yes Yes Yes Yes
  • IE7 makes the indentation in the percentual test far too large. Not sure if this is a bug, but it’s certainly something to keep in mind.

The each-line and hanging keywords are not supported.

To remove text wrapping or to make an element behave like a pre Incomplete Yes Yes Yes Yes Yes
  • IE5.5 only supports nowrap.
  • IE6 and 7 do not support pre-wrap and pre-line.
Yes Yes Yes Yes Yes

No browser supports percentages.

Hyphenation and breaking

Declaration IE7 IE8 IE9 IE10 FF 19 Win FF 19 Mac Safari 6.0.2 Mac Chrome 25 Win Chrome 25 Mac Yandex 1.5 Mac Opera 12.14 Win Opera 12.14 Mac
To hyphenate a text Prefixed No Yes Yes Yes Incomplete No
Incomplete
Browser supports none but not auto.
No No No Yes No Yes
 
Yes Yes Yes Yes Yes
 

Not supported

The following properties are not supported by any browser.

Not tested

There are no tests for line-break, word-break, text-underline-position, and text-emphasis because they only apply to East Asian languages, which I can’t read.

Example texts

The most common example text is this one:

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

In some tests I use a Dutch example text, because Dutch, like German, allows for unlimited word concatenation (even though it gets a bit silly after 25 or so characters).

Though a bit contrived, the example is valid Dutch, and it contains “Rijksluchtvaartdienstweerschepenpersoneel ” — the word I was taught as a child is the longest in Dutch.

Het onderafdelingshoofd Rijksluchtvaartdienstweerschepenpersoneel verontschuldigde zich voor de commissievergadering over de gereviseerde gelijkheidsbeginselencirculaire.
Dit geschiedde uit hoofde van zijn medeverantwoordelijkheid voor de functieomschrijvingswijzigingsproblematiek.