single-post.html

What happens to empty paragraphs?

Question: Sometimes I see empty parapgraphs in my templates and template parts. Are these displayed on the front end?

Answer: Yes, they are. The HTML is included in the page, but it may not always be visible. The easiest way to delete one is to select it then use the Delete key.

Note: There are some dynamic blocks which don’t display any output at all when there is no content for them.

The paragraph block is not a dynamic block.

Example

A block before an empty paragraph.

Another block after an empty paragraph.

A paragraph before another paragraph

Another paragraph. No empty paragraph.

Custom CSS to give each paragraph a dotted red border and a bit of padding.p { border: 1px dotted red; padding-bottom: 3px; }

WordPress version: 5.7.2

Gutenberg version: 10.8.0

© Copyright Herb Miller, Bobbing Wide 2021