homepage Welcome to WebmasterWorld Guest from 54.227.20.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
What is the <br /> tag?
Rightz

5+ Year Member



 
Msg#: 12284 posted 10:43 am on Jun 4, 2006 (gmt 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?

 

Acekicker

5+ Year Member



 
Msg#: 12284 posted 10:49 am on Jun 4, 2006 (gmt 0)

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

larryhatch

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 12284 posted 10:58 am on Jun 4, 2006 (gmt 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

abbeyvet

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 12284 posted 11:01 am on Jun 4, 2006 (gmt 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]

Acekicker

5+ Year Member



 
Msg#: 12284 posted 11:01 am on Jun 4, 2006 (gmt 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.

larryhatch

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 12284 posted 11:03 am on Jun 4, 2006 (gmt 0)

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

Rightz

5+ Year Member



 
Msg#: 12284 posted 2:09 pm on Jun 4, 2006 (gmt 0)

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

dddddd

5+ Year Member



 
Msg#: 12284 posted 12:21 pm on Jun 5, 2006 (gmt 0)

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

Lidija Turkovic

piatkow

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



 
Msg#: 12284 posted 8:10 pm on Jun 6, 2006 (gmt 0)

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

5+ Year Member



 
Msg#: 12284 posted 11:10 am on Jun 20, 2006 (gmt 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/>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved