HTML Me Text Formatting Tags
HTML me text formatting ke liye kai sare tags hote hain jo text ko bold, italic, underline, highlight ya structured format me dikhane me madad karte hain. Neeche sabhi text formatting tags ko detail me samjhaya gaya hai.
1. (Bold Tag) aur (Strong Tag)
HTML me aur dono hi tags text ko bold dikhane ke liye use hote hain, lekin inka semantic meaning alag hota hai.
- <b>: <b> tag ka use sirf text ko visually bold dikhane ke liye hota hai, bina kisi additional meaning ke. Iska SEO ya screen readers pe koi effect nahi hota.
- <strong>: <strong> tag text ko bold banata hai, lekin iska semantic meaning bhi hota hai. Iska matlab hai ki screen readers aur search engines is text ko important samjhenge.
<p>This is a <b>bold</b> text.</p> <p>This is a <strong>important</strong> text.</p>
2. (Italic Tag) aur (Emphasized Tag):
HTML mein <i> aur <em> tags dono hi text ko highlight karne ke liye use hote hain, lekin inme ek subtle difference hota hai.
- <i>: <i> tag ka use text ko visually italic dikhane ke liye kiya jata hai. Yeh kewal ek style hota hai jo text ki appearance ko change karta hai, bina kisi additional meaning diye.
- <em>: <em> tag ka use kisi shabd ya vaakyansh ko emphasize (zor dene) ke liye hota hai. Iska semantic (arthat meaningful) importance hota hai, jisse screen readers bhi samajh sakti hain.
<p>Yeh ek <i>italic</i> text hai.</p> <p>Yeh ek <em>emphasized</em> text hai.</p>
3. (Underline) aur (Inserted Text)
- <u>: Sirf text ko underline karta hai.
- <ins>: Underline ke sath batata hai ki yeh naya text insert kiya gaya hai.
<p>This is <u>underlined</u> text.</p> <p>This is <ins>inserted</ins> text.</p>
4. (Highlighted Text) :
<mark> :<mark> tag ka use kisi specific text ko highlight karne ke liye hota hai, jaise ki hum kisi important word ya sentence ko marker se highlight karte hain. Iska main purpose text ko visually noticeable banana hota hai, jo user ki attention grab kare.
<p>This is a <mark>highlighted</mark> text.</p>
5. <s> vs. <del> – Strikethrough Text kya hota hai ?
HTML me strikethrough effect ke liye <s> aur <del> dono tags use hote hain, lekin inka meaning aur usage alag hota hai.
<s>: <s> tag ka use galat ya outdated text ko visually strikethrough dikhane ke liye hota hai, lekin iska koi semantic meaning nahi hota.<del>: <del> tag ka use kisi text ko delete hone ka indication dene ke liye hota hai. Iska semantic meaning hota hai, jise screen readers aur search engines bhi samajh sakte hain.
<p>Is product ki price pehle <s>$50</s> thi, ab sirf $30 hai!</p> <p>Yeh offer sirf <del>15 April</del> 20 April tak valid hai.</p>
6. Subscript (<sub>) and Superscript (<sup>) kya hote hai ?
HTML me subscript aur superscript text ko dikhane ke liye <sub> aur <sup> tags ka use hota hai. Ye tags mathematical formulas, chemical equations, aur footnotes ke liye kaafi useful hote hain.
<sub> :<sub> tag kisi text ko thoda neeche (baseline ke neeche) dikhane ke liye hota hai.
<sup> :<sup> tag kisi text ko thoda upar (baseline ke upar) dikhane ke liye hota hai.
<p>Water ka chemical formula H<sub>2</sub>O hota hai.</p> <p>Mathematics me square ka notation x<sup>2</sup> hota hai.</p>
7. Monospace Text (<code> and <pre>) kya hota hai ?
<code>: <code> tag ka use inline code snippets ko dikhane ke liye hota hai. Iska output monospace font me hota hai, jo programming ke liye useful hai.
<code>:<pre> tag ka use block-level code ya preformatted text dikhane ke liye hota hai. Is tag ke andar jo spaces, line breaks aur indentation hoti hai, wo exactly waisi hi render hoti hai.
<p>HTML me bold text ke liye <code>b</code> tag ka use hota hai.</p> <pre> hello everyone How are you? </pre>
Quiz: Test Your Knowledge on HTML Text Formatting Tags!
Bonus: Practical Application!
Try Adding Text Formatting Tags to Your Webpage Today!
Choose tags like <b>, <i>, <u>, <small>, <mark>, and <sup> to enhance your content’s appearance and readability.