This forum is now read-only. Please use our new forums at discuss.codecademy.com.

HTML Basics Forum

View Course

165 points
Picture
Submitted by
Nicole
over 4 years ago

Is the closing "/" necessary in tags that close themselves (like the image tag)?

<img src="http://i1061.photobucket.com/albums/t480/ericqweinstein/f3a16fb6.jpg" />

I've tried using this code without a closing slash and it's worked just fine. I've never learned to use a slash here; is this necessary?


0 votes

permalink

It's only necessary if you want your HTML to be XHTML-compliant – if you don't know what that is, you probably shouldn't bother. Browsers won't care.

3117 points
Picture
Submitted by
Alex J
over 4 years ago