Coding with Sanjay Official

๐ŸŽฏ Welcome to Coding With Sanjay Official – CODING Seekhne Ki Pehli Seedhi Yahin Se Shuru Karein ๐Ÿ’ป

Frontend & Functionality

Java Script

Coming Soon๐Ÿ”’

Type Script

Coming Soon๐Ÿ”’

Monday, June 15, 2026

HTML Text Formatting Tags Practice Exercise (Basic to Advanced)

Agar aapne HTML Text Formatting ka tutorial complete kar liya hai, to ab practice ka time hai ๐Ÿ’ช

๐Ÿ‘‰ Is article me aapko tasks, unke answers aur expected output diya gaya hai jisse aap apni skills test kar sakte ho ๐Ÿš€


๐Ÿ”ฐ Exercise 1: Bold aur Important Text

Task: Ek line likho jisme ek word bold (<b>) ho aur ek word important (<strong>).


<p>This is <b>bold</b> and this is <strong>important</strong> text.</p>

๐Ÿ‘‰ Expected Output: "This is bold and this is important text."
(jahan "bold" bold dikhega aur "important" strong/bold emphasis me hoga)


๐Ÿ”ฐ Exercise 2: Italic aur Emphasis

Task: Ek sentence me italic aur emphasized text use karo.


<p>This is <i>italic</i> and this is <em>emphasized</em> text.</p>

๐Ÿ‘‰ Expected Output: "This is italic and this is emphasized text."
(jahan "italic" italic dikhega aur "emphasized" emphasized/italic hoga)


๐Ÿ”ฐ Exercise 3: Highlight Text

Task: Ek important word ko highlight karo.


<p>This is <mark>important</mark> text.</p>

๐Ÿ‘‰ Expected Output: "This is important text."
(jahan "important" yellow highlight me dikhai dega)


๐Ÿ”ฐ Exercise 4: Small Text

Task: Ek disclaimer small text me likho.


<p><small>Terms and conditions apply</small></p>

๐Ÿ‘‰ Expected Output: "Terms and conditions apply"
(jahan text normal se chhota dikhega)


๐Ÿ”ฐ Exercise 5: Deleted aur Inserted Text

Task: Old price ko delete karo aur new price insert karo.


<p><del>₹500</del> <ins>₹300</ins></p>

๐Ÿ‘‰ Expected Output: "₹500 ₹300"
(jahan ₹500 par strike-through line hogi aur ₹300 underline hoga)


๐Ÿ”ฐ Exercise 6: Subscript

Task: Water aur carbon dioxide ka formula likho using subscript.


H<sub>2</sub>O
CO<sub>2</sub>

Expected Output: "H₂O" aur "CO₂"
(jahan 2 niche chhota dikhai dega)


๐Ÿ”ฐ Exercise 7: Superscript

Task: Power aur date format likho.


X<sup>2</sup>
1<sup>st</sup>

๐Ÿ‘‰ Expected Output: "X²" aur "1st"
(jahan 2 aur "st" upar chhota dikhai dega)


๐Ÿ”ฐ Exercise 8: Combine Formatting

Task: Ek text me bold aur italic dono use karo.


<p><strong><em>Important Text</em></strong></p>

๐Ÿ‘‰ Expected Output: "Important Text"
(jahan text bold + italic dono me hoga)


๐Ÿ”ฐ Exercise 9: Real Paragraph

Task: Ek paragraph likho jisme multiple formatting use ho.


<p>
<strong>HTML</strong> ek markup language hai. 
Water formula H<sub>2</sub>O hai aur power X<sup>2</sup> hota hai.
</p>

๐Ÿ‘‰ Expected Output: "HTML ek markup language hai. Water formula H₂O hai aur power X² hota hai."
(jahan HTML bold hoga, 2 niche aur 2 upar dikhega)


๐ŸŽฏ Challenge Task (Pro Level)

๐Ÿ‘‰ Task:

  • ✔ Ek paragraph banao
  • ✔ Usme <strong>, <em>, <mark>, <sub>, <sup> use karo
  • ✔ Proper readable structure ho

๐Ÿ‘‰ Sample Answer:


<p>
<strong>HTML</strong> ek <em>important</em> language hai. 
Water formula <mark>H<sub>2</sub>O</mark> hai aur math me X<sup>2</sup> use hota hai.
</p>

Expected Output: "HTML ek important language hai. Water formula H₂O hai aur math me X² use hota hai."
(jahan HTML bold, important italic, H₂O highlight aur X² superscript hoga)


Important: HTML Text Formating ko deep me samjhane ke liye HTML Text Formating Kya Hai? (Complete Theory Guide for Beginners to Advanced) Article padhe

๐Ÿ Final Words

Agar aapne ye sab exercises complete kar liye hain, to aap HTML Text Formatting me strong ho chuke ho ๐Ÿ’ช

๐Ÿ‘‰ Practice hi aapko expert banati hai ๐Ÿš€

No comments:

Post a Comment