DEV Community

programmerabhi
programmerabhi

Posted on

margin and code awkward behavior

What is happening here, it seems as if all the words are in a single line.

Because this is not the case with div etc.

This is happening only with the code tag

<!DOCTYPE html>





Page Title

<br>
.ex{<br>
border-left:5px solid green;<br>
}<br>
code{<br>
margin: 20px;</p>
<div class="highlight"><pre class="highlight plaintext"><code> }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="ex"&gt;
&lt;code&gt;
what happens here &lt;br&gt;
whatever why not happening here &lt;br&gt;
whatever why not happening here &lt;br&gt;
whatever why not happening here &lt;br&gt;
whatever why not happening here &lt;br&gt;
&amp;lt;/code&amp;gt;
  &amp;lt;/div&amp;gt;

&lt;/body&gt;
</code></pre></div>
<p></html></p>

Top comments (0)