Thought I’d try out Hyphens

On 27 Nov 2012 what should appear in Google Reader but a post called Hyphenation works! by PPK. I'm trying a little experiment here in that I set text-align: justify and turned on hyphenation. It's pretty easy, you tell the browser which language to use with a lang attribute. I'm declaring the language on the html element.

<html lang="en">

Next you add the CSS.

text-align: justify; /* optional */
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto;

I believe hyphenation makes justified text work on the web. Tell me what you think.

Update: After seeing that Chrome does not support hyphenation, I removed text-align: justify so that text is easier to read in Chrome. At least until Chrome supports hyphenation.

1 Comments

Gravatar Image1. Posted at 12/31/2012 11:10:23 AM by Tanny O'Haley

After seeing that Chrome does not support hyphenation, I believe I will take out text-align: justify so that the text is easier to read in Chrome. At least until Chrome supports hyphenation.

Add a comment

Discussion for this entry is now closed.