<p>This is the first paragraph.</p> <p>This is the second paragraph.</p>
The <p> tag creates a block of text separated by space from other blocks. So two paragraphs show as two blocks with space between.
The <p> tag is the standard HTML element for paragraphs. <div> and <section> are container elements, <span> is inline.
<p>This is a paragraph. Another paragraph without closing the first.</p>
Without closing the first <p>, the browser treats the text of the second paragraph as part of the first paragraph, merging them into one block.
Using <p> tags helps screen readers identify paragraphs, improving accessibility.
p {
margin-top: 1rem;
margin-bottom: 2rem;
}Each paragraph has 1rem top and 2rem bottom margin. Between two paragraphs, the bottom margin of the first (2rem) and top margin of the second (1rem) collapse to the maximum of 2rem.
