The word-wrap property allows browsers to break long words and wrap them onto the next line. The word-wrap property is used to handle situations where there are no spaces in text, such as with a long URL, the browser is unable to break it, resulting in an ugly overflow.

Syntax:

selector { 

         word-wrap: normal | break-word | initial | inherit;

}

Values:

Following values are accepted by the word-wrap property:

  • normal; This is the default value. Lines may break only at normal word break points.
  • break-word; Lines can break at arbitrary points if no break points can be found.
  • initialinherit

Example

The word-break property example:

 

›› go to examples ››