HTML | DOM Style wordBreak Property
The DOM Style wordBreak Property is used to set or return the word-break property. The word-break property is used to specify how to break the word when the word is reached at the end of the line. The line breaks in the text can occur in a certain wordBreak property.
- It is used to return the wordbreak Property:
- It is used to set the wordBreak property:
object.style.wordBreak = "normal|break-all|keep-all|initial| inherit"
Return Values: It returns a string value, which represents the word-break property of an element.
- normal: This property uses the default line break rules.
- break-all: It is used to break the words at any character to prevent overflow.
- Keep-all: It is same as value normal.
- break-word: It is used to break the words at arbitrary points to prevent overflow.
- initial: It sets the property to its default value.
Before Clicking On Button :
After Clicking On Button :
Before Clicking On Button:
After Clicking On Button:
Supported Browsers: The browser supported by DOM Style wordBreak Property are listed below:
- Google Chrome 1 and above
- Edge 12 and above
- Internet Explorer 5.5 and above
- Firefox 15 and above
- Opera 15 and above
- Safari 3 and above
My Personal Notes arrow_drop_up
Please Login to comment...