Insert image to HTML


how do i insert an image to HTML through atom?


create an <img> element and set the src to the location of the image


A clearer way to say it is this:

<img src="randomimagelol.png">

If you find the image is unusable, then simply put the alt attribute:

<img src="randomimagelol.png" alt="a random image xd">

D’oh! I forgot, put a slash too:

<img src="randomimagelol.png" alt="a random image xd" />


It’s like something like this. You can also add width and height along with an alt.

<img src=“anyimage.png” width=“200” height=“200” alt=“The Image You Choose” />

I hope that helps!


Thanks all ::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes:


Thanks. I was finding it difficult to link up the image and get it to open in HTML. i realized you had to embed them all in same folder.


No problem, Chukwubuikem! Don’t forget it ends with a slash and this >!