HTML attributes in hindi

HTML attributes in hindi


HTML attributes in hindi


HTML Attributes 

एक HTML tags या elements की अतिरिक्त जानकारी को परिभाषित करते हैं। जैसे कि HTML attributes का उपयोग Title, height, weight आदि अतिरिक्त जानकारी देने के लिए किया जाता है। Attributes को हमेशा open tags में रखा जाता है। इन्हें हमेशा किसी एक name के साथ value से जोड़ा जाता है। सभी HTML Tags अपनी Default Value में दिखाई देते हैं। इस Default Value को Change करने के लिये ही Attributes का प्रयोग किया जाता है। आप अपनी जरूरत के अनुसार किसी विशेष HTML Elements या tags की Value को एक विशेष Value में बदल सकते हैं। आप Elements या tags की Default Value को Attributes से Control कर सकते हैं।


Href


Href Attribute द्वारा किसी Link का URL, web page में लिखा जाता है। 

जैसे : 

<a href="https://www.CodeinHindi.online">Visit Code in hindi</a>
यहां पर <a> tag एक hyper link को परिभाषित करता है और href उस पेज के url को निर्दिष्ट करता है जिस पेज पर यूजर को भेजना है।
href attribute द्वारा हम दो तरह के url को परिभाषित कर सकते हैं।
Absolute URLs और Relative URLs

Absolute URLs 

Absolute URLs वो urls होते हैं जिन्हें हम अन्य वेबसाइट से copy करके लिखते हैं। इन्हें https://www. लगा कर पूर्ण रूप में लिखा जाता है।
जैसे : 
<a href="https://www.Google.com">Visit Google.com</a>

Relative URLs

Relative URLs वे urls होते हैं । जो हमारी वेबसाइट पर मौजूद पेज का लिंक (url) होते हैं। इन्हें लिखने के लिए https://www. की जरूरत नहीं पड़ती।
जैसे:
<a href="p/about-us.html">Visit About Us</a>

 
src

src Attribute भी href Attribute की तरह ही कार्य करता है। इस Attribute का इस्तेमाल Image Tag में किसी Image के URL को लिखने के लिये किया जाता है। src attributes भी href की तरह ही दो तरह के URLs (Absolute URLs और Relative URLs) का उपयोग कर सकते हैं। 
नोट: -
Absolute urls का उपयोग करना सर्वोत्तम रहता है। क्योंकि जब वेबसाइट के domain name को change कर देते हैं । ये तब भी काम करते रहते हैं।

alt

alt attribute का इस्तेमाल एक Image के बारे में Alternative Text लिखने के लिये किया जाता है। जब users किसी कारण image दिखाई नहीं देती तब यह text दिखाई देता है। जिससे कि users को पता चल सके कि यह image किसकी है। Search Engines भी इसका इस्तेमाल Image को पहचानने के लिये करते हैं।
जैसे :
HTML attributes in hindi

 

Width and Height


Width and Height Attribute द्वारा किसी विशेष Tag की Width और Height को Set किया जाता है। जैसे; आप किसी Image को इसके Original Size की जगह पर Custom Size में Show कराना चाहते है; तो आप Width and Height Attributes द्वारा Image का Custom Size Define कर सकते हैं।

जैसे:

<img src="img_maxon.jpg" width="500" height="600">

 

Style

Style Attribute का इस्तेमाल किसी Tag पर Inline CSS Rule Apply करने के लिये किया जाता है। मतलब किसी html tag में ही css लिख सकते हैं। जैसे : color, font, width, height आदि change कर सकते हैं।

जैसे :

<p style="color:red;">This is a red paragraph.</p>


lang

 lang Attribute का इस्तेमाल Content की Language को Define करने के लिये किया जाता है। इस Attribute को HTML Element पर Apply किया जाता है। यह search engine और browser को यह बताने में मदद करता है कि document को किस भाषा में लिखा गया है।

<!DOCTYPE html>
<html lang="en">
<body>
...
</body>
</html>


Title

Title Attribute का इस्तेमाल एक Element के बारे में अतिरिक्त सूचना देने के लिये किया जाता है। जब element पर माउस ले जाते हैं तो title विशेषता का मान टूलटिप के रूप में प्रदर्शित होता है।

जैसे :

<p title="United States of America">USA</p>


HTML attributes in hindi

नोट :-

Attributes को हमेशा lowercase letters में लिख कर use करना चाहिए।


अगर आपको यह पोस्ट 📑 पसंद आई हो तो अपने मित्रों के साथ जरूर शेयर करें। धन्यवाद !


Maxon

Hello there! I'm Maxon, a dedicated UI/UX designer on a mission to transform digital experiences into intuitive, user-centric journeys. With a keen eye for detail and a passion for crafting aesthetically pleasing interfaces, I strive to create designs that not only look stunning but also enhance usability and functionality.

Post a Comment

Previous Post Next Post