Widely availableSupported across all major browsers. Safe to use in production.

Overview

The hyphens CSS property controls when long words are broken by line wrapping. Although called hyphens, the property applies to word-splitting behavior across languages, such as customary spelling changes or the use of other characters. Support for non-English languages varies significantly.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
55
79
43
17
55
17
auto

`auto` value

88
88
6
5.1
55
4.2
language afrikaans

Hyphenation dictionary for Afrikaans (af, af-*)

112
112
8
112
language albanian

Hyphenation dictionary for Albanian (sq, sq-*)

112
112
112
language amharic

Hyphenation dictionary for Ahmaric (am, am-*)

112
112
112
language armenian

Hyphenation dictionary for Armenian (hy, hy-*)

87
87
87
language assamese

Hyphenation dictionary for Assamese (as, as-*)

87
87
87
language basque

Hyphenation dictionary for Basque (be, be-*)

87
87
87
language belarusian

Hyphenation dictionary for Belarusian (be, be-*)

87
87
87
language bengali

Hyphenation dictionary for Bengali (bn, bn-*)

87
87
87
language bosnian

Hyphenation dictionary for Bosnian, Serbian, and Serbo-Croatian (sh, sh-*, sr, sr-*, bs, bs-*)

8
language bulgarian

Hyphenation dictionary for Bulgarian (bg, bg-*)

87
87
8
87
language catalan

Hyphenation dictionary for Catalan (ca, ca-*)

8
5.1
5
language croatian

Hyphenation dictionary for Croatian (hr, hr-*)

87
87
8
9.1
87
9.3
language cyrillic mongolian

Hyphenation dictionary for Mongolian (Cyrillic) (mn-cyrl, mn-cyrl-*)

87
87
87
language czech

Hyphenation dictionary for Czech (cs, cs-*)

112
112
130
9.1
112
9.3
language danish

Hyphenation dictionary for Danish (da, da-*)

87
87
8
5.1
87
5
language dutch

Hyphenation dictionary for Dutch (nl, nl-*)

112
112
8
5.1
112
5
language english

Hyphenation dictionary for English (en, en-*)

55
12
6
5.1
55
5
language esperanto

Hyphenation dictionary for Esperanto (eo, eo-*)

8
language estonian

Hyphenation dictionary for Estonian (et, et-*)

87
87
8
87
language ethiopic script mul

Hyphenation dictionary for Ethiopic script (mul-ethi, mul-ethi-*)

112
112
112
language ethiopic script und

Hyphenation dictionary for Ethiopic script (und-ethi, und-ethi-*)

87
87
87
language finnish

Hyphenation dictionary for Finnish (fi, fi-*)

8
9.1
9.3
language french

Hyphenation dictionary for French (fr, fr-*)

87
87
8
5.1
87
5
language galician

Hyphenation dictionary for Galician (gl, gl-*)

112
112
9
112
language georgian

Hyphenation dictionary for Georgian (ka, ka-*)

112
112
112
language german reformed orthography

Hyphenation dictionary for German, Reformed Orthography of 1996 (de, de-1996, de-DE, de-AT, de-*)

87
87
8
5.1
87
5
language german swiss orthography

Hyphenation dictionary for German, Swiss Orthography (de-CH, de-CH-*)

87
87
8
87
language german traditional orthography

Hyphenation dictionary for German, Traditional Orthography of 1901 (de-1901, de-AT-1901, de-DE-1901)

87
87
8
87
language gujarati

Hyphenation dictionary for Gujarati (gu, gu-*)

87
87
87
language hindi

Hyphenation dictionary for Hindi (hi, hi-*)

87
87
87
language hungarian

Hyphenation dictionary for Hungarian (hu, hu-*)

87
87
9
9.1
87
9.3
language icelandic

Hyphenation dictionary for Icelandic (is, is-*)

8
language interlingua

Hyphenation dictionary for Interlingua (ia, ia-*)

8
language irish

Hyphenation dictionary for Irish (ga, ga-*)

87
87
87
language italian

Hyphenation dictionary for Italian (it, it-*)

112
112
9
5.1
112
5
language kannada

Hyphenation dictionary for Kannada (kn, kn-*)

87
87
87
language kurmanji

