HTML Basics-The img tag-usage and attributes used with it

HTML Basics-The img tag-usage and attributes used with it-Including in image is a very simple job. The <img> tag is used for this purpose and the attribute ‘SRC’ to take the image URL value. In an HTML page, technically no image is incerted but the images are linked to the HTML pages. A holding space is created by the <img> tag for the referenced image. The image tag is nested inside <a> tags if image required to be linked to another documant. The ‘SRC’ attribute takes the image URL as value and determines the source of the image file. Only .jpeg, .gif and .png files are acceptable. The <img> tag is an empty tag(No end tag required) in HTML but in XHTML a closing tag is required.

 


http://www.wikigreen.in/2015/07/html-basics-img-tag-usage-and.html
HTML Basics-The img tag-usage and attributes 

Attributes used with <img> tag.

The following attributes are used with an image <img> tag-


S.N.
Attribute
Value
Description
1
Align
Top, Bottom, left, Right and Middle
Used to specify the image alignment depending upon thesarrounding elements. (HTML5 does not support)
2
Alt
Text
Used to define an alternative text for the image.
3
border
Pix
Used to define a border around an image. (HTML5 does not support)
4
Crossorigin
Anonimous or
Credentials used
Images from third party websites permitting cross-origin access are allowed with canvas
5
Height
Pix.
Used to specify the height of the image
6
HSpace
Pix.
Space in the left and right side of the image is specified. (HTML5 does not support)
7
ISMap
ismap
Image is specified as server side map
8
Longdesk
URL
The URL to a detailed description is specified.
9
Src
URL
The image URL is specified
10
UseMap
#mapname
An image is specified as client side imagemap
11
VSpace
Pix.
Space in the top and bottom of the image is specified. (HTML5 does not support)
12
Width
pix
Used to specify the width of the image.
Examples –

Inserting an Image from a folder

<body>
<img src=birds/weavers.png alt=”The Weavers Colony” width=”40” height=”20”>
</body>

Inserting an image from a website

<body>
<img src=”http://www.wikigreen.in/birds/weavers.png alt=”The Weavers Colony” width=”40” height=”20”>
</body>

Thank you very much for visiting this page.
 

html image link, image size html, html background image, hyperlink image html, how to align image in html, how to center an image in html, how to add image in html from a folder, image and text side by side html css, What is the use of IMG tag in HTML, What are the essential attributes in image tag in HTML, What attribute is used with the IMG tag to add images to pages, What is the IMG tag used for what are its attributes describe them in a few words

 


Special requestPlease let us know through a comment that how our effort was. Do not hesitate to give an dverse opinion, give your opinion impartially. Please subscribe to our blog and like our Facebook page. Subscribe to our YouTube channel “Start with Wikigreen”. Please share it to your friends and beloveds. Thanks a lot for visiting our page.
 

2 टिप्पणियाँ

Please Donot spam

और नया पुराने