Welcome to WebmasterWorld Guest from 23.20.53.150

Forum Moderators: incrediBILL

Message Too Old, No Replies

What is the <br /> tag?

     
10:43 am on Jun 4, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Mar 30, 2006
posts:333
votes: 0


I have seen this is a couple of websites recently and it means nothing to me. I searched google and found nothing on it.

What on earth does the <br /> tag do or mean?

10:49 am on June 4, 2006 (gmt 0)

New User

10+ Year Member

joined:Feb 1, 2006
posts:32
votes: 0


It breaks the line. If you put <br />
then your text will go to the next line down.
10:58 am on June 4, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 13, 2004
posts:1425
votes: 0


That's what the <br> tag does, without the slash, it forces a line break.

Is there any difference between <br> and <br/> though? -Larry

11:01 am on June 4, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 29, 2003
posts:944
votes: 0


<br> is not valid xhtml.

<br /> is.

It only matters if you are using xhtml

[edited by: abbeyvet at 11:02 am (utc) on June 4, 2006]

11:01 am on June 4, 2006 (gmt 0)

New User

10+ Year Member

joined:Feb 1, 2006
posts:32
votes: 0


"That's what the <br> tag does, without the slash, it forces a line break.

Is there any difference between <br> and <br/> though? -Larry"

No, none.

11:03 am on June 4, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 13, 2004
posts:1425
votes: 0


I use <br> a lot. I'll just leave out the slash, a useless extra byte of bandwidth then.
2:09 pm on June 4, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Mar 30, 2006
posts:333
votes: 0


Ah that clear it up then. Im not using xhtml so <br> is the only thing I use.
12:21 pm on June 5, 2006 (gmt 0)

New User

10+ Year Member

joined:June 5, 2006
posts:2
votes: 0


Yes <br> and <br/> are the same when using plain HTML. For simplicity I just use <br>.

Lidija Turkovic

8:10 pm on June 6, 2006 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 5, 2006
posts:3383
votes: 36


Personally I try to future proof all my code so as I edit or create new pages I try and close all tags and make sure all tags are lower case.
11:10 am on June 20, 2006 (gmt 0)

New User

10+ Year Member

joined:Mar 13, 2006
posts:16
votes: 0


You can also look at it from the other side.

<br> is correct html 4.01
<br/> is not

So futureproofing isn't doing a lot of good.

If and when you go to XHTML just search and replace all <br> to <br/>