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 π