My client has requested to enable auto-hyphenation on this page: http://carlosdinizart.com/biography/ , and I realized I've never actually seen it done on a web-page.
Is it possible to set up auto-hyphenation in an HTML document with just HTML/CSS? If not - what are the options?
Thanks a lot in advance for any assistance!
CSS3 provides some support for this. Source: http://drublic.de/blog/css3-auto-hyphenation-for-text-elements/ You can check the w3c documentation here: http://www.w3.org/TR/2011/WD-css3-text-20110901/#hyphenation
CSS3 adds six properties to the list of useful thing. These are:
hyphenate-resourceso the browser has a better chance to render your text with the right hyphenation.
hyphenate-beforesets a minimum number of characters before the hyphenation.
hyphenate-afterdoes the same as
hyphenate-beforebut for characters after the hyphenation.
hyphenate-linesdefines about how many lines a hyphenated word is written at a maximum. with
hyphenate-characteryou can specify which HTML-entity should be used, e.g.
The main property of this stack is
hyphens. It accepts one of three values:
auto. The default one is manual, where you can set hyphens via
auto it the better one for continuous text while words get split if possible and available. And
none does not hyphenate at all even if there is a character set for a possible line break in a certain word.
Browser support information here: http://caniuse.com/css-hyphens