HTML <sub> Tag Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The <sub> tag in HTML is used to define subscript text, which appears smaller and slightly below the normal text baseline. It is commonly used for mathematical expressions, chemical formulas, and footnotes, like in H₂O (water) or E=mc² (Einstein’s equation).Syntax<sub> Contents. . . </sub>There are no such attributes that apply specifically to this <sub> tag. The attributes that only apply to this tag are global attributes.Example 1: In this example, the <sub> tag is used to create subscript text. The "2" in the chemical formula "H₂O" is displayed as smaller and slightly lower than the baseline, indicating the number of hydrogen atoms. HTML <!DOCTYPE html> <html> <head> <title>HTML sub tag</title> </head> <body style="text-align: center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h2>Chemical Formula of Water</h2> <h2>H<sub>2</sub>O</h2> </body> </html> Output:Example 2: In this example the <sub> tag is used to display subscript text. It renders the "n" in the mathematical expression "xₙ + yₙ" smaller and below the baseline, indicating a variable's subscript. HTML <!DOCTYPE html> <html> <head> <table> HTML sub tag </table> </head> <body style="text-align: center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h2>Mathematical Formula</h2> <h2>x<sub>n</sub> + y<sub>n</sub></h2> </body> </html> Output:Supported Browsers:Google ChromeEdge FirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML Tag C codingbeast12 Follow Improve Article Tags : CSS HTML-Tags Similar Reads HTML <span> Tag The HTML <span> tag is an inline container that is used to group and apply styles or scripts to specific parts of text or elements within a document. The <span> tag is inline, meaning it doesn't create a new line. It stays within the same line as the text around it.The <span> tag d 4 min read HTML <rtc> Tag The HTML <rtc> tag is used to define the explanation of the ruby annotation which is a small text, attached with the main text. Such kind of annotation is used in Japanese or chinese publications. The <rtc> tag contains the <rt> tag. Note: HTML <rtc> tag is not supported in h 1 min read HTML <rtc> Tag The HTML <rtc> tag is used to define the explanation of the ruby annotation which is a small text, attached with the main text. Such kind of annotation is used in Japanese or chinese publications. The <rtc> tag contains the <rt> tag. Note: HTML <rtc> tag is not supported in h 1 min read HTML <rtc> Tag The HTML <rtc> tag is used to define the explanation of the ruby annotation which is a small text, attached with the main text. Such kind of annotation is used in Japanese or chinese publications. The <rtc> tag contains the <rt> tag. Note: HTML <rtc> tag is not supported in h 1 min read HTML <i> Tag The <i> tag in HTML is used to display the content in italic style. This tag is generally used to display the technical term, phrase, the important word in a different language. The <i> tag is a container tag that contains the opening tag, content & closing tag.Syntax// Inline way to 3 min read HTML <i> Tag The <i> tag in HTML is used to display the content in italic style. This tag is generally used to display the technical term, phrase, the important word in a different language. The <i> tag is a container tag that contains the opening tag, content & closing tag.Syntax// Inline way to 3 min read Like