Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to add a image in html?

+6 votes
asked Mar 21, 2020 by Ashrith Annamreddy (410 points)

1 Answer

+4 votes
answered Mar 22, 2020 by GULLY GAMER (540 points)
selected Apr 7, 2020 by Ashrith Annamreddy
 
Best answer
<img src="location of image with file name and extension of image also" width=100 height=400>
commented Mar 24, 2020 by Jude Hommel (100 points)
you should usually only use width or only use height otherwise you will have a squashed or stretched picture
commented Apr 13, 2020 by Ashrith Annamreddy (410 points)
What about the attribute alt?
commented Oct 2, 2020 by MrRodin (100 points)
Always use an alt tag -- this is good practice for accessibility.   
Question - I am having issues uploading images into my project on OnlineGDB and then linking to those images -- any suggestions?
I can link to web-based images by using the URL - but want to be able to add my own images to a project and put those in my webpage.
Suggestions?
commented Dec 9, 2023 by Alexander (100 points)
Thank you Jude Hommel
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...