Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialthatguyhelps
Courses Plus Student 845 PointsClosing the Image tag
Correct me if I'm wrong, but shouldn't the image tag be closed like this:
<img />
If so, why wasn't it closed like this in the video?
1 Answer
krilnon
1,458 PointsSelf-closing tags, the syntactic style you used, were the norm in the XHTML days. In HTML5, I believe that most people consider the implicitly-self-closing tag style <img> to be preferable. Browsers are okay with either, although I'm not sure off of the top of my head whether or not XHTML-style self-closing tags are now deprecated... I still use them.
thatguyhelps
Courses Plus Student 845 Pointsthatguyhelps
Courses Plus Student 845 PointsOkay, that makes sense. I greatly appreciate the response. Thank you!