![]() |
VOOZH | about |
The text-justify property in CSS controls how text is spaced when text-align: justify is used. It adjusts the space between words or characters to make the text fill the full width of the line. Common options include auto, inter-word, inter-character, and none for better text formatting.
text-justify: auto | inter-word | inter-character | none:initial | inherit;The text-justify property values are listed below:
| Value | Description |
|---|---|
| auto | Allows the browser to determine the best justification property for the given text. |
| inter-word | Justifies text by adjusting the spacing between individual words in the text. |
| inter-character | Justifies text by adjusting the spacing between individual characters in the text. |
| none | Disables any justification methods used in the text. |
Here are a few examples of how the text-justify property is used to adjust text spacing:
In this example, we demonstrate the text-justify: auto; property, allowing the browser to determine the best text justification method for the text content within the specified container.
Output:
In this example we are use the text-justify: inter-word; property, which justifies text by adjusting spacing between individual words in the specified container.
Output:
In this example we are using text-justify: inter-character; property, which justifies text by adjusting spacing between individual characters within the specified container.
Output:
This example disables text justification methods using text-justify: none;, keeping text aligned left despite justification settings applied in the .none class.
Output:
The browser supported by text-justify property are listed below: