If you are limited to not using CSS, what you could do is use a single paragraph and separate it with a single line break.
So:
<p>primeiro parágrafo<br>segundo parágrafo</p>
Result:
first paragraph
second paragraph
In contrast, using CSS, we have the following: The whole browser adds its own style rules to the common elements. Google Chrome, for example, defines these rules:
p {
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
}
Firefox does this:
p {
margin-top: 16px;
margin-bottom: 16px;
}
Visually the effect is the same: add a margin to the <p>
element. The simplest and most portable way among different browsers is to use normalize.css
. It contains rules for undoing the default rules of all browsers and leaving the style unique. Use this:
<link rel="stylesheet" href="http://necolas.github.io/normalize.css/3.0.1/normalize.css">
Alternatively, you can zero all the margin shapes of the element with this rule:
<style>
p {
margin: 0;
}
</style>
Or applied like this:
<p style="margin: 0;">primeiro parágrafo</p>
<p style="margin: 0;">segundo parágrafo</p>