CSS wordbreak Property (original) (raw)
CSS word-break Property
Last Updated : 29 Aug, 2024
This word-break property is used to specify how to break the word when the word reaches the end of the line. The line breaks in the text can occur in certain spaces, like when there is a space or a hyphen.
**Syntax:
word-break: normal|break-all|keep-all|break-word|initial|inherit;
**Default Value: Normal
**Properties: There are word-break properties which are given below:
- normal
- break-all
- keep-all
- initial
- inherit
**1. normal: This property uses the default line break rules.
**Syntax:
word-break: normal (default value)
**Example:
html `
CSS word-break PropertyGeeksforGeeks
word-break: Keep-all
GeeksforGeeksGeeksGeeks.A computer science portal for geeks.
`
**Output:

**4. break-word: It is used to broken the words at arbitrary points to prevent overflow.
**Syntax:
word-break: break-word;
**Example:
html `
CSS word-break PropertyGeeksforGeeks
word-break: break-word
GeeksforGeeksGeeksGeeks.A computer science portal for geeks.
`
**Output:

**5. initial: It sets the property to its default value.
**Syntax:
word-break:initial;
**Example:
html `
CSS word-break PropertyGeeksforGeeks
word-break:initial;
GeeksforGeeksGeeksGeeks.A computer science portal for geeks.
`
**Output:

**Supported browsers: The browsers supported by _word-break Property are listed below:
- Google Chrome
- Edge
- Firefox
- Opera
- Safari