Insert image to HTML


#1

how do i insert an image to HTML through atom?


#2

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


#3

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" />

#4

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!


#5

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


#6

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.


#7

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