If I have this
.outer {
font-size: 2em;
}
<div class="outer">
Some Outer Div Text
<div class="inner">
Some Inner Div Text
</div>
</div>
Both texts are 32px (16px *2)
However with this HTML:
<p class="outer">
Some Outer Div Text
<p class="inner">
Some Inner Div Text
</p>
</p>
The outer text is 32px, while the inner text is 16px.
How come the paragraph tag doesn't respect the parent's font-size like the div tag? I thought they would both work the same since they are both block elements?
Here's a JSFiddle in case I'm not clear: https://jsfiddle.net/scottfwalter/2Lrd6tzm/