Important Notice:

Course Content
Heading Tag / Paragraph Tag
0/2
Horizontal Rules (HR element)
0/1
Font Element
0/1
Image Element
0/1
HTML Basic (Chapter 3) M2-R5.1
About Lesson

Image Element:-

HTML img टैग का उपयोग वेब पेज पर image प्रदर्शित करने के लिए किया जाता है। HTML img टैग एक empty टैग है जिसमें केवल attributes होते हैं, HTML image element में closing टैग का उपयोग नहीं किया जाता है।

Syntax:-<img src=”location border=value height=value width=value vspace=value hspace=value align=alignment alt=text>

Attribute of Image Element:-

SRC:इस Attribute का उपयोग Image के Source यानि URL को Define करने के लिए किया जाता है.

Border:border भी image tag का एक attribute ही है इस attribute का use image को border देने के लिए किया जाता है

Height:इस Attributes का use Image height को Define करने के लिए किया जाता है

Width:इस Attributes का use Image Width को Define करने के लिए किया जाता है

Vspace:इस attribute का उपयोग इमेज के टॉप और बॉटम में स्पेस देने के लिए किया जाता है

Hspace:इस attribute का उपयोग इमेज के लेफ्ट और राइट में स्पेस देने के लिए किया जाता है

Align:इसके द्वारा Image Alignment को Define किया जाता है The options are – left, right, center, top, bottom and middle.

ALT:alt attribute image के लिए एक वैकल्पिक text दिखाता है यदि image प्रदर्शित नहीं होती है, Alt attribute की value शब्दों में image का वर्णन करता है

Example:-<img src=”a.jpg” height=”145” width=”165” hspace=15 vspace=15 align=”right” border=2 alt=logo>

Base Tag:-

     HTML <base> tag द्वारा किसी HTML document के सभी URLs के लिए base URL specify किया जाता है। इसके बाद आपको पूरा URL लिखने के लिए आवश्यकता नहीं होती है। जब भी आप कोई URL add करते है तो base URL उस URL से पहले automatically prefix कर दिया जाता है।

Syntax:-<base href=”base-url” target=”_blank”>

Image Element:-

This is an empty element used to insert an image in the web page. “img” is used as a tag for this element and this tag have many attributes. Since it is empty element it does not have end tag.

Syntax:- <img src=”location border=value height=value width=value vspace=value hspace=value align=alignment alt=text>

Attribute of Image Element:-

SRC: attribute specifies path of image file.

Border: this attribute puts a border around the image. We specify the thickness of the border along with this attribute in terms of pixels.

Height: This attribute specifies the height of the image to be displayed in terms of pixels. The size of the image is automatically adjusted by the height we specify.

Width: this attribute specifies the width of the image to be displayed in terms of pixels. The size of the image is automatically adjusted by the width we specify.

Vspace: This attribute specifies the amount of space at the top and the bottom of the image. Vertical space is specified in terms of pixels.

Hspace: This attribute specifies the amount of space at the left and the right side of the image. Horizontal space is specified in terms of pixels.

Align: This attribute specifies the horizontal alignment of the image. The options are – left, right, center, top, bottom and middle.

ALT: This attribute specifies the text that will be displayed on screen in case the browser is unable to display the image specified in the SRC attribute.

Example:- <img src=”a.jpg” height=”145” width=”165” hspace=15 vspace=15 align=”right” border=2 alt=logo>

Base Tag:-

The <base> tag specifies the base URL and/or target for all relative URLs in a document. The <base> tag must have either an href or a target attribute present, or both. There can only be one single <base> element in a document, and it must be inside the <head> element.

Syntax:-<base href=”base-url” target=”_blank”>

error: Content is protected !!