I am currently wondering what is the difference between the two. When I used both they seem to break the word if it is not fitting the container. But why did W3C made two wa
word-break:break-all :
word to continue to border then break in newline.
word-wrap:break-word :
At first , word wrap in newline then continue to border.
Example :
div {
border: 1px solid red;
width: 200px;
}
span {
background-color: yellow;
}
.break-all {
word-break:break-all;
}
.break-word {
word-wrap:break-word;
}
word-break:break-all
This text is styled with
soooooooooooooooooooooooooome of the text
formatting properties.
word-wrap:break-word
This text is styled with
soooooooooooooooooooooooooome of the text
formatting properties.