Potentially stupid but most likely easy question

I am finding

<img src="whatever/whatever.jpg" />

and

<img src="whatever/whatever.jpg">

both works. but which one is the correct one w/the “/” or without it?
thank you all.
D

It depends on your doctype, the first one is for a XHTML doctype and the second is for an HTML.

Thank you, I didn’t know that.
I am finding both on this html page, not sure if it would be best to leave them all alone, is there an opinion or bkm on this?
Thx
d

You will get errors if you run your page through a validator but I do not think it will effect the page. Personally I would change them and it should not take long with a copy and paste.

Thank you Rubble.
D