DEV Community

loading...

margin and code awkward behavior

programmerabhi
i am student of Msc CS. Currently working on many project like blog writing , app making etc
・1 min read

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>

Discussion (0)