News for hackers. Stuff that matters.
Re:MAI Code 2 and Code 2 Flash by liuliu on Tuesday November 17, 2026 @01:52PM (#50536329)
Can someone explain to me why the headings use serif while the body uses sans (font)?
Re:MAI Code 2 and Code 2 Flash by srameshc on Tuesday November 17, 2026 @01:57PM (#50536407)
It is called 'font pairing' where the designer choses the best font based on different parameters to make the blog design interesting.
Re:MAI Code 2 and Code 2 Flash by esafak on Tuesday November 17, 2026 @02:45PM (#50537098)
He's asking why the pairing isn't reversed; body is usually serif while titles are sans serif.
Re:MAI Code 2 and Code 2 Flash by christophilus on Tuesday November 17, 2026 @02:55PM (#50537203)
Not on the web. It’s usually serif body, at least in my experience.
Re:MAI Code 2 and Code 2 Flash by ssgodderidge on Tuesday November 17, 2026 @01:59PM (#50536433)
It's a common design paradigm to pair serif and sans-serif fonts. Lots of examples and blog posts out there for why this is the case, but here's a decent enough starting place from canva with lots of font combos

https://www.canva.com/learn/the-ultimate-guide-to-font-pairi...

Re:MAI Code 2 and Code 2 Flash by daemonologist on Tuesday November 17, 2026 @02:01PM (#50536458)
Fairly common typography decision for websites/computers - sans-serif fonts are held to be more readable on low resolution displays (at small sizes). For the larger headers you have the pixels to cleanly render serifs if you want.

You can also just do it because you want to. It's just as common in other mediums to see the opposite (sans headers and serif body text).

Re:MAI Code 2 and Code 2 Flash by steve1977 on Tuesday November 17, 2026 @02:06PM (#50536542)
Which is interesting, because in print, the common pairing is often the opposite.
Re:MAI Code 2 and Code 2 Flash by VulgarExigency on Tuesday November 17, 2026 @02:36PM (#50536966)
I believe serif fonts are considered more readable in print
Re:MAI Code 2 and Code 2 Flash by steve1977 on Wednesday November 18, 2026 @01:02AM (#50542418)
They are, that's actually kind of the point of the serifs AFAIK.
Re:MAI Code 2 and Code 2 Flash by adrian_b on Tuesday November 17, 2026 @03:13PM (#50537504)
In traditional typography, i.e. for texts printed on paper, the reverse was typically used, i.e. the body text used a serif typeface, while the headings used a sans-serif typeface for contrast.

The origin of sans-serif typefaces was in advertising, e.g. in posters and product labels, so it was natural to adopt them for headings. In this context an advantage of sans-serif fonts it is that it is easy to change their weight, e.g. to make them bold or extra-bold, without this making them uglier.

With the passing to computer displays, which have much worse resolution than printed paper, this has changed, because sans-serif typefaces became preferred for body text, because they are less damaged by low-quality displays.

To preserve a higher contrast between body text and headings, with pages intended to be seen on digital displays it has become quite frequent to use this reverse combination, of sans-serif for the body text with a serif typeface for headings, which will be rendered at a higher quality even on bad displays.