HTML Images
HTML Images
Step by Step Describe of HTML IMages Content
Images - HTML Images
HTML images are used to make web page design look nice and beautiful.
That means HTML Page has Design Improvement of Web Page.
Image in HTML is defined by <img> tag. Through this you can add image to web page.
The special thing about this tag is that it does not have any closing tag. But the attribute is used in it.
Which makes the image look attractive and user experience is good.
<img> tag has two required Attribute:
- src - specifies the path of the image.
- alt - specifies an alternative text for the image.
Syntax of HTML Images:
<img src =" url " alt =" alternatetext ">
Example:
Output:
We have defined 360 pixels of the image.

src attribute: specifies the image's URL or filename.
alt attribute: This is also called alternative text.Which means that when the image is not uploaded due to any reason, then at that time it is text show.
Due to no image upload:
- Internet speed is slow, then
- If there is an error in the src attribute, then
- or the user has locked images
Width and Height:
You can also use the style attribute if you want to change the height and width of the image.
Images - HTML Images
HTML Images का उपयोग इसलिए किया जाता हैं, ताकी Web Page का Design देखने में आच्छा और सुंदर दिखें।
मतलब की HTML Images से Web Page का Design Improve होता हैं।
HTML में Image को <img> tag द्वारा Define किया जाता हैं। इसके द्वारा आप image को web page में add कर सकते हो।
इस tag की खास बात यह है कि इसका कोई closing tag नहीं होता हैं। परन्तु इसमें attribute का उपयोग किया जाता हैं।
जिससे Image देखने में attractive लगती है और user experience अच्छा होता हैं।
<img> tag में दो आवश्यक Attribute हैं:
- src - Image का path specify करता हैं।
- alt - Image के लिए एक Alternative Text specify करता हैं।
Syntax of HTML Images:
<img src =" url " alt =" alternatetext ">
उदाहरण:
Output:
We have defined 360 pixels of the image.

src attribute द्वारा image का URL या file का नाम specify किया जाता हैं।
alt attribute को alternative text भी कहा जाता हैं। जिसका मतलब होता है कि जब किसी कारण image upload ना हो तो उस समय यह text show होता हैं।
Image upload ना होने के कारण:
- Internet की speed धीमी होना, तब
- यदि src attribute में कोई error हो, तब
- या user ने images बंद रखी हों
Width और Height:
यदि image की height और width को change करना हो तो आप style attribute का भी प्रयोग कर सकते हो।
The Images is in Another Folder
If so, you can use this given code.
Syntax:
<img src="/folder name/imagename.jpg" alt="logo">
Example:
Output:
Images in Another Folder

Image दूसरे folder में हो तो
यदि ऐसा हो तो आप इस दिये हुए code का उपयोग कर सकते हो
Syntax:
<img src="/folder name/imagename.jpg" alt="logo">
Example:
Output:
Images in Another Folder

Images on Another Server or Website
If your image is in a server and you want to access that image, then use this code:
Example:
Output:
Images on Another Server/Website
किसी अन्य सर्वर या वेबसाइट पर Images
यदि आपकी image किसी Server में हैं और उस image को access करना चाहते हो तो इस code का उपयोग करें:/p>
Example:
Output:
Images on Another Server/Website
Images HTML Links
Using links for images is a very common thing.
You can reach the destination by clicking on the image by linking the image.
In image links the <img> tag is used with <a>.
Example:
Output:
Images HTML Links
Images के लिए links का use करना, बहुत ही common बात हैं।
आप image को links द्वारा image को click करके destination तक पहुच सकते हो।
Image links में <img> tag का प्रयोग <a> के साथ किया जाता हैं।
Example:
Output:
HTML Floating Images:
Float in HTML is a CSS property using which images are float to the left or right.
Example:
Output:
HTML Floating Images


HTML Floating Images:
HTML में float एक CSS property है जिसके उपयोग से Images को left या right में float कराया जाता हैं।
उदाहरण:
Output:
HTML Floating Images


What is HTML Image Map?
You can create a clickable area on an image using the HTML Image Map.
The HTML Image map is defined with the <map> tag.
Areas are defined with one or more <area> tag.
Example:
Output:
Image Maps
Click on the Laptop, the Diary, or the Pen to go to a new page and read more about the topic:

How Does it Work?
The image is inserted using the <img> tag. The only difference from other images is that you must add a usemap attribute:
<img alt="image map" src="image map.jpg" usemap="#workmap">
The usemap value starts with a hash tag # followed by the name of the image map, and is used to create a relationship between the image and the image map.
HTML Image Map Create
Then, add a <map> element.
The <map> element is used to create an image map, and is linked to the image by using the required name attribute:
<map name="workmap">
The name attribute must have the same value as the <img>'s usemap attribute.
HTML Image Map क्या हैं?
HTML Image Map का उपयोग करके आप एक Image पर click करने योग्य area बना सकते हैं।
HTML Image map को <map> tag से Define किया जाता हैं।
Areas को एक या अधिक <area> tag के साथ परिभाषित किया गया हैं।
उदाहरण:
Output:
Image Maps
Click on the Laptop, the Diary, or the Pen to go to a new page and read more about the topic:

How Does it Work?
The image is inserted using the <img> tag. The only difference from other images is that you must add a usemap attribute:
<img alt="image map" src="image map.jpg" usemap="#workmap">
The usemap value starts with a hash tag # followed by the name of the image map, and is used to create a relationship between the image and the image map.
HTML Image Map Create
Then, add a <map> element.
The <map> element is used to create an image map, and is linked to the image by using the required name attribute:
<map name="workmap">
The name attribute must have the same value as the <img>'s usemap attribute.
What is HTML Background Images?
Background Image is used in HTML to make any website or blog more attractive.
You can define a background-image in your website's body or any HTML element using CSS.
HTML style attribute and CSS background-image property are used to add background image.
Add a background-image on a HTML element
Example:
Background image for a <div> element:
<div style="background-image: url('https://images.indianexpress.com/2019/03/baby-sit-up.jpg'); width:200px; height:200px;"> </div>Background image for a <p> element:
<p style="background-image: url('https://images.indianexpress.com/2019/03/baby-sit-up.jpg'); width:200px; height:200px;"> </p>Specify the background image in the <style> element
You can also specify the background image in the <style> element, in the <head> section:
Example:
div {
background-image: url('techbyantimshinde.jpg');
}
</style>
Other CSS Property is used for the background image.
- Background Repeat
- Background Cover
- Background Stretch
Background Repeat
Example:
div {
background-image: url('techbyantimshinde.jpg');
background-repeat: no-repeat;
}
</style>
Background Cover
you can set the background-size property to cover of background image.
you can set the background-attachment property to fixed of background image.
Example:
div {
background-image: url('techbyantimshinde.jpg');
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
}
</style>
Background Stretch
You can set the background-size property to 100% 100% for background image to stretch to fit.
Example:
div {
background-image: url('techbyantimshinde.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
HTML Background Images क्या हैं?
HTML में Background Image का उपयोग किसी भी website या blog को और आकर्षक बनाने के लिए किया जाता हैं।
CSS का उपयोग करके आप अपनी वेबसाइट की body या किसी भी HTML element में background-image को डिफाइन कर सकते हैं।
Background Image जोड़ने के लिए HTML style attribute और CSS background-image property का उपयोग किया जाता हैं।
एक HTML Element पर एक background-image add करना
उदाहरण:
Background image for a <div> element:
<div style="background-image: url('https://images.indianexpress.com/2019/03/baby-sit-up.jpg'); width:200px; height:200px;"> </div>Background image for a <p> element:
<p style="background-image: url('https://images.indianexpress.com/2019/03/baby-sit-up.jpg'); width:200px; height:200px;"> </p><style> element में background image Specify करें
आप background image में <style> Element, <head> Section को specify कर सकते हैं:
उदाहरण:
div {
background-image: url('techbyantimshinde.jpg');
}
</style>
Background Image के लिए Other CSS Property का उपयोग किया जाता हैं।
- Background Repeat
- Background Cover
- Background Stretch
Background Repeat
Example:
div {
background-image: url('techbyantimshinde.jpg');
background-repeat: no-repeat;
}
</style>
Background Cover
आप background image को cover करने के लिए background-size property सेट कर सकते हैं।
आप background image को फिक्स्ड करने के लिए background-attachment property सेट कर सकते हैं।
Example:
div {
background-image: url('techbyantimshinde.jpg');
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
}
</style>
Background Stretch
आप फिट करने के लिए stretch background image के लिए background-size property को 100% 100% पर सेट कर सकते हैं।
Example:
div {
background-image: url('techbyantimshinde.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
0 Comments