How to add a picture? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to add a picture?

In html, how can i add a picture.

9th Sep 2022, 1:38 AM
Arian Roy
Arian Roy - avatar
9 Answers
9th Sep 2022, 1:44 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 3
Arian Roy you really need a host service such as google dropbox or an outter service such as imgbb.com .. Once hosted then transfer the url to the image tag per what Prashanth Kumar mentioned. https://code.sololearn.com/WW6t4B73kJVz/?ref=app https://code.sololearn.com/Wy3lrXNwGsgJ/?ref=app
9th Sep 2022, 1:53 AM
BroFar
BroFar - avatar
+ 3
For sololearn, I don't think you can add pictures directly. Just go to: 1.postimages.org 2. Upload the image you want to use there 3.copy the DIRECT LINK 4. Then paste it in your img tag. <img src="the direct link you copied" alt="a girl">
10th Sep 2022, 2:42 PM
Ekundayo Oluwapelumi Esther
Ekundayo Oluwapelumi Esther - avatar
+ 1
First, tou must find some pictures on google then copy link of picture and paste in img tag😁
10th Sep 2022, 1:01 PM
Mohammad Esmaeil Tajik
Mohammad Esmaeil Tajik - avatar
+ 1
OK, here is image tag thet you use to insert image on your website: <img height="" width="" src="" alt=""/>. You have to type width and height in their attributes' values and be careful! It should be the same size as your image is, then put the src value must be your image name on your computer. Be careful the image and your HTML file have to be on the same file. And type alt's value the name of image because if somebody's browser doesn't support it'll show the alt's value. Like this: My image width and height is 100. Its name is nature.jpg. <img height="100" width="100" src="nature.jpg" alt="nature_image"/>
10th Sep 2022, 7:55 PM
Muhammad Barzan Rahmati
0
<IMG src="theimagefile" alt="theimageinfo/name">
9th Sep 2022, 8:20 PM
komolafe Samuel
komolafe Samuel - avatar
0
You can also add width and height into the tag up there👆🏻 and measure them with "px" or percentage
9th Sep 2022, 8:21 PM
komolafe Samuel
komolafe Samuel - avatar
0
Background image or just an image for one part of div?
10th Sep 2022, 6:36 AM
Micheal Whensu
Micheal Whensu - avatar
0
Just add img tag in your code and give the address of the image you want to add...
10th Sep 2022, 1:15 PM
1223-CO-Vaibhavi Jagtap.