DEV Community

programmerabhi
programmerabhi

Posted on

1

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)

Warp.dev image

Warp is the highest-rated coding agent—proven by benchmarks.

Warp outperforms every other coding agent on the market, and gives you full control over which model you use. Get started now for free, or upgrade and unlock 2.5x AI credits on Warp's paid plans.

Download Warp

👋 Kindness is contagious

Discover fresh viewpoints in this insightful post, supported by our vibrant DEV Community. Every developer’s experience matters—add your thoughts and help us grow together.

A simple “thank you” can uplift the author and spark new discussions—leave yours below!

On DEV, knowledge-sharing connects us and drives innovation. Found this useful? A quick note of appreciation makes a real impact.

Okay