HTML in Hindi Images




Image टैग का उपयोग वेबसाइट अच्छी बनाने के लिए किया जाता है जिससे वेबसाइट यूजर को अपनी और आकर्षित करे. इसके लिए <img> Tag का उपयोग किया जाता है. <img> Tag बहुत से Attributes प्रदान करता है जिनसे आप Image की Presentation को नियंत्रण कर सकते है. <img> Tag एक Empty Tag है इसलिए इसे Close करने की आवश्यकता नही होती है. <img> Tag मे बहुत से Attributes होते है जिनके बारे में आप नीचे देख सकते है.

Including Images in Web Page

Web Page मे Images को Include करने के लिए <img> Tag का उपयोग किया जाता. <img> Tag के साथ Src Attribute उपयोग करना ज़रूरी होता है बाकि सभी Attributes Optional होते है इसका उदाहरण आप नीचे देख सकते है.

Alternative Text With Images

अगर किसी वजह से Image show नही होती है तो Alternative Text उस जगह पर Show होता है. यह Attribute Search Engines को ये बताने के लिए भी उपयोग किया जाता है. अगर किसी कारण से Picture Load नहीं होती है तो उसकी जगह Alternate Text Show होता है.

Height and Width of Images

Height और Width Set करने के लिए आप Height और Width Attributes कर सकते है. इनकी Values आप Integers मे Define कर सकते है.

Attributes Description
src src से आप वेब पेज में कोई भी Image प्रदर्शित कर सकते है.
alt Alt Attributes Text की Value दिखाता है वेब पेज में यदि Image दिखाता है तो यह Text Value दिखाता है. इसलिए ये Image का वैकल्पिक कहलाता है.
width इससे से आप Image की Width सेट करते है.
height इससे आप Image की Height सेट करते है.
style इस Attributes के द्वारा आप Images पर CSS Rules Apply कर सकते है.

For Example

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Image Example</title>
   </head>	
   <body>
      <h2>HTML Image Example</h2>
      <img src="tutorialsroot.jpg" alt="Tutorialsroot"/>
   </body>
</html>

Output