Computer Science, asked by Entricia, 1 year ago

Write the HTML code to generate the following output: Chemical formula of water is H2O.

Answers

Answered by gaurav2013c
75
<Sub> tag is used here.

<html>
<body>

H <SUB> 2 </SUB> O

</body>
</html>

Smartbrainly: H20 - Water
O2 - Oxygen
CO2 - Carbon dioxide
H2SO4 - Sulfuric acid
pranavpatel2: ok
Answered by writersparadise
27

Answer:

Html code to represent H2O is

H <sub> 2 </sub> O

Explanation:

The <sub> tag is used to represent subscript text. Subscript text appears below the normal line, in smaller font. Subscript text is useful to represent chemical formulas like H2O.

Similarly <sup> tag represents superscript text, above the normal line. This can be used to indicate maths formulas like a2+b2 = 2ab

<p>Formula is a <sup>2</sup> + b<sup>2</sup> = 2ab</p>

Similar questions