Style wordBreak attribute
- Página anterior width
- Próxima página wordSpacing
- Voltar à página anterior Objeto Style do HTML DOM
Definition and usage
wordBreak
This attribute specifies the line break rules for non-CJK scripts.
Note:CJK scripts are Chinese, Japanese, and Korean ("CJK") scripts.
See also:
CSS Reference Manual:Propriedade word-break
Example
Break words between any two letters:
document.getElementById("myDIV").style.wordBreak = "break-all";
Syntax
Returns the wordBreak attribute:
object.style.wordBreak
Sets the wordBreak attribute:
object.style.wordBreak = "normal|break-all|keep-all|initial|inherit"
Attribute value
Value | Description |
---|---|
normal | Default value. Break words according to the usual rules. |
break-all | Hyphenation is allowed between any two letters. |
keep-all | Disallows hyphenation between letters. |
initial | Sets this attribute to its default value. See initial. |
inherit | Inherits this attribute from its parent element. See inherit. |
Technical details
Default value: | normal |
---|---|
Return value: | String, representing the element's Propriedade word-break. |
Versão do CSS: | CSS3 |
Suporte ao navegador
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Suporte | Suporte | Suporte | Suporte | Suporte |
- Página anterior width
- Próxima página wordSpacing
- Voltar à página anterior Objeto Style do HTML DOM