Line break syntax

Thread Solved

Join Date: Sep 2007
Posts: 38
Reputation: BigFormat is an unknown quantity at this point 
Solved Threads: 0
BigFormat BigFormat is offline Offline
Light Poster

Line break syntax

 
0
  #1
Jun 6th, 2009
It's not a lot more than curiosity,
which is the difference between <br> and <br /> ?

I see both of them widely used and abused, are they completely interchangeable ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Line break syntax

 
0
  #2
Jun 6th, 2009
This <br> tag is best used in HTML format using( .html extension ) and this <br /> tag goes with XHTML (or .xhtml saved document ).
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 73
Reputation: pspwxp fan is an unknown quantity at this point 
Solved Threads: 6
pspwxp fan pspwxp fan is offline Offline
Junior Poster in Training

Re: Line break syntax

 
0
  #3
Jun 6th, 2009
Originally Posted by BigFormat View Post
It's not a lot more than curiosity,
which is the difference between <br> and <br /> ?

I see both of them widely used and abused, are they completely interchangeable ?
<br/> is used in XHTML which is a much stricter form of html .
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 38
Reputation: BigFormat is an unknown quantity at this point 
Solved Threads: 0
BigFormat BigFormat is offline Offline
Light Poster

Re: Line break syntax

 
0
  #4
Jun 6th, 2009
So in any case there are no cons using <br/> instead of <br> even in "simple" HTML ?
<br/> is the same withot space btw 'r' and '/' ?
Last edited by BigFormat; Jun 6th, 2009 at 8:30 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Line break syntax

 
0
  #5
Jun 6th, 2009
<br/> <!-- or --> <br /> it doesn't matter as long as you are using it with the correct doctype.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 38
Reputation: BigFormat is an unknown quantity at this point 
Solved Threads: 0
BigFormat BigFormat is offline Offline
Light Poster

Re: Line break syntax

 
0
  #6
Jun 6th, 2009
Originally Posted by essential View Post
<br/> <!-- or --> <br /> it doesn't matter as long as you are using it with the correct doctype.
I don't get it, can you please show me with an example the relation to the doctype?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Line break syntax

 
0
  #7
Jun 6th, 2009
This < LINK > will provide you brief information about doctypes.
Last edited by essential; Jun 6th, 2009 at 10:57 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Line break syntax

 
0
  #8
Jun 8th, 2009
The space is there in <br /> to make the self-closing tags compatible with IE 6 and earlier. IE renders it wrong without the space.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 302
Reputation: sreein1986 is an unknown quantity at this point 
Solved Threads: 33
sreein1986's Avatar
sreein1986 sreein1986 is offline Offline
Posting Whiz

Re: Line break syntax

 
0
  #9
Jun 10th, 2009
the main difference between <br > and <br /> is <br> is used html earlier versions and <br /> is used in the latest version like the below tags also

HTML and CSS Syntax (Toggle Plain Text)
  1. <img src="" > ------------- <img src="" />
  2. <b> </b>---------------- <strong> </strong>
  3. <i> -------------- <em> </em>
Last edited by sreein1986; Jun 10th, 2009 at 5:30 am.
Thanx,
Shiriyal

http://shiriyal.blogspot.com/
if you problem solved add me as a reputation and mark it mark as solved
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 38
Reputation: BigFormat is an unknown quantity at this point 
Solved Threads: 0
BigFormat BigFormat is offline Offline
Light Poster

Re: Line break syntax

 
0
  #10
Jun 12th, 2009
Ok, so it's definitely better to use <br /> in any case from my pov...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC