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 trialGianluca Maio
9,128 PointsWay to self-close the tags
Shouldn't the self-closing tags have a backslash char before the closing bracket? Like this:
<img src="PATH" alt"" />
I am aware that it is a requirement of an XHTML well-structured document. Does this mean that this rule has been dropped in HTML5?
2 Answers
Joseph Zimmerman
6,402 PointsYes, you can get away with leaving the / off your self closing tags.
Bryce Santos
11,157 PointsYep, so basically both
<br>
is acceptable and
<br />
works as well in HTML5