I have encountered an issue where my code does not contain any br tags between the beginning of the div tag and table tag, but when I view the source, several br elements appear.
Below is the code snippet from a .php file:
<div id='tx_addAccountpopup_frame' style = "height: 100px" class='txPopupFrame'>
<table class="addNewTable" id = "table" >
<tr><td align="left" class="spaceUnder"><label for='clearingAccount'>Clearing Acct</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "clearingAccount" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='tposAlloc'>Tpos Alloc</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "tposAlloc" style="text-transform: uppercase" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='tposPortfolio'>Tpos Portfolio</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "tposPortfolio" style="text-transform: uppercase" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='tposGroup'>Tpos Group</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "tposGroup" style="text-transform: uppercase" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='serverCode'>Server Code</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "serverCode" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='clearingFirm'>Clearing Firm</label></td><td align = "right" class="spaceUnder"><select id = "clearingFirm" style="text-transform: uppercase" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='vtk'>VTK</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "vtk" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='clearingAllocAccount'>Clearing Alloc</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "clearingAllocAccount" style="text-transform: uppercase" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='portfolioDesc'>Portfolio Desc</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "portfolioDesc" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='groupDescription'>Group Desc</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "groupDescription" class="txAddNewField"></td></tr><br>
<tr><td align="left" class="spaceUnder"><label for='masterDescription'>Master Desc</label></td><td align = "right" class="spaceUnder"><input type = "text" id = "masterDescription" class="txAddNewField"></td></tr><br>
</table>
<button id = "submitNewAccount" onclick ="txSubmitNewAccount()"class = "txDefender_PermissionAddRecordButton" type = "button" width ="100" height="30">Submit</button>
</div>
Upon inspecting the source in Google Chrome dev tools, extra br tags can be seen added in:
<div id="tx_addUserpopup_frame" class="txPopupFrame">
<br><br><br><br><br><br><table class="addNewTable" id="table" cellspacing="10">
</table>
<button id="submitNewUser" onclick="txSubmitNewUser()" class="txDefender_PermissionAddRecordButton" type="button" width="100" height="30">Submit</button>
</div>
What could potentially cause this issue? How can it be resolved or prevented in the future?