user2957214 user2957214 - 7 months ago 6
HTML Question

how to remove line breaks for a block element

How can I remove the line-breaks before and after the

<p>
element? I tried to use span instead of
<p>
. But what I wanted was a box with a height larger than the text I supply inside it with a particular background color. With span, I think this is not possible. If it is possible, or if there are any other suggestions, please help me.

Answer
p {
  display: inline-block;
}

this should help

Comments