Reputation: 559
I am using <br />
and its working correctly in chrome and IE as expected but in firefox the result is weird. When i saw the code in firefox, its replacing the <br />
with <br ></br>
.
I also read somewhere that the alternative syntax <br></br>
allowed by XML gives uncertain results in many existing user agents.
If I replace <br />
with <br>
, its works fine in chrome and IE but firefox again replaces it with <br ></br>
and gives extra margin.
what's the fix for this problem in firefox?
Upvotes: 3
Views: 921
Reputation: 21089
Putting
<html>
<body>
<div>This is<br />a test</div>
</body>
</html>
in a text file with the "html" extension, opening the file in Firefox, and checking the source view showed <br />
as expected. Firefox only shows <br ></br>
when using the Inspector view, as far as I can tell, which is likely a result of standardizing how tags are displayed in that view as using <br>
instead of <br />
also produces <br ></br>
in it.
Upvotes: 1