Help guys please... I'am struggling with the <img/> tag...i can't seem to have a clear idea on putting a pic on my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Help guys please... I'am struggling with the <img/> tag...i can't seem to have a clear idea on putting a pic on my code

4th Nov 2017, 9:47 AM
Samaritan Artificial Intelligence
Samaritan Artificial Intelligence - avatar
4 Answers
+ 10
Here's an example that may help you.. <img src="test.png" height ="100" width="100" alt="missing"/> here src is the link of your image. You need to use a correct link. alt is the text showed if the image can't be displayed.
4th Nov 2017, 9:55 AM
Md. Nafis Ul Haque Shifat
Md. Nafis Ul Haque Shifat - avatar
+ 4
Thanks @MD and to you too Abdul... @Abdul...are using HTML bro...but dankie..
4th Nov 2017, 3:17 PM
Samaritan Artificial Intelligence
Samaritan Artificial Intelligence - avatar
+ 1
<img src="test.png" height ="100px" width="100px" alt="missing" /> you can use px or % in size of your image. and if the image is in different folder from your index.html(your html document) you have to specify the location. check this --> https://www.w3schools.com/hTml/html_filepaths.asp
5th Nov 2017, 6:53 AM
kopiko
kopiko - avatar
0
The above code is alright but if you are using php you may use isset function to check if the image is selected. name field in image tag is img. if(isset($_POST['img']) { //steps to be taken after the image is set. }
4th Nov 2017, 2:13 PM
ABDUL MANAN
ABDUL MANAN - avatar