As <span>
is an inline element and <p>
is a block element I cannot understand how nesting a <p>
element inside a <span>
element will result with a block element. Here is my example:
div {
background-color: cyan;
border: solid;
}
p {
border: solid;
}
<div>
<span><p>STACK OVERFLOW</p> </span>
<span><p>STACK OVERFLOW</p></span>
<span><p>STACK OVERFLOW</p></span>
</div>