The hyphens property controls how words break across lines. It helps long words fit cleanly in narrow columns and improves readability in responsive layouts.
01
Word Breaks
Line wrapping.
02
manual
Default value.
03
auto
Browser rules.
04
none
Disable breaks.
05
lang
Language attr.
06
Inherited
Set on parent.
Fundamentals
Introduction
The hyphens property in CSS is used to control how words should be hyphenated when text wraps across multiple lines. It is particularly useful for improving the readability of long words in narrow columns, ensuring they break at appropriate hyphenation points.
You will see hyphens in magazine layouts, sidebars, mobile article text, and multilingual sites where column width changes at different screen sizes.
Definition and Usage
Apply hyphens on text containers such as paragraphs, articles, list items, or column layouts. For automatic hyphenation, use hyphens: auto together with a valid lang attribute and a constrained text width.
💡
Beginner Tip
Hyphenation is most visible in narrow columns. Widen the viewport or remove the width constraint and you may not see any hyphens at all.
Foundation
📝 Syntax
The syntax for the hyphens property is straightforward:
syntax.css
element{hyphens:none|manual|auto;}
Basic Example
hyphens-basic.css
p{width:200px;hyphens:auto;}
hyphens: none;hyphens: manual;hyphens: auto;
Default Value
The default value of the hyphens property is manual, which means hyphenation only occurs when the soft hyphen character (­) is used in the text.
Syntax Rules
Accepts the keywords none, manual, and auto.
The property is inherited.
auto requires a correct lang attribute for language-aware rules.
Works best when text has a limited width or lives in a narrow column.
Pair with hyphenate-character to customize the break character.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
manual
Applies to
All elements
Inherited
Yes
Animatable
No
Common use
Narrow columns, articles, and responsive body text
Reference
💎 Property Values
Value
Description
none
No hyphenation is applied. Words wrap without automatic or soft hyphens at line breaks.
manual
Hyphenation occurs only where the soft hyphen character (­) is inserted in the text.
auto
The browser automatically inserts hyphens where appropriate, based on language and hyphenation rules.
Scope
Soft Hyphens and hyphenate-character
Beyond the three keyword values, hyphenation interacts with HTML and a related CSS property:
Soft hyphen (­) — An invisible break opportunity. With manual or auto, the browser may hyphenate at that point when needed.
Hard hyphen (-) — Always visible in the word. It is not the same as automatic line-break hyphenation.
hyphenate-character — Changes which character appears at an automatic break, such as "—" instead of "-".
⚠
Language Requirement
Add lang="en", lang="de", or another valid language code on the element or <html> tag so the browser knows which hyphenation dictionary to use.
Preview
👀 Live Preview
A narrow paragraph with hyphens: auto (resize the window to see breaks in supporting browsers):
Hyphenation improves readability when long words must fit inside narrow columns. Automatic hyphenation helps text look even and balanced across line breaks.
Hands-On
Examples Gallery
Enable automatic hyphenation, disable it with none, use manual soft hyphens, and compare none against auto.
🔢 Hyphenation Modes
Start with the reference example — automatic hyphenation in a narrow paragraph.
Example 1 — Automatic Hyphenation
Let the browser insert hyphens based on language rules when text wraps.
Internationalization improves readability in narrow columns.
auto
Internationalization improves readability in narrow columns.
How It Works
Side-by-side comparison makes the effect clear: auto may hyphenate long words, while none leaves ragged spacing at line ends.
A11y
♿ Accessibility
Screen readers read whole words — Hyphens at line breaks are usually a visual layout aid, not spoken punctuation.
Avoid hyphenating headings — Broken headings can be harder to scan and recognize.
Do not hyphenate UI controls — Button labels and navigation text should stay intact.
Set correct language codes — Accurate lang values help both hyphenation and pronunciation.
Test with zoom — More hyphenation may appear when users enlarge text in narrow layouts.
🧠 How hyphens Works
1
Text reaches a line edge
A long word does not fit in the remaining space on the current line.
Line wrap
2
hyphens value is checked
none skips breaks, manual checks soft hyphens, and auto uses language rules.
CSS rule
3
Browser inserts a break
If allowed, the word splits and a hyphen character may appear at the end of the line.
Rendering
=
–
Cleaner column text
Long words fit narrow layouts with more even spacing between lines.
Compatibility
🖥 Browser Compatibility
The hyphens property is widely supported in modern browsers. The auto value works in Chrome 55+, Firefox 43+, Safari 5.1+, and Edge 79+.
✓ Baseline · Modern browsers
Reliable hyphenation in today’s browsers
All major browsers support hyphens. Automatic hyphenation quality depends on language support and column width.
96%Modern browser support
Google Chrome55+ · Desktop & Mobile
Full support
Mozilla Firefox43+ · Desktop & Mobile
Full support
Apple Safari5.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera44+ · Modern versions
Full support
hyphens property96% supported
Bottom line: Safe to use in modern projects. Always set lang and test in your target languages.
Wrap Up
🎉 Conclusion
The hyphens property is a useful tool for enhancing text readability on the web. By controlling how words break across lines, you can keep narrow and responsive layouts looking clean and well organized.
For beginners, start with hyphens: auto on body text in narrow columns, use none on headings and UI labels, and remember that a valid lang attribute makes automatic hyphenation work properly.