MyBB Community Forums

Full Version: The difference between <br> and <br />
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The difference between <br> and <br />

I know that <br> is a line break and doesnt need an end tag but in the templates I notice <br /> often. Is that also a line break, if so what one should I use?
<br> does the same thing as <br />

However, <br> is not XHTML valid while <br /> is. It is preferred that you use <br />
OK great thanks for that, so I should always use <br /> instead of <br>
Yes sir that's right Smile
<br> is the old html tag. <br /> is xhtml.
And why you have the / at the end is because xhtml is actually xml format and needs to close the tags. It will display the same in the browser, just not pretty code for the xhtml standard.