CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS3 word-break Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The word-break CSS property is used to specify how (or if) to break lines within words.

The following table summarizes the usages context and the version history of this property.

Default value: normal
Applies to: All elements
Inherited: Yes
Animatable: No. See animatable properties.
Version: New in CSS3

Syntax

The syntax of the property is given with:

word-break normal | break-all | keep-all | initial | inherit

The example below shows the word-break property in action.

p {
    width: 150px;
    background: #90ee90;
    word-break: break-all;
}

Property Values

The following table describes the values of this property.

Value Description
normal Words break according to their usual rules.
break-all Lines may break between any two letters.
keep-all Breaks are prohibited between pairs of letters.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element word-break property.

Browser Compatibility

The word-break property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 15+
  • Google Chrome 4+
  • Internet Explorer 5.5+
  • Apple Safari 3.1+
  • Opera 15+

Further Reading

See tutorial on: CSS Text.

Related properties: word-wrap, white-space, text-overflow.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties