English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Reference Manual

CSS @rules

Complete List of CSS Properties

CSS3 text-Usage and examples of justify property

text-The justify CSS property specifies when using alignment method,text-alignSet the property of "justify".

The following table provides usage instructions and version history of this property, as well as its usage syntax in JavaScript scripts.

Default value:auto
Applicable to:Block and optional inline elements
Inheritance:Yes
Can be animated:No.Please see Animation properties.
Version: CSS3new feature
JavaScript syntax:object.style.textJustify="inter-word"

text-Syntax of justify usage

The syntax of this property is as follows:

width: auto | none | inter-word | distribute | initial | inherit

The following examples demonstrate how to use text-justify property.

  p {
   text-align: justify;
   text-justify: inter-word;
  }
Test and see‹/›

Property value

The following table describes the values of this property.

ValueDescription
autoThe alignment algorithm determined by the browser to follow. This is the default value.
noneDisable line alignment.
inter-wordIncrease or decrease the spacing between words.
distributeIncrease or decrease the spacing between letters and words.
initialSet this property to its default value.
inheritIf specified, the associated elements adopt the text of their parent element.-justify property values.

Browser compatibility

text-The justify property is not supported by most browsers.

  • Firefox×

  • Google Chrome×

  • Internet Explorer 5.5Above

  • Apple Safari ×

  • Opera ×

Warning:text-Warning: The justify property is not supported by most browsers. It is best to avoid using this property.

Further reading

Please refer to the following tutorials:CSS Text.

Related properties:text-align,white-space,letter-spacing,word-spacing.