Core Concept of HTML Text Formatting Tags
To represent special text/word or letters, text formatting tags are used.
There are a lot of tags that exist for text formatting.
- <i> Italic : To slant the text.
- <b> Bold: To show the text with some darkness.
- <u> Underline : To draw a straight line under the text.
- <s>Strikethrough : To draw a straight line through the middle of the text to ignore the text.
- <sup>Superscript : To represent mathematical powers like 22 , etc.
- <sub>Subscript : To represent the text below the normal text, like H2O.
Why is it used?
- To represent mathematical formulas or prices.
- To improve the text readability and visibility.
Real-Life Applications
- E-Commerce Website: To show the new price with the old strike price for a sale, discount, or new offer. The strikethrough is used.
- Educational & Science Blogs: To show science or math formulas like H2O, CO2, x2+y2, etc. the superscript is used
- Articles and Books: To represent the book name or foreign word, the italic <i> tag or element is used. Right now, you are reading this content is the best real-life example of text formatting.
Key Benefits of this Program
- No need to add CSS styles; clean formatting is applied, and it will improve the text readability.
