CSS text-justify Property
Example
Set the justification method to "inter-word" when text-align is set to "justify":
div
{
text-align: justify;
text-justify: inter-word;
}
Try it Yourself »
Definition and Usage
The text-justify
property specifies the justification method
of text when text-align is set to "justify".
Default value: | auto |
---|---|
Inherited: | yes |
Animatable: | no. Read about animatable |
Version: | CSS3 |
JavaScript syntax: | object.style.textJustify="inter-word" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
text-justify | Yes* | 11.0 | 55.0 | 10.0.3 | Yes* |
*This feature is behind the Enable Experimental Web Platform Features preference (needs to be set to Enabled). To change preferences in Chrome: type in "chrome://flags" in the Chrome browser. To change preferences in Opera: type in "flags" in the Opera browser.
CSS Syntax
text-justify: auto|inter-word|inter-character|none|initial|inherit;
Property Values
Value | Description | Play it |
---|---|---|
auto | The browser determines the justification algorithm | Play it » |
inter-word | Increases/Decreases the space between words | Play it » |
inter-character | Increases/Decreases the space between characters | Play it » |
none | Disables justification methods | Play it » |
initial | Sets this property to its default value. Read about initial | Play it » |
inherit | Inherits this property from its parent element. Read about inherit |