HTML insert Image/Picture

E-mail Print PDF

( 2 Votes )
User Rating: / 2
PoorBest 
Insert Image / Picture

The <img> tag defines an image in an HTML page.

The <img> tag has two required attributes: src and alt.
src = Source of the Picture (for example: http://w3schools.com/images/compatible_chrome.gif)
alt = Image Description

Note: Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.

<img src="/angry.gif" alt="Angry face" />  


Tip: To link an image to another document, simply nest the <img> tag inside <a> tags.


<a href="/mysite.html"><img src="/angry.gif" width="160" height="34" border="0" alt="MySite"></a>


width = The Width of the Picture in px (pixels)
height = The Height of the Picture in px (pixels)






 

joomla counter