Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome, Firefox adding extra <br>

When I click view source, the HTML on my page is

View Source

but the page has a big gap above the table. When I Ctrl-Shift-I or view the source code in Chrome or Firefox's developer tools the HTML is

Developer Tools

How could both browsers' view source be different than the source in the developer tools? Where are those <br>s from and how do I remove them?

Searching for <br> in the "view source" page says there are no instances in the HTML.

like image 750
MarkF Avatar asked Feb 08 '23 12:02

MarkF


1 Answers

Good suggestions. Disabling all chrome extensions didn't work and there isn't any javascript that adds
's.

It turns out the HTML had <br /><br /> between the table rows:

<tr></tr>
<br /><br />
<tr></tr>

so the browsers must have rendered them before the table and changed them to <br>.

like image 90
MarkF Avatar answered Feb 17 '23 11:02

MarkF