Images in HTML

Before Display images in browers it is an important to know that images play an important role in creating attractive website and gain more and more traffic in minimum time. So try to use images in attractive way to gain traffic.For images the   img   element tells the browser, “Place an image here.” It is totally up to that you can place an image element right in the flow of the text at the point where you want the image to appear, as in the following example. Images stay in the flow of text and do not cause any line breaks

The syntax showing image:


 <img src="img/bg-img/gallery1.jpg  alt="html-images"  /> 

 <img src="img/bg-img/gallery2.jpg  alt="html-images"  /> 

 <img src="img/bg-img/gallery3.jpg  alt="html-images"  /> 

Images are shown below.

html_images
html_images
html_images

src and alt attribute

As in above example there were two attribute used "src" and "alt". src attribute is used to fretch the url of image to locate the image when we put it in between the "img" tag. While "alt" attribute is stands for alternate.If some time our image is not display due to some reasons like slow network or heavy image etc.Then it creates problem for the to understand about that.Heres come the solution called attribute which is displayed at the place of image. It also has great importance in you seo score.So do't forget to use alt attribute.

link through image

<a href="html-14.php"><img src="img/core-img/favicon.ico" alt="favicon"> < /a>
Click on this image. favicon

Explaination of image linking.

To make an image a link, simply put the img element in the anchor element. Sometime on some social sites or anywhere you see some logo,when you click on that they redirect you to some targeted post.Actually they are link on the back of image.They are very important and very used in html.







The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.


add