HTML Images - Lesson 8

At this lesson we will talk about HTML images and their attributes

There are many kind of format of photoes today such as 'png', 'jpg' and so on, but differ from them HTML can take the screen all of them even the gifs with <img> tag.

<img /> need "src" attribute.

<img src="picture.jpg" /> picture.jpg - Full name of the picture

If we want to use picture which is in other folder we should point the way firstly to the folder and then to the picture.

<img src="images/picture.jpg" /> expansion is mandatory

images - It is the name of the folder. typing images/ is necessary to find a way

If you want to take picture from other website you should type image link in the "src".

<img src="picture_link" />

Also there is "alt" attribute.

If browser cann't see the picture it will take on the screen text what is written in the "alt"

 

<img src="picture_link" alt="text" />

you can use attribute Alt in any case weather you use photo from link or from folder.

If you want to give the image a link you should take <img> tag inside the <a> </a> tag.

<a href="image link"><img src="picture_link" alt="tree image" /></a>