Getting Extra Space between Paragraphs in HTML


How To Get Extra Space between Paragraphs?



By default, browsers will give a predefined white space between two paragraphs. But if you want some extra white space between two paragraphs, you can enter an extra paragraph with a   entity.

Note that a true empty paragraph will not give any extra white space. See the following tutorial XHTML document:

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  <title>Extra Space between Paragraphs</title>
  <p>Row, row, row your boat,
  Gently down the stream.</p>
  <p>Merrily, merrily, merrily, merrily,
  Life is but a dream.</p>
  <p>Frère Jacques, Frère Jacques, 
  Dormez vous? Dormez vous?
  Sonnez les matines, Sonnez les matines,
  Din, din, don! Din, din, don!</p>

If you save the above document as space.html, and view it with Internet Explorer, you will see that the empty paragraph gives no extra white space. But the paragraph with a &nbsp; entity does give the extra white space you wanted as shown below:

HTML p Element - Empty Paragraphs
HTML p Element - Empty Paragraphs


Incorrect HTML 'p' Elements

Highlight Part of a Paragraph in HTML

HTML Body Tag and Block Level Tags

⇑⇑ HTML Tutorials

2023-08-03, 1094🔥, 0💬