Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Fractions in HTML

The article explains how to display fractions in HTML using the `<sup>` (superscript) and `<sub>` (subscript) tags, such as `<sup>1</sup>&frasl;<sub>2</sub>` for 1/2, and notes that CSS styling can improve the appearance of these inline fractions.

Related stories

  • A developer replaced a JavaScript web component that handled icon resizing on a static site with multiple pre-rendered HTML pages, each serving icons at a different size. By using navigation between pages instead of client-side JS, the site gained CSS view transitions for free, simplified maintenance, and eliminated duplicated templating logic.