hyphens
Enables automatic hyphenation of words. Values: none, manual, auto. Requires lang attribute to work.
Quick example
p { lang: en; hyphens: auto; } Syntax
none | manual | autoQuick facts
manualExamples
Enable automatic hyphenation
article {
hyphens: auto;
lang: en; /* Declare language for hyphenation rules */
}
/* Long words like "internationalization" might break as "internation-alization" */ Browser uses language-specific rules to hyphenate long words, making text fit better in narrow columns.
Disable hyphenation for UI text
.button, .nav {
hyphens: none;
}
/* Button text never breaks with hyphens */ Prevent hyphenation in buttons, labels, and navigation where breaks look awkward.
Manual hyphenation in technical text
.code-word {
hyphens: manual;
overflow-wrap: break-word;
}
/* Use soft hyphen (U+00AD) to mark where breaks are allowed: "back­ground" */ Use soft hyphens in your HTML to explicitly mark where hyphenation is allowed, giving you control.
hyphens Browser Support
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2011.
Safe to use without fallbacks.
Common pitfalls
hyphens: auto only works if the browser knows the text language. Set lang attribute on the element or parent for it to work correctly.
Hyphenation dictionaries are language-specific. Some languages (like Icelandic) have support while others don't. Manual hyphenation is more reliable.
While hyphenation helps fit text, it can reduce readability on very small screens. Consider max-width and font-size alongside hyphens.