The Hyphens Property in CSS tells us how the words should be hyphenated to create soft wrap opportunities within words.
Syntax:
hyphens: none|manual|auto|initial|inherit;
Property Values:
- none: This property means that the words are not hyphenated.
- manual: This is the default property value. It means that the words are only hyphenated when the characters inside the word suggest hyphenation opportunities.
- auto: This property lets the algorithm break the words at appropriate hyphenation points.
- initial: The initial property value sets the property to its default value.
- inherit: It inherits the property from its parent element.
Example 1: In this example, we are using the above-explained method.
Output:
👁 Image
Example 2: Here is another example of the above-explained method.
Output:
👁 Image
Supported Browsers: The browser supported by CSS | hyphens Property are listed below:
- Google Chrome 13
- Edge 79
- Internet Explorer 10.0
- Mozilla Firefox 43.0
- Opera 44.0
- Safari 5.1