Reputation: 78106
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.
Upvotes: 13
Views: 91217
Reputation: 1086
For me CSS
was an issue.
For this tag display: none;
was used so <br>
tag was not rendering.
Upvotes: 0
Reputation: 313
It’s not </br>
, it’s <br>
or <br />.
So, this doesn’t work as expected:
<!doctype html>
<html>
<head>
<title></title>
</head>
<body>
<p>
Some text... </br>
Some more text...
</p>
More content...
</body>
</html>
But this works:
<!doctype html>
<html>
<head>
<title></title>
</head>
<body>
<p>
Some text... <br>
Some more text... <br />
</p>
More content...
</body>
</html>
Upvotes: 0
Reputation: 1149
If you are trying to put space between two divs and <br/>
is not working then insert this code (between the divs) to get the <br/>
tag working.
<div class="clear"></div>
and add
.clear {
clear: both;
}
in your css file.
Upvotes: 16
Reputation: 25931
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.
Upvotes: 1
Reputation: 7521
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:
Upvotes: 67
Reputation: 1075
IE7 is more forgiving of incorrect syntax in quirksmode.
Instead of <br>
or </br>
it should be <br />
Upvotes: 6