Click to See Complete Forum and Search --> : <br />? lol
Daniel T
01-14-2004, 09:37 PM
hey i wuz wondering wut a <br /> tag is. that probly sounded really really dumb, but i have never used a <br /> tag in any of my html. i have used <br> tags, tho. r they the same thing?
plz no1 laugh:( lol
-Dan
Read all about it:
http://forums.webdeveloper.com/showthread.php?s=&threadid=24331
Daniel T
01-14-2004, 09:49 PM
thanx again pyro:D
PittsburghRed
01-15-2004, 06:28 PM
I believe the tag <br/> is XHTML. Same as <BR> in HTML
Which is exactly what the thread I linked to above told him. ;)
Ben Rogers
01-17-2004, 12:12 AM
<br /> is what should be used because it closes the tag, but <br> works the same and doesnt close the tag. But both create a line break.
spufi
01-17-2004, 12:44 AM
Originally posted by omega
<br /> is what should be used because it closes the tag, but <br> works the same and doesnt close the tag. But both create a line break.
Not really. As previously stated, <br /> is just the XHTML version of <br>. In both cases the tag is closed because it's an empty tag.
<br></br> is valid in XHTML, Mozilla, Netscape and Amaya display it correctly.
IE doesn't :mad:
When XHTML2 arrives <br /> will be replaced by <l> (http://www.w3.org/TR/xhtml2/mod-inline-text.html#sec_9.7.)
Why would you want to use <br></br> over <br /> anyway, Fang?
Never probably, I was just looking into it's validity.
In html (http://www.w3.org/TR/REC-html40/struct/text.html#h-9.3.2) the end tag is forbidden: use <br> or <br />
In xhtml1 (http://www.w3.org/TR/xhtml1/#C_2) the end tag is allowed: use <br /> or <br></br> (not recomended)
In xhtml2 it will be replaced.
If you add a br element with the DOM it apparently inserts a <br>.
So are the browsers inserting not validating elements for xhtml?
Ben Rogers
01-18-2004, 02:45 PM
Hey, does that mean if I want to stay valid (other than geo****ty's ad code) I have to change all my <br />'s to <|>? It won't take long, most of my breaks are handled by display: block, but still....
Any other replacements?
Daniel T
01-18-2004, 02:51 PM
no, omega, they wouldnt make u do that to remain valid(at least, i hope not). that would cause tons of problems all over the net. they are just providing a simpler way to rite the tag.
-Dan
fredmv
01-18-2004, 02:51 PM
Originally posted by omega
I have to change all my <br />'s to <|>?No. That's only if you use an XHTML 2.0 DOCTYPE, which you most likely aren't as it isn't really even used yet. Also note that it isn't <|>, it's <l> (an "l" for "line").Originally posted by omega
most of my breaks are handled by display: block, but still....Bad idea. There are already elements intended for that.Originally posted by omega
Any other replacements?How about some other block-level elements such as <p> and <div>?
Ben Rogers
01-18-2004, 05:35 PM
No, you misunderstand how I use display: block. If you go to my site (see sig for url) then you'll know what I mean.
Also, I meant are there any other tags to be changed.