CSS hyphens Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Typography

What You’ll Learn

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.

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.

📝 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.

⚡ Quick Reference

QuestionAnswer
Initial valuemanual
Applies toAll elements
InheritedYes
AnimatableNo
Common useNarrow columns, articles, and responsive body text

💎 Property Values

ValueDescription
noneNo hyphenation is applied. Words wrap without automatic or soft hyphens at line breaks.
manualHyphenation occurs only where the soft hyphen character (­) is inserted in the text.
autoThe browser automatically inserts hyphens where appropriate, based on language and hyphenation rules.

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.

👀 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.

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.

hyphens-auto.css
p {
  width: 200px;
  hyphens: auto;
}
Try It Yourself

How It Works

With auto, the browser may split long words at valid syllable boundaries when the column is too narrow to fit the whole word.

Example 2 — Disable Hyphenation

Prevent hyphenation entirely so words wrap without break characters.

hyphens-none.css
p {
  width: 180px;
  hyphens: none;
}
Try It Yourself

How It Works

none turns off automatic and soft-hyphen breaks at line ends. Useful for headings, buttons, and UI labels.

📈 Manual Control & Comparison

Insert your own break points and compare disabled versus automatic hyphenation.

Example 3 — Manual Soft Hyphens

Hyphenate only where you insert soft hyphen characters in the HTML.

hyphens-manual.html
<style>
  p {
    hyphens: manual;
  }
</style>

<p>inter&shy;national&shy;ization</p>
Try It Yourself

How It Works

manual is the default behavior. The browser hyphenates only at &shy; positions you define in the markup.

Example 4 — none vs auto Comparison

See how the same paragraph text behaves with and without automatic hyphenation.

hyphens-compare.css
.none { hyphens: none; }
.auto { hyphens: auto; }
Try It Yourself

How It Works

Side-by-side comparison makes the effect clear: auto may hyphenate long words, while none leaves ragged spacing at line ends.

♿ 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.

🖥 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 Chrome 55+ · Desktop & Mobile
Full support
Mozilla Firefox 43+ · Desktop & Mobile
Full support
Apple Safari 5.1+ · macOS & iOS
Full support
Microsoft Edge 79+ · Chromium
Full support
Opera 44+ · Modern versions
Full support
hyphens property 96% supported

Bottom line: Safe to use in modern projects. Always set lang and test in your target languages.

🎉 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.

💡 Best Practices

✅ Do

  • Use auto in narrow article columns
  • Set a correct lang attribute on text
  • Use none on headings and buttons
  • Combine with text-align: justify carefully
  • Test on mobile widths where hyphenation matters most

❌ Don’t

  • Expect hyphenation in very wide paragraphs
  • Hyphenate navigation or form labels
  • Forget soft hyphens when using manual
  • Assume all languages hyphenate equally well
  • Override inherited values unintentionally on child text

Key Takeaways

Knowledge Unlocked

Five things to remember about hyphens

Use these points when improving text in narrow layouts.

5
Core concepts
manual 02

Default manual

Soft hyphens.

Default
auto 03

Automatic

Browser rules.

Syntax
none 04

Disabled

No breaks.

Pattern
lang 05

Inherited

Set on parent.

Cascade

❓ Frequently Asked Questions

The hyphens property controls how words are hyphenated when text wraps across multiple lines.
The default is manual, which hyphenates only at soft hyphen characters like &shy; in the HTML.
none disables hyphenation. manual breaks only at soft hyphens. auto lets the browser insert hyphens based on language rules.
Common causes include missing lang attribute, text that is too wide, or a language with limited hyphenation support in the browser.
Yes. hyphens is inherited, so you can set it once on article, p, or a column container.

Practice in the Live Editor

Open the HTML editor, try none, manual, and auto, and resize the preview to see hyphenation change.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful