What is HTML Image in Hindi? Define its Attributes.

information of html image

What is HTML Image?

HTML में,  HTML Image एक Tag होता है जिसका उपयोग Web Pages पर Images को Display करने के लिए किया जाता है। यह Tag <img> नाम से जाना जाता है और HTML Image को Display करने के लिए उपयोग होता है। Image File का Path <img> Tag के src Attribute में Specified किया जाता है।

  • HTML <img> Tag का उपयोग Web Page पर Image Display करने के लिए किया जाता है।
  • HTML <img> Tag एक Empty Tag है जिसमें Only Attributes होती हैं, HTML Image Element में Closing Tag का उपयोग नहीं किया जाता है।

Define Attributes of HTML Image

Image Tag के  महत्वपूर्ण Attributes हैं:-

src Attribute

  • यह एक Required Attribute है जो Image के Source या Path को Describe करता है।
  • यह Browser को Instruction देता है कि Server पर Image को कहाँ देखना है।
  • Image का Location उसी Directory या किसी अन्य Server पर हो सकता है।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Image</title>
</head>
<body>
    <h1>Example Src Attribute</h1>
    <img decoding="async" src="animal.jpeg" >
</html>

				
			
image src attribute

alt Attribute

  • Alt Attribute Image के लिए एक Optional Text को Define करती है, अगर इसे प्रदर्शित नहीं किया जा सकता है। Alt Attribute का Value Word में Image का वर्णन करता है।
  • Prospective SEO के लिए Alt Attribute को अच्छा माना जाता है।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Image</title>
</head>
<body>
    <h1>Example Alt Attribute</h1>
    <img decoding="async" src="car.jpg" alt="This is image">
</html>

				
			
alt attribute

height & width Attribute

  • यह एक Optional Attribute है जिसका उपयोग Image Display करने के लिए Width Specific करने के लिए किया जाता है। अभी इसकी Recommendation नहीं की जाती है। आप Width Attribute के Place पर CSS Apply कर सकते है।
  • यह Image की Height h3 है। HTML Height Attribute iframe, Image और Object Element का भी समर्थन करती है। अभी इसकी Recommendation नहीं की जाती है। आप Height Attribute के Place पर CSS Apply कर सकते है।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Image</title>
</head>
<body>
    <h1>Example Height & Width Attribute</h1>
    <img decoding="async" loading="lazy" src="animal.jpeg" height="150" width="300">
</html>
				
			
imge height width attribute
Facebook
Pinterest
LinkedIn
WhatsApp

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top