VOOZH about

URL: https://www.geeksforgeeks.org/css/css-overflow-wrap-property/

⇱ CSS | overflow-wrap Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS | overflow-wrap Property

Last Updated : 24 Aug, 2022

The overflow-wrap property in CSS is used to specify that the browser may break lines of text inside any targeted element to prevent overflow when the original string is too long to fit. This property was earlier known as word-wrap that still supported by some browsers but it was renamed to overflow-wrap in a CSS3 draft. 

Syntax:

.box{
 overflow-wrap: break-word;
}

Values:

  • normal: The lines will break according to the original line breaking rules.
  • break-word: Words that are too long to fit in a container-element break into parts.
  • inherit: It allows the element to inherit value from its parent.
  • initial: It makes the property to use its default value.

Example: 

Output: 👁 Image

Supported Browsers:

  • Chrome 23
  • Edge 18
  • Firefox 49
  • Opera 12.1
  • Safari 7
Comment
Article Tags: