...

View Full Version : whats the difference between <br> and <br />



rlemon
07-11-2005, 06:27 PM
I know it's better to use <br />

but why exactly is that?

I know it's a dumb question, but no one has ever really explained it to me.

Ranger56
07-11-2005, 06:38 PM
<br /> is just the way to close a <br> tag in XHTML so it is valid.

Grant Palin
07-11-2005, 06:39 PM
The first is from HTML, the second is the XHTML version. Use the second if you're writing XHTML-compliant code. You can even use it in HTML-compliant code without problems, I believe.

rlemon
07-11-2005, 06:39 PM
Yeah I asked someone online after I posted. I figured it was something like that.
Thanks!

[m] at
07-11-2005, 09:08 PM
With any tags that don't have a closing tag, you should include a slash. It makes your code easier to read and understand.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum