How can I remove spaces between paragraphs in HTML?
<p class="first">This is a small demo</p> <p class="second">This is second demo</p> You can use margin: 0; to remove the spaces.
p { margin: 0; } If this still don't work, try making it !important
p { margin: 0 !important; } Check this http://jsfiddle.net/zg7fP/1/
Try setting margin-bottom: 0 on the top paragraph and margin-top: 0 to the bottom paragraph
or you can use a div instead of the paragraph
There are a range of "m-x" classes you can add to paragraph elements where x (0+) represent integers driving increasing space between paragraphs:
For example, this will have no space between the paragraphs:
<p class="m-0">hello world</p> <p class="m-0">hello world</p> For example, this will have a bit more:
<p class="m-1">hello world</p> <p class="m-1">hello world</p> For example, this will have yet more:
<p class="m-2">hello world</p> <p class="m-2">hello world</p> And so on...