<img> tag

27 Jan 2009, dilip Comments: | Views: 344 | | Category: Html tags

Click On the Stars to Rate:
  • Currently 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>This is the title of Your Page </title>

</head>

<body>

<img src="http://dilipkumar.in/images/badrinath1.jpg" alt="Badrinath" >

write any thing here ..blah .. blah... it will be displayed in your webpage

</body>

</html>

 


Copy paste the above code in your favourite editor(either a simple notepas or Macromedia dreamweaver) and save as... something.html . And open the file with your browser. If you are connected to internet the image of Badrinath will be diplayed in our browser. And you place mouse on the Image, the text "Badrinath" Will be displayed. Just a look at the above img tag will make everything clear.. the following image explains some attributes of img tag.


 



Image Tag



The attributes of image tag are explained below....


  • src - The source of the image, here some clarification the source can be related to the document like ../images/dilip.jpg or related to site like http://dilipkumar.in/images/dilip.jpg !!! The same implies to the href attribute of anchor. If you have any doubts please discuss in our forums

  • alt - alt attribute is important because it tells visitor about image.. it can be anything relatd to image. When someone diasbles images in their browser, this text will be shown. Also helps search engines

  • width and height - attributes they take values in pixles like width="90 px" height = "90 px" it tells the browser the dimensions, if dimensions are not told, orginal image sizes will be displayed.

  • align- this attribute how the image will be aligned with respect to its text contents like 'center' 'right' 'left'


For Discussing more on image tag please visit our forums

        Subscribe RSS Feed Of Our Blog
Comments: 1

Web Designing Home Page

Related Articles

Web Design » Html tags

<DIV>.... </DIV> Tag - Generic Block Container.
<H1>...</H1> The Heading Level One
<table>
<img> tag
<a> anchor Tag

Share This Page

Catch All World Cup Action ,Videos of Highlights, Live Score

RSS Feed

 Subscribe Our RSS Feed

 

Follow dilipkumar_in on Twitter

 

Random Link