When I try to add a <br>
tag after table and open it using winforms control WebBrowser.
<!DOCTYPE HTML><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" align="left" width="100%"> <tbody>
<tr>
<td style="background:#ffb900;padding:5pt 2pt 5pt 2pt"></td>
<td width="100%" cellpadding="7px 6px 7px 15px" style="background:#fff8e5;padding:5pt 4pt 5pt 12pt;word-wrap:break-word">
<div style="color:#222222;"><span style="color:#222; font-weight:bold;">Caution:</span> Test caution here.
</div>
</td>
</tr>
</tbody>
</table>
<br>
<div>
<p>Test string here.</p>
</div>
</body>
</html>
It seems that it doesn't insert single line breaks in the text.
But it works in Edge and Chrome.
Why?
I know there are some workarounds to handle this issue, such as "add doube <br>
after table"
</table>
<br>
<br>
<div>
or remove align="left"
<table border="0" cellspacing="0" cellpadding="0" width="100%">
However,is there any way to solve this problem once and for all? Instead of manually modifying each html file.
` next to it. – Reza Aghaei Jan 29 '23 at 13:52
](https://html.spec.whatwg.org/dev/semantics.html#the-br-element) tag does not use and does not need a closing slash and never has in any HTML specification. – Rob Jan 29 '23 at 14:32
` element is inserted into the markup. However, a '
` element is a **line break** and you have no textual lines. So a break is inserted of zero height as expected. – Rob Jan 29 '23 at 14:36
` however `/` is not mandatory. But in general it's an off-topic discussion for this thread. It doesn't have anything to do with the issue, or the solution. Further reading for the OP or anyone who is interested: https://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br – Reza Aghaei Jan 29 '23 at 14:53