Posts.

sub, sup, and small in HTML

Cover Image for sub, sup, and small in HTML
Rami Al-Karo
Rami Al-Karo

Hey everyone, and welcome back to my channel! In this video, we're going to talk about sub, sup, and small in HTML.

When it comes to formatting text in HTML, there are a variety of tags that you can use to achieve different effects. Three tags that you might come across are sub, sup, and small.

The sub-tag is used to create subscript text, which appears smaller and lower than the rest of the text. This can be useful for things like chemical formulas or mathematical equations, where you might need to denote a subscript number or symbol.

Similarly, the sup tag is used to create superscript text, which appears smaller and higher than the rest of the text. This can be useful for things like exponents or footnotes, where you might need to denote a superscript number or symbol.

Finally, the small tag is used to create text that appears smaller than the rest of the text. This can be useful for things like captions or fine print, where you want the text to be smaller and less prominent.

To use these tags, simply wrap the text that you want to format inside the appropriate tag. For example, to create subscript text, you would use the sub tag like this:

1 H<sub>2</sub>O

This would display as "H2O", with the "2" appearing smaller and lower than the "H" and "O". Similarly, to create superscript text, you would use the sup tag like this:

1 x<sup>2</sup>

This would display as "x2", with the "2" appearing smaller and higher than the "x". Finally, to create small text, you would use the small tag like this:

1 <small>This text is smaller.</small>

This would display as "This text is smaller.", with the text appearing smaller than the surrounding text.

So, that's it for this video! I hope you found it helpful, and if you have any questions or comments, be sure to leave them down below. Thanks for watching, and I'll see you in the next one!


More Stories

Cover Image for  5 Array Methods in JavaScript | Part 3 | Mastering JavaScript

5 Array Methods in JavaScript | Part 3 | Mastering JavaScript

485 words - 2,754 characters

Rami Al-Karo
Rami Al-Karo
Cover Image for 5 Array Methods | Part 2 | Mastering JavaScript

5 Array Methods | Part 2 | Mastering JavaScript

907 words - 5,716 characters

Rami Al-Karo
Rami Al-Karo