Leakbali
w3 Tutorial, Web Tutorial
Register   Login
Share

HTML The <img> Tag and the Src Attribute 


In HTML, images are defined with the <img> tag.

The <img> tag is empty, which means that it contains attributes only, and has no closing tag.

To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display.

Syntax for defining an image:

<img src="url" alt="some_text" />
The URL points to the location where the image is stored. An image named "boat.gif", located in the "images" directory on "www.leakbali.com" has the URL: http://www.leakbali.com/images/tutor/kuta.jpg.

The browser displays the image where the <img> tag occurs in the document.
More Tutorial
  1. HTML - Images
  2. HTML - HTML The <img> Tag and the Src Attribute
  3. HTML - The Alt Attribute
  4. HTML - Useful Tip

References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References