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 trial
Kyle Boyer
4,773 Points<br> autocorrects to <br />
I am using MS Visual Web Developer, and every time I type <br>, it auto-corrects to <br /> Does anyone know why this is? More importantly, is there any significant difference between the two?
1 Answer
Ara Hacobian
5,158 PointsIf your question is why the line break tag in your editor is "auto correcting" is because the template you're working off of or file you're opening and editing over is most probably using XHTML doctype rather than the HTML 4.01 Transitonal doctypes. Or the settings in your editor are set to follow XHTML standards. From what I know the line break with a space and a forward slash were used to be cross browser friendly and is better code semantically. I am not too familiar with previous doctypes used but since XHTML also uses XML markup any opening tag must have a closing tag. Which why the space and forward slash are added. Makes it W3C compliant and cross-browser friendly.
For better detailed info read here