← Back to HTML Course | Chapter 4: Semantics & Entities | Lesson 4 of 10

HTML Symbols

सोचिए आप एक online math textbook या financial report लिखने की कोशिश कर रहे हैं, लेकिन पता चलता है कि आपके keyboard में infinity, arrows, या Greek letters जैसे mathematical symbols के लिए keys ही नहीं हैं। HTML symbols इस समस्या को हल करते हैं। ये special codes हैं जो browser को mathematical operators, technical arrows, और shapes display करने का निर्देश देते हैं जो standard keyboards पर नहीं मिलते। ये symbols actual text characters के रूप में render होते हैं, यानी image files की तरह pixelate हुए बिना ये किसी भी size में साफ-साफ scale होंगे।
Syntax
markup
&entity_name;
&#number;
&#xhex;

Mathematical Symbols

HTML आपके page पर complex mathematical operators, fractions, और relationships को साफ तरीके से दिखाने के लिए entity codes की एक विस्तृत रेंज provide करता है।

Note: math equations की image फ़ाइलें embed करने की तुलना में symbol codes इस्तेमाल करना search engine indexing के लिए कहीं बेहतर है।
Warning: hexadecimal symbol codes लिखते समय hash और x characters शामिल करना सुनिश्चित करें।

उदाहरण: Mathematical Symbols

markup
<p>5 &times; 4 &divide; 2 = 10</p>

Greek Letters दिखाना

Greek letters आमतौर पर mathematics, physics, और science में इस्तेमाल होते हैं। HTML पूरी Greek alphabet को support करता है, जिससे आप सरल named entities इस्तेमाल करके lowercase और uppercase Greek characters साफ तरीके से render कर सकते हैं।

Note: uppercase Greek character render करने के लिए अपना named entity एक capital letter से शुरू करें (जैसे &Alpha;)।
Warning: अपनी spelling दोबारा जांचें, ताकि आप Greek characters (जैसे χ) को standard Latin letters के साथ confuse न करें।

उदाहरण: Displaying Greek Letters

markup
<p>&Alpha; &beta; &chi;</p>

Interactive Directional Arrows

Arrow symbols इस्तेमाल करना visitors की नज़र को call-to-action buttons की ओर ले जाने या भारी image फ़ाइलें load किए बिना sliding menus दिखाने का बढ़िया तरीका है।

Note: Arrow symbols असल में text characters होते हैं, इसलिए वे अपने-आप आपके paragraph के font size और color से मेल खा जाते हैं।
Warning: सुनिश्चित करें कि आपके arrow orientations आपके user directions से match करें, ताकि navigation में confusion न हो।

उदाहरण: Interactive Directional Arrows

markup
<p>Next page &rarr;</p>

Card Suit Shapes

HTML में classic card suits (Spades, Hearts, Clubs, और Diamonds) के लिए built-in symbol codes शामिल हैं, जिनसे आप इन shapes को अपने page पर साफ तरीके से render कर सकते हैं।

Note: आप card suit shapes के colors और sizes को dynamically बदलने के लिए CSS का इस्तेमाल कर सकते हैं।
Warning: card suits को navigation buttons के रूप में उपयोग न करें; इसके बजाय standard, descriptive text links का उपयोग करें।

उदाहरण: Card Suit Shapes

markup
<p>&spades; &hearts; &clubs; &diams;</p>

Numbered बनाम Named Symbol Entities

हर HTML symbol को एक named entity (जैसे &infin;) या एक numbered entity (जैसे &#8734;) के रूप में लिखा जा सकता है। named entities याद रखना आसान होता है, जबकि numbered entities पुराने operating systems और legacy mobile devices पर ज्यादा widely support किए जाते हैं।

Note: तेज़ coding के लिए named entities इस्तेमाल करें, लेकिन अगर आपकी site पुराने systems को support करती है तो numbered entities पर switch करें।
Warning: अपने numbered entity codes की शुरुआत में हमेशा hash symbol (#) शामिल करें।

उदाहरण: Numbered vs. Named Symbol Entities

markup
<p>&infin; is the same as &#8734;</p>
Live Example
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
🔒

Chapter Quiz — Complete all 10 topics to unlock

0/10 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.