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

Back in the days of HTML 4.01 there was the idea of an align attribute where possible numerical data could auto-align on a specified character:

  <td align="char" char=".">€ 1.20</td>
https://www.w3.org/TR/html401/struct/tables.html#h-11.3.2

HTML 4 was still in this weird in-between time where there were styling attributes in HTML coexisting with the upcoming CSS. Afair no browser ever implemented character alignment and in Google’s HTML it is only written up as obsolete:

https://html.spec.whatwg.org/multipage/obsolete.html#dom-tab...

Styling in general is of course a CSS thing – but thinking about it arranging alignment in multiple interdependent elements is a problem which not just need a property but a layout algorithm which browsers then need to implement. So we still don’t have nice things.

> It occurs to me that contextual alternates could make this Just Work.

The replacement mechanism in OpenType fonts is surprisingly useful. I remember Apple’s San Francisco font switches between different variants of the colon if it follows text characters ("my proposal: nuke it from the orbit") or if it exists between numbers as in a time ("23:52"); in the latter it is more centered.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: