text-justify defines where space is added in justified text (#tilPost)

Today I came across the CSS property text-justify, which I haven’t heard of before. It turns out that this CSS property controls how user agents deal with text justification. There are at least two ways browsers justify the text whe…


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

Today I came across the CSS property text-justify, which I haven't heard of before. It turns out that this CSS property controls how user agents deal with text justification. There are at least two ways browsers justify the text when text-align: justify is set:

  1. add spacing between words
  2. add spacing between every character

text-justify controls the spacing for an element's text justification. The default value for text-justify is auto, which leads user agents to pick the best way depending on performance, quality, and set language.

Then there are inter-word and inter-character, which lead to the spacing between words or characters. What's interesting is that there is also a none value which disables text justification completely even when text-align: justify; is set. ?

Devsheet explaining the values of text-justify

You can read more about text-justify on MDN. And that's it for today – quick and easy. ?

Edited: Sven Wolfermann pointed out that you have to be careful when using text-justify because the browser support is not that great these days.

Edited: Also, if you're using text justification you have to be aware that a nice formated text could harm readability.


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate Updates
APA

Stefan Judis | Sciencx (2019-12-25T23:00:00+00:00) text-justify defines where space is added in justified text (#tilPost). Retrieved from https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/

MLA
" » text-justify defines where space is added in justified text (#tilPost)." Stefan Judis | Sciencx - Wednesday December 25, 2019, https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/
HARVARD
Stefan Judis | Sciencx Wednesday December 25, 2019 » text-justify defines where space is added in justified text (#tilPost)., viewed ,<https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/>
VANCOUVER
Stefan Judis | Sciencx - » text-justify defines where space is added in justified text (#tilPost). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/
CHICAGO
" » text-justify defines where space is added in justified text (#tilPost)." Stefan Judis | Sciencx - Accessed . https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/
IEEE
" » text-justify defines where space is added in justified text (#tilPost)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/. [Accessed: ]
rf:citation
» text-justify defines where space is added in justified text (#tilPost) | Stefan Judis | Sciencx | https://www.scien.cx/2019/12/25/text-justify-defines-where-space-is-added-in-justified-text-tilpost/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.