Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Image tag

Image tag is used for place the images on web pages. Image tag can have different properties. These are :

Syntax :

<img src="" width="200px" height="100px" alt="Image text" />
Write this line after body tag and give the path of image.

There are many properties which can be use with img tag. These are:

Border: shows the border on images.

Class= can be used for applying the class

Dynsrc=means dynamic source. It specifies the url of inline video

Height=specifies the height of image.

Width=secifies the width of image.

Hspace=means howrizontal space. Sets the horizontal spacing around the image.

ID=Sets the unique name for this tag. ID is the necesseity for use in other languages. With id tag can be identified.

Name=This gives uniqe name.

Src=sets the path or url of image which will show.

Vspace=Sets the verticle spacing.

Alt=Means alternative text. If image will not shown then this text will be show at place of image. This is used for giving the alternate text of image. This text will show on browser window if image not shown. This tag is very useful if we are validating the html. If we validate text then it is also very helpful in SEO ranking.

Align
=It sets the alignment of image.

Create Hyperlink on image=We can create hyperlink with <a> tag.

Example:


<a href="http://www.xpode.com" target=_blank>
<img align= src="goodmorning.gif" height="100px"
width="200px" dynsrc=demo.aspx alt="Good Morning" />
</a>

Share this article   |    Print    |    Article read by 3372 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles: No related article
Related Interview Questions: No related interview question