Hyphenation dictionary for Kurmanji (kmr, kmr-*)

8
language latin

Hyphenation dictionary for Latin (la, la-*)

87
87
8
87
language latvian

Hyphenation dictionary for Latvian (lv, lv-*)

112
112
112
language lithuanian

Hyphenation dictionary for Lithuanian (lt, lt-*)

112
112
8
112
language malayalam

Hyphenation dictionary for Malayalam (ml, ml-*)

87
87
87
language marathi

Hyphenation dictionary for Marathi (mr, mr-*)

87
87
87
language modern greek

Hyphenation dictionary for Modern Greek (el, el-*)

112
112
112
language mongolian

Hyphenation dictionary for Mongolian (mn, mn-*)

8
language norwegian nn

Hyphenation dictionary for Norwegian (Nynorsk) (nn, nn-*)

87
87
8
87
5
language norwegian no

Hyphenation dictionary for Norwegian (Bokmål) (no, no-*, nb, nb-*)

87
87
8
5.1
87
5
language old slavonic

Hyphenation dictionary for Old Slavonic (cu, cu-*)

87
87
87
language oriya

Hyphenation dictionary for Oriya (or, or-*)

87
87
87
language polish

Hyphenation dictionary for Polish (pl, pl-*)

31
9.1
9.3
language portuguese

Hyphenation dictionary for Portuguese (pt, pt-*)

87
87
8
9.1
87
9.3
language punjabi

Hyphenation dictionary for Punjabi/Panjabi (pa, pa-*)

87
87
87
language russian

Hyphenation dictionary for Russian (ru, ru-*)

112
112
8
5.1
112
5
language slovak

Hyphenation dictionary for Slovak (sk, sk-*)

112
112
130
112
language slovenian

Hyphenation dictionary for Slovenian (sl, sl-*)

87
87
8
87
language spanish

Hyphenation dictionary for Spanish (es, es-*)

87
87
8
5.1
87
5
language swedish

Hyphenation dictionary for Swedish (sv, sv-*)

112
112
8
5.1
112
5
language tamil

Hyphenation dictionary for Tamil (ta, ta-*)

87
87
87
language telugu

Hyphenation dictionary for Telugu (te, te-*)

87
87
87
language turkish

Hyphenation dictionary for Turkish (tr, tr-*)

9
5.1
5
language turkmen

Hyphenation dictionary for Turkmen (tk, tk-*)

87
87
87
language ukrainian

Hyphenation dictionary for Ukrainian (uk, uk-*)

112
112
9
9.1
112
9.3
language upper sorbian

Hyphenation dictionary for Upper Sorbian (hsb, hsb-*)

8
language welsh

Hyphenation dictionary for Welsh (cy, cy-*)

87
87
8
87
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (13)
Notes 5 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (79)
  • Available with a vendor prefix: -ms- (12)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (79)
Implementation note
  • Only works if the specified language is the same as the language of the underlying OS.
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -moz- (6)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (5.1)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (18)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -webkit- (4.2)
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (88)
Implementation note
  • Only supported on macOS.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (88)
Implementation note
  • Only supported on macOS.
Notes 1 item(s)
Implementation note
  • For English, Firefox uses an en-US dictionary
Notes 1 item(s)
Implementation note
  • For English, Safari uses different en-GB and en-US dictionaries.
Notes 1 item(s)
Implementation note
  • For English, Safari on iOS uses different en-GB and en-US dictionaries.

Syntax

CSS
/* Automatic hyphenation */
p {
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Manual hyphenation */
.manual {
  hyphens: manual;
}

Live demo

Auto(auto)

hyphens (CSS Hyphenation) Auto(auto) demo.

PreviewFullscreen

Manual(manual)

hyphens (CSS Hyphenation) Manual(manual) demo.

PreviewFullscreen

None(disabled)

hyphens (CSS Hyphenation) None(disabled) demo.

PreviewFullscreen

Use cases

  • Using Hyphenation

    The hyphens CSS property controls when long words are broken by line wrapping. Although called hyphens, the property applies to word-splitting behavior across languages, such as customary spelling changes or the use of other characters. Support for non-English languages varies significantly.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Make sure visual changes are conveyed appropriately to assistive technology.

Powered by web-features