0

How to write the below ion in HTML?

I already tried the below code but it doesn't look good

<p> [% chlorine in liquid bleach] − 1 = Total parts of water for each part of bleach  <sub></sub> </p> <br>
<p> [% chlorine desired]</p>
ATP
  • 2,939
  • 4
  • 13
  • 34
  • It is harder as you would think, but possible. Typically, some lib is used for that, for example MathML or more likely Math.js or Latex.js . All of these libs are big. – peterh Sep 23 '22 at 15:00
  • 1
    If you need only this formula you could master it visually only by HTML/CSS, but if you need to place many formulas on your site, then use a library. – Azu Sep 23 '22 at 15:02
  • @Azu could you help me how to write the following equation given in image? – user19704437 Sep 23 '22 at 15:08
  • Sure. Only one question: `-1` should be at the level of the line? – Azu Sep 23 '22 at 15:10
  • @Azu yes IN front of line – user19704437 Sep 23 '22 at 15:31
  • Another solution is to use an image. As the question is closed I cannot add an answer here. – Azu Sep 23 '22 at 15:33
  • @Azu if you could share the code here in comment? – user19704437 Sep 23 '22 at 15:38
  • .container { display: flex; align-items: center; } .container .fraction div:first-child { border-bottom: 1px solid black; } .container .fraction div:nth-child(2) { text-align: center; } .container .second { padding-left: 10px; } – Azu Sep 23 '22 at 15:52
  • [% chlorine in liquid bleach]
    [% chlorine desired]
    − 1 = Total parts of water for each part of bleach
    – Azu Sep 23 '22 at 15:52

0 Answers0