Your Search Results

    -webkit-hyphens Redirect 1

    This is an experimental technology
    Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

    Summary

    The hyphens CSS property tells the browser how to go about splitting words to improve the layout of text when line-wrapping. On HTML, the language is determined by the lang attribute: browsers will hyphenate only if this attribute is present and if an appropriate hyphenation dictionary is available. On XML, the xml:lang attribute must be used.

    Note: The rules defining how hyphenation is performed are not explicitly defined by the specification, so the exact hyphenation may vary from browser to browser.

    Syntax

    Formal syntax: none | manual | auto
    
    hyphens: none
    hyphens: manual
    hyphens: auto
    
    hyphens: inherit
    

    Values

    none
    Words are not broken at line breaks, even if characters inside the words suggest line break points. Lines will only wrap at whitespace.
    manual
    Words are broken for line-wrapping only where characters inside the word suggest line break opportunities. See Suggesting line break opportunities for details.
    auto
    The browser is free to automatically break words at appropriate hyphenation points, following whatever rules it chooses to use. Suggested line break opportunities, as covered in Suggesting line break opportunities, should be preferred over automatically selecting break points whenever possible.
    Note: The auto setting's behavior depends on the language being properly tagged so that the appropriate hyphenation rules can be selected. You must specify a language using the lang HTML attribute in order to guarantee that automatic hyphenation is applied in the language of your choice.

    Suggesting line break opportunities

    There are two Unicode character that can be used to manually specify potential line break points within text:

    U+2010 (HYPHEN)
    The "hard" hyphen character indicates a visible line break opportunity. Even if the line is not actually broken at that point, the hyphen is still rendered.
    U+00AD (SHY)
    An invisible, "soft" hyphen. This character is not rendered visibly; instead, it suggests a place where the browser might choose to break the word if necessary. In HTML, you can use ­ to insert a soft hyphen.

    Example

    This CSS snippet creates three classes, one for each possible configuration of the hyphens property.

    <ul>
      <li><code>none</code>: no hyphen; overflow if needed
        <p lang="en" id="none">An extreme&shy;ly long English word</p>
      </li>  
      <li><code>manual</code>: hyphen only at &amp;hyphen; or &amp;shy; (if needed)
        <p lang="en" id="manual">An extreme&shy;ly long English word</p>
      </li>
      <li><code>auto</code>: hyphen where the algo is deciding (if needed)
        <p lang="en" id="auto">An extreme&shy;ly long English word</p>
      </li>
    </ul>
    
    p { 
      width: 55px;
      border: 1px solid black;
     }
    p#none {
      -moz-hyphens: none;
      hyphens: none;
    }
    p#manual {
      -moz-hyphens: manual;
      hyphens: manual;
    }
    p#auto {
      -moz-hyphens: auto;
      hyphens: auto;
    }
    

    Specifications

    Specification Status Comment
    CSS Text Level 3
    The definition of 'hyphens' in that specification.
    Working Draft  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support 13-webkit
    No automatic hyphenation.
    6.0 (6.0)-moz
    Automatic hyphenation only works for languages whose hyphenation dictionaries are integrated in Gecko. See this note for a complete list of such languages.
    10.0 -ms
    Automatic hyphenation only works for languages whose hyphenation dictionaries are integrated in Internet Explorer. See this note for a complete list of such languages.
    Not supported 5.1-webkit
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support 4.0-webkit
    No automatic hyphenation.
    6.0 (6.0)-moz
    Automatic hyphenation only works for languages whose hyphenation dictionaries are integrated in Gecko. See this note for a complete list of such languages.
    Not supported Not supported 4.2-webkit

    Notes on supported languages

    Various browsers supply hyphenation dictionaries for the following languages:

    Language Firefox IE
    Afrikaans (af) 8.0  
    Bulgarian (bg) 8.0  
    Catalan (ca) 8.0 10.0
    Czech   10.0
    Swiss German, Traditional Orthography (de-CH) 8.0  
    Danish (da) 8.0 10.0
    Dutch (nl) 8.0 10.0
    English (en) ?? 10.0
    English, United States (en-US) 6.0 10.0
    Esperanto (eo) 8.0  
    Estonian (et) 8.0  
    Finnish (fi) 8.0  
    French (fr) 8.0 10.0
    Galician (gl) 9.0  
    German, Traditional Orthography (de-1901) 8.0 ??
    German, Reformed Orthography (de-1996) 8.0 10.0
    Hungarian (hu) 9.0  
    Icelandic (is) 8.0  
    Interlingua (ia) 8.0  
    Italian (it) 9.0 10.0
    Kurmanji (kmr) 8.0  
    Latin (la) 8.0  
    Lithuanian (lt) 8.0  
    Mongolian (mn) 8.0  
    Norwegian Bokmål (nb) 8.0 10.0
    Norwegian Nynorsk (nn) 8.0 10.0
    Polish   10.0
    Portuguese (pt) 8.0 10.0
    Brazilian Portuguese   10.0
    Russian (ru) 8.0 10.0
    Serbo-Croatian (sh) 8.0  
    Slovenian (sl) 8.0  
    Spanish (es) 8.0 10.0
    Swedish (sv) 8.0 10.0
    Turkish (tr) 9.0 10.0
    Ukrainian (uk) 9.0  
    Upper Sorbian (hsb) 8.0  
    Welsh (cy) 8.0  

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy
    Last updated by: Sheppy,
    Hide Sidebar