CSS text-justify attribute
- Previous Page text-indent
- Next Page text-orientation
Definition and usage
The text-align property specifies the alignment method of the text when the text-align setting is set to "justify".
This property specifies how to align and separate line text.
Example
Change word spacing with alignment:
div { text-align:justify; text-justify:inter-word; }
CSS syntax
text-justify: auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|trim;
Attribute value
Value | Description | Test |
---|---|---|
auto | The browser determines the alignment algorithm. | Test |
none | Disable alignment. | Test |
inter-word | Increase/decrease word spacing. | Test |
inter-ideograph | Align content using ideographic text. | Test |
inter-cluster | Align only content that does not contain internal word spacing (such as Asian languages). | Test |
distribute | Similar to newspaper layouts, except that the last line in East Asian language systems is not aligned. | Test |
kashida | Align content by stretching characters. | Test |
Technical details
Default value: | auto |
---|---|
Inheritance: | yes |
Version: | CSS3 |
JavaScript syntax: | object.style.textJustify="inter-word" |
Browser support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Support * | 11.0 | 55.0 | 10.0.3 | Support * |
* This feature is located in the "Enable Experimental Web Platform Features" preference (must be set to "Enabled"). To change preferences in Chrome: enter "chrome://flags" in the Chrome browser. To change preferences in Opera: enter "flags" in the Opera browser.
- Previous Page text-indent
- Next Page text-orientation