I realised something recently: I rarely write fractions in my daily life. I might divvy up a pizza with friends, cut up pieces of round birthday cake, or refer to times as “quarter past five” instead of 17:15 in speech. But I somehow managed to avoid writing them after uni, until I started drafting posts about turntables, and I realised I needed a way to succinctly express the ubiquitous “33 and a third” speed. One way is to construct one with: A <sup> element for the divisor A Unicode “fraction slash” (⁄) as a more semantically correct forward slash for the fraction A <sub> for the denominator A <abbr> tag to explain the resulting mess for less visual readers The result is something like the below: 1⁄3 Alternatively, today I learned you can express Vulgar Fractions in HTML using these codes: ½ → ½ ⅓ → ⅓ ⅔ → ⅔ ¼ → ¼ ¾ → ¾ ⅕ → ⅕ ⅖ → ⅖ ⅗ → ⅗ ⅘ → ⅘ ⅙ → ⅙ ⅚ → ⅚ ⅛ → ⅛ ⅜ → ⅜ ⅝ → ⅝…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.