Problem with adding image
Hi, it would be useful if you gave more detail about what you’re trying to do.
The thing is that firstly you need to get the file path where your image is placed. It’s recommended that you open a folder and call it images . Then put your images inside that folder . Then create a parent folder which will have your HTML and CSS code inside . Moreso note that you must have the images folder inside the parent folder. Then inside your HTML write the following code.
The final . extention depends on the kind of image it might be png or .jpeg . Svg anyone…
@starlordflash I think that might be confusing to our fellow coder here.
@Big_ben07 The image has to be located in some place so that anyone trying to see it will do it, and that’s online, not on your computer. There are many hosting sites, I use imgur. You upload your image there and then you’ll have the address of the image you uploaded some place beside the image. For example, https://myimage/imgur.com (only an example, this doesn’t exist).
So now to the code. In the html section of your code write:
<img id="happy-cat" src="https://myimage/imgur.com">This is the image of a happy cat</img>
img stands for image, the id is useful if you’re going to do something in the css section of your code (in a html page that’s between
</style>), src means source and that’s where the address you copied from the storing site goes. There are other considerations but the basic is here.
Remember to close your image code with
Hope it helps and happy coding!
yeah thats is actually true . @Big_ben07 I hope you have fully understood it now.
incase you have any issues you can always reach out to us . we all are one big family and we are meant to help each others out.
try downloading the image into you pc instead of direct linking it from the web
@Kidhh Of course I meant that. Imgur is a hosting site and the address is just an example of how the resulting address looks like after uploading from your PC. Thanks anyway.