Settings

Theme

Ask HN: Why do most websites not justify their text?

9 points by jgoertler 5 years ago · 12 comments · 1 min read


I‘m often wondering why relatively few websites justify their text to fill out the complete screen.

Is this a matter of preference, or are there reasons for this? Is non-justified text more accessible? Or maybe because of smaller screens?

latexr 5 years ago

It’s not the default, which may play a big part. In addition, justification is an awful way to align text[1], making the composition uglier and harder to read, even if you don’t consciously notice it.

There are ways to work around those issues (all of them hacks: deforming characters and spaces in between), but even most professional design software doesn’t support the full range of features. Last I checked, Adobe Illustrator didn’t support that kind of granularity (though Adobe Indesign did) and neither did web browsers.

[1]: https://en.wikipedia.org/wiki/Typographic_alignment#Problems...

rococode 5 years ago

My guess is that it's simply a tech challenge. Justifying text seems non-trivial, especially if hyphenation is used (which I believe is typically the case in print, otherwise you get huge spaces).

According to caniuse `text-align: justify` is still not widely supported [1]. At this point, with how long people have had to get used to non-justified text online, it probably wouldn't be commonly used even after it becomes widely supported.

The specs for the justify property illustrate some of the challenges in implementation [2].

[1] https://caniuse.com/css-text-justify

[2] https://drafts.csswg.org/css-text-3/#text-justify-property

  • stephenr 5 years ago

    No, your first reference is not about `text-align: justify`, which has had good support even since ie6 days. It’s about the `text-justify` property which gives more control when `text-align: justify` is applied.

bright_light 5 years ago

My understanding is that justified text is harder to read as in order to create the justification, uneven spaces are generated between the words which disrupts the flow of your eye.

Additionally, just like it's harder for the eye to make out a word in all caps due to greater regularity in the image, it's also likely harder to distinguish differences in a paragraph if it's all a 'block' to the reader.

I'd imagine some people rely more heavily on the shapes of words rather than the letters or spelling itself. And then this heuristic might also carry through into the shape of a paragraph.

leephillips 5 years ago

It’s because the primitive line-breaking algorithm used by browers, combined with the lack of hypenation in most cases, leads to a poor result, especially in narrow columns. Look up “greedy line breaking”.

  • Finnucane 5 years ago

    Even the best typesetting systems don't do it perfectly, and require some hand correction. On the web, where you're relying on the browser, and can't be certain of the display, you're better off not doing it.

swiley 5 years ago

Most people really do prefer justified text. Lots of webdevs probably get excited when they realize browsers have built-in justification too.

  • latexr 5 years ago

    > Most people really do prefer justified text.

    “[Citation needed]”. Justified text (more often than not) looks awful[1] and breaks reading rhythm (even if not consciously perceived). That doesn’t prove your claim is incorrect; I’m pointing it out to explain why I find it dubious. What’s your source to say that most people prefer it?

    [1]: https://news.ycombinator.com/item?id=25338737

  • muzani 5 years ago

    I don't like it. The results can frequently be ugly on smaller screens with larger words.

  • LarryMade2 5 years ago

    Most people don't really know what's good for them...

    Justification falls apart on mobile web where too few words can fit on a line and then you get big gaps between words.

    On longer lines, a ragged right edge makes a good visual guide to keep the eye on the right line while reading a wide justified paragraph is hard to keep track of while reading.

    https://medium.com/@meetchopz/10-bad-typography-habits-that-...

    • swiley 5 years ago

      This depends on the font size and even then I regularly read standard ebooks in elinks on my pinephone at night with a width of something like 20 chars because xterm is so zoomed.

      And I like it!

    • jgoertlerOP 5 years ago

      Interesting, I've never thought about it this way — thanks for pointing this out.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection