[Solved] Text inline after h3


By default, both h3 and p are “block elements”. That means they make space above and below to ensure they are the only thing on a given line (technically, they “fill their parent element” horizontally). Using CSS, this behavior can be overridden by applying the rule display:inline to both properties. See the example below.

You can read more about block-level elements on the Mozilla Developer’s Network here.

h3, p { display:inline }
<div>
    <H3>asdfsadfasd</H3> <p>afadsfadsf</p>
</div>

2

solved Text inline after h3