The hyphens CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate.

Hyphenation rules are language-specific. In HTML, the language is determined by the lang attribute, and browsers will hyphenate only if this attribute is present and if an appropriate hyphenation dictionary is available. In 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

/* Keyword values */
hyphens: none;
hyphens: manual;
hyphens: auto;

/* Global values */
hyphens: inherit;
hyphens: initial;
hyphens: unset;

The hyphens property is specified as a single keyword value chosen from the list below.

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 below for details.
auto
The browser is free to automatically break words at appropriate hyphenation points, following whatever rules it chooses to use. However, suggested line break opportunities (see Suggesting line break opportunities below) will override automatic break point selection when present.

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.

Formal syntax

none | manual | auto

Suggesting line break opportunities

There are two Unicode characters 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 marks a place where the browser should break the word if hyphenation is necessary. In HTML, you can use ­ to insert a soft hyphen.

Example

This example uses three classes, one for each possible configuration of the hyphens property.

HTML

<ul>
  <li><code>none</code>: no hyphen; overflow if needed
    <p lang="en" class="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" class="manual">An extreme&shy;ly long English word</p>
  </li>
  <li><code>auto</code>: hyphen where the algorithm is deciding (if needed)
    <p lang="en" class="auto">An extreme&shy;ly long English word</p>
  </li>
</ul>

CSS

p { 
  width: 55px;
  border: 1px solid black;
 }
p.none {
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}
p.manual {
  -webkit-hyphens: manual;
  -ms-hyphens: manual;
  hyphens: manual;
}
p.auto {
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

Result

Specifications

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

Initial valuemanual
Applies toall elements
Inheritedyes
Mediavisual
Computed valueas specified
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Partial support 55
Notes
Partial support 55
Notes
Notes auto value is only supported on macOS and Android.
Full support 13
Prefixed Notes
Prefixed Requires the vendor prefix: -webkit-
Notes Only -webkit-hyphens: none is supported.
Edge Full support 12
Prefixed Notes
Full support 12
Prefixed Notes
Prefixed Requires the vendor prefix: -ms-
Notes Automatic hyphenation only works for languages with hyphenation dictionaries that are integrated into Internet Explorer.
Firefox Full support 43
Full support 43
Full support 6
Prefixed Notes
Prefixed Requires the vendor prefix: -moz-
Notes Automatic hyphenation only works for languages with hyphenation dictionaries that are integrated into Firefox.
IE Full support 10
Prefixed Notes
Full support 10
Prefixed Notes
Prefixed Requires the vendor prefix: -ms-
Notes Automatic hyphenation only works for languages with hyphenation dictionaries that are integrated into Internet Explorer.
Opera Partial support 44
Notes
Partial support 44
Notes
Notes auto value is only supported on macOS and Android.
Safari Full support 5.1
Prefixed
Full support 5.1
Prefixed
Prefixed Requires the vendor prefix: -webkit-
WebView Android Full support 55
Full support 55
Full support 4
Prefixed
Prefixed Requires the vendor prefix: -webkit-
Chrome Android Full support 55
Full support 55
Full support Yes
Prefixed
Prefixed Requires the vendor prefix: -webkit-
Edge Mobile ? Firefox Android Full support 43
Full support 43
Full support 6
Prefixed Notes
Prefixed Requires the vendor prefix: -moz-
Notes Automatic hyphenation only works for languages with hyphenation dictionaries that are integrated into Firefox.
Opera Android Full support 44Safari iOS Full support 4.2
Prefixed
Full support 4.2
Prefixed
Prefixed Requires the vendor prefix: -webkit-
Samsung Internet Android Full support 6.0
Hyphenation dictionary for Afrikaans (af, af-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Bosnian, Serbian, and Serbo-Croatian (sh, sh-*, sr, sr-*, bs, bs-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Bulgarian (bg, bg-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Catalan (ca, ca-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Croatian (hr, hr-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Czech (cs, cs-*)Chrome ? Edge ? Firefox No support NoIE Full support 10Opera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Esperanto (eo, eo-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Estonian (et, et-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Danish (da, da-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Dutch (nl, nl-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Finnish (fi, fi-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for French (fr, fr-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Galician (gl, gl-*)Chrome ? Edge ? Firefox Full support 9IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for German, Reformed Orthography of 1996 (de, de-1996, de-DE, de-AT, de-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for German, Traditional Orthography of 1901 (de-1901, de-AT-1901, de-DE-1901)Chrome ? Edge ? Firefox Full support 8IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for German, Swiss Orthography (de-CH, de-CH-*)Chrome ? Edge ? Firefox Full support 8IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Hungarian (hu, hu-*)Chrome ? Edge ? Firefox Full support 9IE No support NoOpera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Icelandic (is, is-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Interlingua (ia, ia-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Italian (it, it-*)Chrome ? Edge ? Firefox Full support 9IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Kurmanji (kmr, kmr-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Latin (la, la-*)Chrome Full support YesEdge ? Firefox Full support 8IE No support NoOpera Full support 44Safari No support NoWebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support 44Safari iOS ? Samsung Internet Android Full support Yes
Hyphenation dictionary for Lithuanian (lt, lt-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Mongolian (mn, mn-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Norwegian (Bokmål) (no, no-*, nb, nb-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Norwegian (Nynorsk) (nn, nn-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Polish (pl, pl-*)Chrome ? Edge ? Firefox Full support 31IE Full support 10Opera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Portuguese (pt, pt-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Brazilian Portuguese (pt-BR)Chrome ? Edge ? Firefox Full support 8
Notes
Full support 8
Notes
Notes For Brazilian Portuguese, Firefox uses a Portuguese dictionary.
IE Full support 10Opera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Russian (ru, ru-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Slovenian (sl, sl-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Spanish (es, es-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Swedish (sv, sv-*)Chrome ? Edge ? Firefox Full support 8IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Turkish (tr, tr-*)Chrome ? Edge ? Firefox Full support 9IE Full support 10Opera ? Safari Full support 5.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Ukrainian (uk, uk-*)Chrome ? Edge ? Firefox Full support 9IE No support NoOpera ? Safari Full support 9.1WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Upper Sorbian (hsb, hsb-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for Welsh (cy, cy-*)Chrome ? Edge ? Firefox Full support 8IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
Hyphenation dictionary for English (en, en-*)Chrome Full support 55Edge ? Firefox Full support 6
Notes
Full support 6
Notes
Notes For English, Firefox uses an en-US dictionary
IE Full support 10Opera Full support 44Safari Full support 5.1
Notes
Full support 5.1
Notes
Notes For English, Safari uses different en-GB and en-US dictionaries.
WebView Android Full support 55Chrome Android Full support 55Edge Mobile ? Firefox Android ? Opera Android Full support 44Safari iOS ? Samsung Internet Android Full support 6.0

Legend

Full support  
Full support
Partial support  
Partial support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also