Introduction to HTML

← Forum
141 pts

Nicole

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?

  • 3114 pts

    Alex J

    0 votes

    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.

Sign in to post to the forum.

Sign in