HACKER Q&A
📣 codingclaws

Should websites on desktop have a default font larger than 16px/1rem?


I feel like on mobile 16px/1rem is perfect, but on desktop it may be too small.


  👤 crazygringo Accepted Answer ✓
Absolutely not.

Users should set the zoom level of their operating system to whatever makes user interface elements the optimal size for them -- menus, dialog boxes, filenames, toolbars, and so forth.

Then 12pt/16px will be perfectly readable as it was always designed to be.

I'm sick of websites where the body text is four times the size of the text in my menubar (by area). This trend has become increasingly common among tech bloggers and I'm constantly having to zoom out in my browser just to bring the text down to a reasonable size.

Stick with standards and let users modify zoom levels as they desire. If everybody follows the same standard, then users don't have to keep changing their zoom levels per site.


👤 eastbound
I have a 5K, 27” screen. It’s too small to display 3 paragraphs of text on a webpage.

This trend to increase fonts and margins needs to stop. Desktops and browsers should have more control over how they display windows and text, we shouldn’t leave it to website designers to compensate for every single person’s preference. What’s next, an Age API based on IP location, which increases text size because they assume you’re presbyte?


👤 xnx
The best font size to set in css is no size.

👤 dorfsmay
Yes, sort of, 19px is a safer bet, but it's complicated. It's counter intuitive but the larger the screen, the bigger the font should be (because it's probably further away).

This article is a really good overview of the subject:

https://www.smashingmagazine.com/2014/09/balancing-line-leng...

This goes right I to details, and the conclusion is that it depends on the distance between the reader and the screen, the eyesight of the reader (which gets worse as we age) and the size of the pixel on the screen:

https://www.imarc.com/blog/best-font-size-for-any-device


👤 tgv
MacOS doesn't look the same as Windows on the same monitor (Firefox on both; no idea about Chrome; I don't care about it). Linux may have yet another view. Perhaps there's even a difference between X11 and Wayland. Don't make too many assumptions what 'desktop' means.

👤 JohnFen
Websites should use the default font size set by the user's browser and all other font sizes should be relative to that.

👤 ww520
Just use the browser’s default font size, i.e. not setting anything.

👤 MatthiasPortzel
I think it depends on your font and font weight. Yesterday I had a block of text 16px Roboto 400 and I recommended bumping it up to 20px, since Roboto is kind of a thin font. But on my website body text is 16px.

It also depends on the amount of text. If you don’t have other content on the screen, it’s easy to justify increasing the font size.


👤 arrakeen
NO. i've tossed about posting an "Ask HN" a handful of times asking "Why are font sizes enormous these days?"

i am regularly distracted by sites with huge font sizes, leading me to double check if i'm zoomed in. body texts generally average out to be around 20px, with many even larger.

can someone explain what's going on here? i'm assuming it has something to do with supporting both mobile and desktop, but are that many people explicitly setting the pixel size and/or 150% font size?


👤 compressedgas
You can change the base font size in the browser settings.

👤 cantSpellSober
Do not set a font size on the root element (). This often overrides a user's choice to increase the base font size on their browser.

👤 carlosjobim
Do you need to set a font-size for the p element? You can leave that out and let the visitor use her browser default to determine the size.

👤 rasz
There is a reason browser is called USER AGENT.

👤 tqwhite
The only thing that matters is that the type size can be changed by the user. I miss the old days when sites often had a +/- button.

People have different vision. I am old and need it big. You are young and want all the text at once. Sites that don't easily adjust are bad (I'm looking at you mobile Slashdot!).


👤 karaterobot
Desktops should focus on implementing layouts which don’t break when I change my font size. I’ll control how large the font size is. In my opinion 16px is plenty large enough, but that doesn’t matter, it should be adjustable to your preference too.

👤 pestatije
HN displays plain text at 12px in my desktop

👤 omgmajk
Less css is almost always better.

👤 d3layd
I typically make my body text 18px by default for improved readability

👤 alberth
HN has a default font-size of 10pt

(which equates to 13px/0.8em).


👤 jug
Huh. I think 16px is pretty much perfect on desktop too, and I thought I was leaning towards large desktop font sizes!

I'm not sure why Hacker News uses this masochistic 12px/9pt font size for all these years though. I mean, it makes sense on a 21" 1024x768 display but that was 20 years ago