Account
Categories
Shobha
Shobha
The best way to predict the future is to invent it

What is word-wrap, and when is it useful?

The word-wrap property in CSS controls how long words are managed when they overflow their container. By default, words will only break at spaces or hyphens. By setting word-wrap: break-word, long words are allowed to break and continue onto the next line, helping to prevent horizontal scrolling. This property is especially useful when dealing with long strings or URLs that do not naturally break, ensuring that content remains within the boundaries of the container. For example:

.container {
word-wrap: break-word;
}