Welcome to WebmasterWorld Guest from 54.196.238.210

Forum Moderators: incrediBILL

Message Too Old, No Replies

What is the <br /> tag?

     

Rightz

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

5+ Year Member



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?

Acekicker

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

5+ Year Member



It breaks the line. If you put <br />
then your text will go to the next line down.

larryhatch

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

WebmasterWorld Senior Member 10+ Year Member



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

abbeyvet

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

WebmasterWorld Senior Member 10+ Year Member



<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]

Acekicker

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

5+ Year Member



"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.

larryhatch

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

WebmasterWorld Senior Member 10+ Year Member



I use <br> a lot. I'll just leave out the slash, a useless extra byte of bandwidth then.

Rightz

2:09 pm on Jun 4, 2006 (gmt 0)

5+ Year Member



Ah that clear it up then. Im not using xhtml so <br> is the only thing I use.

dddddd

12:21 pm on Jun 5, 2006 (gmt 0)

5+ Year Member



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

Lidija Turkovic

piatkow

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

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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.

SonjaD

11:10 am on Jun 20, 2006 (gmt 0)

5+ Year Member



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/>

 

Featured Threads

Hot Threads This Week

Hot Threads This Month