HTML Symbols special characters होते हैं जो keyboard से सीधे type करना मुश्किल होते हैं या browser उन्हें normal text की तरह interpret नहीं करता।
इन symbols को HTML में entities की मदद से safely display किया जाता है।
HTML Symbols का उपयोग क्यों किया जाता है?
Symbols का उपयोग mathematical expressions, currency, arrows, copyright, trademark और UI elements में किया जाता है।
Direct symbol लिखने से browser issue आ सकता है, इसलिए entities preferred होती हैं।
HTML Symbol लिखने का तरीका
HTML Symbols को entity के रूप में लिखा जाता है।
Name based format:
&symbolName;
Number based format:
&#symbolNumber;
Common Mathematical Symbols
+ <!-- + -->
− <!-- − -->
× <!-- × -->
÷ <!-- ÷ -->
= <!-- = -->
≠ <!-- ≠ -->
≤ <!-- ≤ -->
≥ <!-- ≥ -->
Example:
<p>10 × 2 = 20</p>
Currency Symbols
$ <!-- $ -->
€ <!-- € -->
£ <!-- £ -->
¥ <!-- ¥ -->
₹ <!-- ₹ -->
Example:
<p>Total Amount: ₹1500</p>
Arrow Symbols
→ <!-- → -->
← <!-- ← -->
↑ <!-- ↑ -->
↓ <!-- ↓ -->
↔ <!-- ↔ -->
Example:
<p>Next → Previous</p>
Copyright और Legal Symbols
© <!-- © -->
® <!-- ® -->
™ <!-- ™ -->
§ <!-- § -->
Example:
<p>© 2025 MyWebsite</p>
Card और Shape Symbols
♥ <!-- ♥ -->
♦ <!-- ♦ -->
♣ <!-- ♣ -->
♠ <!-- ♠ -->
Example:
<p>♥ Love ♥</p>
Greek Letter Symbols
α <!-- α -->
β <!-- β -->
γ <!-- γ -->
π <!-- π -->
ω <!-- ω -->
Example:
<p>Value of π is approximately 3.14</p>
UI और Special Symbols
✓ <!-- ✓ -->
✗ <!-- ✗ -->
☆ <!-- ★ -->
• <!-- • -->
Example:
<p>Status: ✓ Approved</p>
Emoji Symbols in HTML
Emoji को numeric entities से लिखा जाता है।
😀 <!-- 😀 -->
🚀 <!-- 🚀 -->
❤ <!-- ❤️ -->
Example:
<p>Welcome 😀</p>
UTF-8 Encoding और Symbols
Symbols को सही दिखाने के लिए HTML document में UTF-8 charset होना चाहिए।
<meta charset="UTF-8">
Symbol Name vs Symbol Number
Name-based entities readable होती हैं लेकिन हर symbol के लिए available नहीं होतीं।
Number-based entities हर symbol के लिए काम करती हैं और ज्यादा reliable मानी जाती हैं।
Example:
©
©
दोनों का output same होता है।
HTML Symbols Summary
HTML Symbols special characters दिखाने के लिए उपयोग होते हैं
Symbols को entities के रूप में लिखना safe तरीका है
Currency, math, arrows, legal और UI symbols widely used हैं
UTF-8 encoding best practice है
