Posts

Showing posts from June, 2018

Why img tag is not working? Here are five basic errors.

Image
Sometimes, the image not displaying in the browser. there are many basic errors is, the source of image, like, we write img attribute " scr " instead of  "src". Image tag -      <img src="foldername/imagename.jpg" width="100%" height="100%">. In short, there are few possible errors why the browser can't find the image. 1. The image is in one folder up from the HTML document. So, in this case, the image tag should be used like this -      <img src="../foldername/Imagename.jpg" width="100%" height="100%">. 2. We forget to write extension with image and sometimes write the wrong extension like -     src="foldername/imagename.png" .     instead of     src="foldername/imagename.jpg". 3. The image path is not correct because we forget to write slash and folder name.          Incorrect code -       <img src="imagename" width="100%"  ...