Why you shouldn’t align html justify

Martin Jarvis

Martin says… Don’t Justify Align

I was recently asked by one of my WordPress clients to justify fully the text on their website rather than to align left.

Here’s an example of normally aligned website text. As you can see, the text is aligned to the left margin meaning that not all of the text will align to the right margin.

AND

Here’s an example of justified website text. As you can see, the text is aligned to both the left margin and right margins, meaning that each line will be the same length.

Justification (or full alignment or double justification) means that each line in your web page is the same length (except perhaps for the last line), with the text on those lines being spread out to meet a uniform line width and to align with both the left and right margins.

The html code (or attribute) to achieve this (for those of you who are interested) is align=”justify”.

I advised my client against justifying the text on their web page. I think that most website readers prefer to have their text set out in fairly narrow columns, and with the text aligned left. This makes it easier to read.

Justified Alignment is actually non-standard for the web, and the W3C standards commitee state the following :

Many people with cognitive disabilities have a great deal of trouble with blocks of text that are justified (aligned to both the left and the right margins). The spaces between words create “rivers of white” running down the page, which can make the text difficult for some people to read. This failure describes situations where this confusing text layout occurs. The best way to avoid this problem is not to create text layout that is fully justified (aligned to both the left and the right margins).

Of course, it’s up to you as a website owner to make the final decision on the text layout and other styles on your site, and don’t forget that text alignment has worked successfully for newspapers for many decades, especially where the columns are particularly wide.

What do you think? Do you think left-aligned text is easier to read, or do you favour the more spaced-out layout of full text alignment? Leave us a comment below to let us and our readers know what you prefer (and why).

Does your website have inappropriately aligned text? If so, and you would like us to take a look at changing it for you, leave us a comment in the form on this page or call us on 01793 740964.

Tags: , , , ,

Categories: What I have learned today

9 Responses to “Why you shouldn’t align html justify”

  1. Frank Hileman says:

    The wider the width of the paragraphs, and the better the justification algorithm, the less “rivers of white” is a problem. The IE “newspaper” form of justification is particularly good.

  2. Laura says:

    I find that with no white space at the left margin the page is difficult to read,as the letters look as though they bleed into the border line. I usually wont bother reading it at all. I find if I view a page in ‘no style’ rather than default, it looks better.

  3. Andy says:

    Why not offer a choice. Its fairly simple nowadays to offer a choice between CSS files etc and any good web designer should have readability and web standards in the back of his mind.

    • Yes, agreed Andy, you can offer your visitors a choice of text alignment via different css files (the same as one might do with things like text size). It might be a little harder with platforms like WordPress and Joomla, but certainly can be done.

      Thanks for the comment.

  4. Sabrez Alam says:

    Hello Martin,

    Today, I was just searching to align my blog post text as justify and landed to your post and amazed what you have mentioned and what W3C mentioned.

    Now, I have decided not to align the text on my blog to justify.

    Thanks for the awesome information.

    Sabrez Alam

  5. Hi,

    Currently my website is using justify for all post. But when I’m browsing on the Internet, I see that no one use this format, it make me confuse. So I try to research, and now, after read your post and some other post, I will remove this format.

    Thanks again for your information!

  6. Tech Spurs says:

    You are right, Justify alignment only looks good for web owners. It is very difficult for readers from mobile as it spaces heavily in between the words.

    Guys, just go with Left alignment 🙂

  7. Shukan says:

    I learn from this post actually before I read and understand about this I really like of justify format but now I decide to use align-left, thanks for your article, its great!

  8. Thank you for the tips. I will stop using the justified texts. 🙂

Leave a Reply

Share This

Please share if you've liked reading this

Share this post with your friends! It really helps us, and lets us know which content visitors like best - so we can write more like that!