tags:

views:

1915

answers:

8

break line tag is not working in firefox, neither in chrome. When i see the source of my page i get:

<p>Zugang zu Testaccount:</br></br>peter petrelli </br></br>sein Standardpwd.</br></br>peter.heroes.com</p>

However when i do view selected source, i get:

<p>Zugang zu Testaccount: peter petrelli  sein Standardpwd. peter.heroes.com</p>

It seems firefox is filtering break line tags out.

It works in IE7 fine.

A: 

It should just be <br>.

nsanders
<br> will work, but is a legacy tag. You should use <br/> instead.
pearcewg
Depends on your DTD (Document Type Definition), pearcewg. It's perfectly valid in HTML 4.01 for instance.
roosteronacid
+47  A: 

You're looking for <br /> instead of </br>

Self closing tags such as br have the slash at the end of the tag.

Here are the other self-closing tags in XHTML:

Jason Navarrete
+6  A: 

Maybe because the br tag should be:

<br/>

?

andyuk
A: 

You want <BR> or <BR />, not </BR>

moonshadow
You mean <br> or <br /> - the latest standards are to use lower case for tags.
Ken Ray
+2  A: 

That's because </br> is an invalid tag. What you want is <br />.

Dan
+5  A: 

It should be <br> or <br /> not </br>

curtisk
+4  A: 

IE7 is more forgiving of incorrect syntax in quirksmode.

Instead of <br> or </br> it should be <br />

Adam Kinney
+1  A: 


should probably be used only if you are writing XHTML. If you use validator.w3.org to validate the following as HTML 4.01:

<html>
<head>
<title></title>
</head>
<body>
<p>
<br />
</p>
</body>
</html>

This warning is generated:

Line 8, Column 3: NET-enabling start-tag requires SHORTTAG YES.

<br />

The sequence can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag '). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

Grant Wagner