HTML Image tags | Know List of Attribute for HTML Image tag in hindi

 


What is HTML Image Tags (क्या है HTML Image Tags‎?)

 HTML is a plain text document that allows multiple formats of programming languages to implement web-based applications, which uses tags for describing the web pages’ functionality. One such essential tag is the image tag that allows the developers to incorporate image files into the code for displaying the respective images on the web page. The syntax for this is <img src = ‘copy image URL’>, where ‘image’ is the tag name, and ‘src=’ should have the required image’s URL assigned to it.

एचटीएमएल एक सादा टेक्स्ट दस्तावेज़ है जो प्रोग्रामिंग भाषाओं के कई प्रारूपों को वेब-आधारित अनुप्रयोगों को लागू करने की अनुमति देता है, जो वेब पेजों की कार्यक्षमता का वर्णन करने के लिए टैग का उपयोग करता है। ऐसा ही एक आवश्यक टैग छवि टैग है जो डेवलपर्स को वेब पेज पर संबंधित छवियों को प्रदर्शित करने के लिए कोड में छवि फ़ाइलों को शामिल करने की अनुमति देता है। इसके लिए सिंटेक्स <इएमजी एसआरसी = 'कॉपी इमेज यूआरएल' > है, जहां 'इमेज' टैग नाम है, और 'एसआरसी=' में आवश्यक छवि का यूआरएल सौंपा जाना चाहिए।‎

👉Adding Images to Webpages ‎(वेबपेज में छवियां जोड़ना‎)

You can add IMG to an HTML page by using the <img> tag in the HTML document; here is the syntax :

‎आप एचटीएमएल दस्तावेज़ में <आईएमजी>टैग का उपयोग करके एक एचटीएमएल पेज में आईएमजी जोड़ सकते हैं; यहां वाक्य रचना है:‎

<img src= enter the IMG URL here >

Here, the IMG tells the browser that the tag is about adding an IMG to the document, and the “src=” specifies where to download the image from.

‎यहां, आईएमजी ब्राउज़र को बताता है कि टैग दस्तावेज़ में आईएमजी जोड़ने के बारे में है, और "एसआरसी =" निर्दिष्ट करता है कि छवि को कहां से डाउनलोड करना है।‎

👉Example of a Page with an Image

Code:

<!DOCTYPE html>
<html>
<head>
<title> Example HTML IMG Tag </title>
</head>
<body>
<img src = " https://cdn.educba.com/academy/wp-content/uploads/2019/02/Software-Dev.jpg"
alt = " Software development icon " height = " 150 " width = "140" />
</body>
</html>

Output:

Html Image Tags-Output

One interesting fact about these HTML pages  is that when you use the IMG tag, the image is not inserted to the said web page; instead, it creates a holding space where the image is put once it is downloaded.

‎इन एचटीएमएल पृष्ठों के बारे में एक दिलचस्प तथ्य यह है कि जब आप आईएमजी टैग का उपयोग करते हैं, तो छवि को उक्त वेब पेज पर नहीं डाला जाता है; इसके बजाय, यह एक होल्डिंग स्पेस बनाता है जहां छवि को डाउनलोड करने के बाद रखा जाता है।‎

👉Browser Support and Compatibility with Attributes

(‎ब्राउज़र समर्थन और विशेषताओं के साथ अनुकूलता)‎

As you can expect, all modern browsers support images and the use of IMG tags. Sometimes, mobile browsers will resize the image to fit it on the screen if the image is not set as responsive.

When it comes to compatibility of attributes with HTML 4.01 and newer HTML5, most tags will work, except for aligning, border, hspace, and space, which are simply not supported in the latter.

‎जैसा कि आप उम्मीद कर सकते हैं, सभी आधुनिक ब्राउज़र छवियों और आईएमजी टैग के उपयोग का समर्थन करते हैं। कभी-कभी, यदि छवि उत्तरदायी के रूप में सेट नहीं होती है तो मोबाइल ब्राउज़र छवि को स्क्रीन पर फिट करने के लिए आकार देगा।‎

‎जब एचटीएमएल 4.01 और नए एचटीएमएल 5 के साथ विशेषताओं की अनुकूलता की बात आती है, तो अधिकांश टैग संरेखण, सीमा, एचस्पेस और अंतरिक्ष को छोड़कर काम करेंगे, जो बाद में समर्थित नहीं हैं।‎

👉Images as a link:

There will be times when you will want an image to work as a link to another page. You can get it done by adding the IMG tag inside the <a> tag.

‎ऐसे समय होंगे जब आप चाहते हैं कि एक छवि किसी अन्य पृष्ठ के लिंक के रूप में काम करे। आप इसे <ए>टग के अंदर आईएमजी टैग जोड़कर प्राप्त कर सकते हैं।‎

  • <a href=” https://romyou.blogspot.com/project-management/ “>
  •  <img src=” https://romyou.blogspot.com/learning by /wp-content/uploads/2021/02/Project-Management.jpg ” alt=” Project Management ” style=”width:42px; height:42px; border:0;” ></a>

👉Setting an Image as the Background of a Webpage

(‎वेबपेज की पृष्ठभूमि के रूप में एक छवि सेट करना)‎:-

You can assign an image as a background picture of a web page by using the background-image CSS property in the page’s Body element.‎

आप पृष्ठ के शरीर तत्व में पृष्ठभूमि-छवि सीएसएस संपत्ति का उपयोग करके वेब पेज की पृष्ठभूमि चित्र के रूप में एक छवि असाइन कर सकते हैं।‎

<body style="background-image:url(‘car.jpg');">
<h1>Background Image </h1>
</body>

👉Setting an Image to Float in the Browser

‎(ब्राउज़र में फ्लोट करने के लिए एक छवि सेट करना)‎:-

We can use the CSS property “float” to set an image to float inside anywhere in the browser window. Let’s take a look at an example that will help you in understanding.

‎हम ब्राउज़र विंडो में कहीं भी अंदर तैरने के लिए एक छवि सेट करने के लिए सीएसएस संपत्ति "फ्लोट" का उपयोग कर सकते हैं। आइए एक उदाहरण पर एक नजर डालते हैं जो आपको समझने में मदद करेगा।‎

<p> <img src="car.png" alt="Ferrari Car " style="float: right; width:40px; height: 40px;">

Here, the image of the car will float to the right side of the text. </p>

‎यहां, कार की छवि पाठ के दाईं ओर तैरना होगा । </पी>‎

<p><img src=" car.png " alt=" Ferrari Car " style="float: left; width: 40px; height: 40px;">

Here, the image of the car will float to the left side of the text. </p>

‎यहां, कार की छवि पाठ के बाईं ओर तैरना होगा । </पी>‎

💬  Attributes of Image Tag  ‎इमेज टैग की विशेषताएं‎

    The following are the attributes of an image tag.

  ‎निम्नलिखित एक छवि टैग के गुण हैं।‎

1) Align (मिल‎)

Possible Values: Top, Bottom, Middle, Left or Right.

The alight attribute is used to specify the alignment of a picture on the webpage.

‎वेबपेज पर चित्र के संरेखण को निर्दिष्ट करने के लिए एलाइट विशेषता का उपयोग किया जाता है‎

2) Alt

Value type: Text

‎Alt is used to specify the alternative text of a picture of a webpage. In cases where displaying an IMG is not possible, the browser displays this text to the user. Search engines such as Google and Bing use this alt text to show results in the Image Search.

ऑल्ट का उपयोग वेबपेज की तस्वीर के वैकल्पिक पाठ को निर्दिष्ट करने के लिए किया जाता है। ऐसे मामलों में जहां आईएमजी प्रदर्शित करना संभव नहीं है, ब्राउज़र उपयोगकर्ता को इस पाठ को प्रदर्शित करता है। Google और बिंग जैसे सर्च इंजन इमेज सर्च में परिणाम दिखाने के लिए इस ऑल्ट टेक्स्ट का उपयोग करते हैं

3) Border(‎सीमा रेखा‎)

Value Type: Pixels

‎It is used to create a border of user-defined thickness around the picture. It does not work on HTML5.

इसका उपयोग तस्वीर के चारों ओर उपयोगकर्ता-परिभाषित मोटाई की सीमा बनाने के लिए किया जाता है। यह HTML5 पर काम नहीं करता है।‎

4) Cross-Origin(क्रॉस-ओरिजिन‎)

Value Type: Anonymous use-Credentials

‎This attribute is used when we want to specify how cross-origin photos should be dealt with. This is mostly used in cases where canvas elements of JavaScript web apps are used.

इस विशेषता का उपयोग तब किया जाता है जब हम यह निर्दिष्ट करना चाहते हैं कि क्रॉस-ओरिजिन फ़ोटो को कैसे निपटाया जाना चाहिए। इसका उपयोग ज्यादातर उन मामलों में किया जाता है जहां जावास्क्रिप्ट वेब ऐप्स के कैनवास तत्वों का उपयोग किया जाता है।‎

5) Height (‎ऊँचाई‎)

Value Type: Percentages or Pixels

Obviously, this one is used to denote the height of the image in the HTML webpage.

जाहिर है, इसका उपयोग एचटीएमएल वेबपेज में छवि की ऊंचाई को निरूपित करने के लिए किया जाता है।‎

6) hspace (हास्पेस)‎ 

Value Type: Pixels

Unsupported in HTML5, the hspace attribute is used to specify in pixels how much white space was to be added to the left and right of the inserted image.

‎HTML5 में असमर्थित, एचस्पेस विशेषता का उपयोग पिक्सल में निर्दिष्ट करने के लिए किया जाता है कि डाला गई छवि के बाईं और दाईं ओर कितना सफेद स्थान जोड़ा जाना था।‎

7) ismap(‎इसमैप‎)

Value type: URL of a Page

‎ismap we used to define the said image as a server-side image map. When the user clicks (or taps) inside the image, the browsers send the click (or tap) coordinates to the web server as a URL.

इसमैप हम एक सर्वर साइड छवि नक्शे के रूप में उक्त छवि को परिभाषित करने के लिए इस्तेमाल किया। जब उपयोगकर्ता छवि के अंदर क्लिक (या टैप) करता है, तो ब्राउज़र यूआरएल के रूप में वेब सर्वर पर क्लिक (या टैप) निर्देशांक भेजते हैं।‎

8)  Longdesc(लॉन्गडेस्क‎)

Value Type: URL

‎Longdesc is used to give a detailed description of an image by using a URL. The URL used in the attribute is used as the description of the image.

लॉन्गडेस्क का उपयोग यूआरएल का उपयोग करके एक छवि का विस्तृत विवरण देने के लिए किया जाता है। विशेषता में उपयोग किए जाने वाले यूआरएल का उपयोग छवि के विवरण के रूप में किया जाता है।‎

9)‎  src (एसआरसी)‎

Value Type: URL

‎src stands for source. It is used to specify the address from which the browser will retrieve the image; this URL can be applied to an image inside a directory in the same server. It can also store an image in a third-party server with a different domain name.

एसआरसी स्रोत के लिए खड़ा है। इसका उपयोग उस पते को निर्दिष्ट करने के लिए किया जाता है जिससे ब्राउज़र छवि को पुनः प्राप्त करेगा; इस यूआरएल को एक ही सर्वर में एक निर्देशिका के अंदर एक छवि पर लागू किया जा सकता है। यह एक अलग डोमेन नाम के साथ तीसरे पक्ष के सर्वर में एक छवि भी स्टोर कर सकता है।‎

10) usemap (उपयोगमैप)‎

Value Type : #mapname

‎usemap विशेषता का उपयोग क्लाइंट-साइड इमेज मैप के लिए छवि को परिभाषित करने के लिए किया जाता है। एक usemap हमेशा मानचित्र और क्षेत्र HTML टैग के साथ प्रयोग किया जाता है।‎

11) vspace (‎वीस्पेस)‎

Value Type: Pixels

Unsupported in HTML5, the Vspace attribute is used to set the number of pixels that are to be used as whitespace at the top and bottom of the image on the webpage.

‎HTML5 में असमर्थित, वीस्पेस विशेषता का उपयोग वेबपेज पर छवि के शीर्ष और नीचे व्हाइटस्पेस के रूप में उपयोग किए जाने वाले पिक्सेल की संख्या निर्धारित करने के लिए किया जाता है।‎

12) ‎ Width (चौड़ाई)‎

Value Type: Pixels

‎Just as its name suggests, the width attribute is used to specify the width of a picture inside the HTML web page.

जैसा कि इसके नाम से पता चलता है, चौड़ाई विशेषता का उपयोग एचटीएमएल वेब पेज के अंदर एक तस्वीर की चौड़ाई निर्दिष्ट करने के लिए किया जाता है।‎

Conclusion ‎समाप्ति‎

Now that we have taken a look at how images are added to HTML pages and how to set their attributes, we can create attractive looking web pages in a web project.

Besides just adding visual flair to a web page, images are valuable because they help search engine optimisation. Adding proper alt tags and descriptions to images help search engines understand the content of a web page better and improve the ranking of a web page in many cases.

‎अब जब हमने एक नज़र डाल ली है कि छवियों को एचटीएमएल पृष्ठों में कैसे जोड़ा जाता है और उनकी विशेषताओं को कैसे सेट किया जाता है, तो हम वेब प्रोजेक्ट में आकर्षक दिखने वाले वेब पेज बना सकते हैं।‎

‎सिर्फ एक वेब पेज पर दृश्य स्वभाव जोड़ने के अलावा, छवियां मूल्यवान हैं क्योंकि वे खोज इंजन अनुकूलन में मदद करते हैं। छवियों के लिए उचित ऑल्ट टैग और विवरण जोड़ने से खोज इंजन को वेब पेज की सामग्री को बेहतर ढंग से समझने और कई मामलों में वेब पेज की रैंकिंग में सुधार करने में मदद मिलती है।‎

Recommended Articles ‎अनुशंसित लेख‎

This is a guide to HTML Image Tags. Here we discuss the basic concept and attributes of the image tag, such as browser support and compatibility with attributes. You may also have a look at the following articles to learn more..

यह एचटीएमएल इमेज टैग के लिए एक गाइड है। यहां हम इमेज टैग की मूल अवधारणा और विशेषताओं पर चर्चा करते हैं, जैसे ब्राउज़र समर्थन और विशेषताओं के साथ अनुकूलता। आप और अधिक जानने के लिए निम्नलिखित लेखों पर भी एक नज़र डाल सकते हैं‎

Post a Comment

0 Comments