The word-wrap property is used to to specify whether or not the browser is allowed to break lines within words in order to prevent overflow when an otherwise unbreakable string is too long to fit.

  • Initial valuenormal
  • Applies toAll elements
  • InheritedYes
  • MediaVisual
  • Computed valueSpecified value
  • AnimatableNo
  • CSS VersionCSS3
  • JavaScript syntaxobject.style.wordWrap
Formal syntax: normal | break-word 

word-wrap: normal;
word-wrap: break-word;
  • normalLines can only be broken at normal break points (spaces, non-alphanumeric characters, etc.).
  • break-wordWords that exceed the width of the container will be arbitrarily broken to fit within the containers bounds.
  • inherit
.class {
   word-wrap: break-word;
}
4+Firefox6+Explorer1+Chrome2+Safari10.5+Opera


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.