Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Even inline?

    <span style="color: #000; font-face: Whatever; font-size: 10pt">Blah</span>
vs.

    <font face="Whatever" size="2" color="#000000">Blah</font>


Just as a nit, "font-size:10pt" is a lot worse than <font size="2"> from an accessibility perspective. <font size="2"> is "one notch below the user's default size". If the user sets a 20pt font, it's going to be larger than 10pt.

You could use "font-size: small" to get the size="2" behavior.

(Also, "font-family: Whatever", not "font-face: Whatever".)


Note that your CSS example is longer and requires combining two different syntaxes. And for one change, the difference in length and complexity is much more apparent.

> <span style="font-size: 10pt">Blah</span>

vs.

> <font size="2">Blah</font>

Which is easier to remember? Which is more obvious at a glance?


The former. The problem is just that you've learned what the latter means better than the former. I'm the opposite.

Plus, the former is an absolute value where the latter is not, as far as I've been able to tell. I know that first span will always be 10pt font. I have no idea what "2" even means in this context.


Another commenter did you a favor and explained why using 10pt is worse than using 2: https://news.ycombinator.com/item?id=15927837


That may be true, but regardless of whether pt is a best practice, the point remains that it is still a unit. IMO that puts it ahead of the alternative example.


pt is for print and does not translate to the web. There are articles about this, specifically from the W3C https://www.w3.org/Style/Examples/007/units.en.html




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: