Html in Hindi – HTML Attributes
- HTML attributes in Hindi
- Syntax of HTML attributes in Hindi
- Introduction to HTML attributes in Hindi
What is Attributes
Html मे जब भी coding की जाती है | तो HTML tags create किये जाते है | और उन tags के अन्दर Attributes भी define किये जाते है | कुछ html tag ऐसे होते है जिनका खुद का Attributes होता है और कुछ html tag ऐसे होते है जिनका Attributes नही होता है लेकिन अगर हम चाहे तो उनमे Attributes create कर सकते है |
Why use for Attributes
जब हम html language का use करके एक web page बनाते है तो बहुत सारे html tags बनाने पड़ते है और web page को अपने according customize करना चाहते है | तो उसके लिए Attributes का use करना पड़ता है क्योकि बिना Attributes के web page customize नही कर सकते है |
Syntax of Html Attributes
Global Attributes
Html मे Global Attributes वो Attributes होते है जो html के हर tag मे use किये जाते है या कर सकते है Global Attributes दो प्रकार के होते है |
- ID Attributes
- Class Attributes
1 – ID Attributes
Id attribute के द्वारा html tags को एक unique नाम दिया जाता है | ताकि हमारे html tag पर आसानी से css apply हो सके |
2 – Class Attributes
Class attribute भी id attribute की तरह ही होता है। किसी भी tag का unique name देने के लिए id और class का use किया जाता है | id और class मे सिर्फ { ( Dot . ) और ( Hash # ) } का difference होता है | यानी css लिखने के लिए id को ( # ) Hash से represent किया जाता है | और class को एक ( . ) dot से represent किया जाता है | ताकि आसानी से css लिख सके |
अब कुछ attributes हम निचे दे रहे है example के साथ उसे देखे और समझे |
Style Attributes
इस Attributes का use html के किसी भी tag पर css apply करने के लिए use किया जाता है | या styling करने के लिए किया जाता है | अब निचे दिये गये example को देखे |
lang Attributes
इस attribute का use html tags के अन्दर use की गयी language से होता है यानी आप tags के अन्दर कौन सा language use कर रहे है उसे बताने के लिए lang attribute का use किया जाता है |
Title Attributes
इस attribute के द्वारा आप किसी भी word का full form दिखा सकते है या उसके बारे में अधिक जानकारी दे सकते है।
Accesskey Attribute
इस attribute के द्वारा आप html के किसी tag पर focus create कर सकते है या एक shortcut key define कर सकते है।