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

What is the overflow-wrap property?

The overflow-wrap property in CSS is used to specify whether the browser should break words when they overflow their container. It helps prevent text from breaking out of the container, improving the overall design and readability of a webpage.

Syntax:

overflow-wrap: normal | break-word;

Values:

normal: This is the default value. It allows words to overflow the container if necessary.
break-word: This forces the browser to break words at the appropriate places to avoid overflow, making long words wrap onto the next line.

Example:

p {
overflow-wrap: break-word;
}

In this example, if a long word exceeds the width of its container, it will break and continue on the next line, preventing the text from spilling over the boundaries.