1

I can't find a convincing answer for this. Is it wrong in terms of semantic HTML? SEO unfriendly? Accessibility?

A lot of WYSIWYG editors use it. I think it is a good way to add some extra space between paragraphs, like you do when you're writing a document and want to express 'extra differentiation' between 2 specific paragraphs. Of course you can do that with CSS, but you need to add extra classes like so:

<p class="extra-space">
  Some text
</p>
<p>
  Other topic
</p>

I'm sure this is not a problem for screen readers. And semantics … why an 'empty paragraph' has not a valid meaning by itself?

9
  • You don't necessarily need a class, you can use the style attribute.
    – Jako
    Commented Feb 6, 2014 at 16:59
  • 1
    Why adding an extra class is such a "big hassle" (opening up future styling and scripting possibilities), and adding a meaningless empty paragraph is "so comfortable"? Really, I don't get it...
    – kapa
    Commented Feb 6, 2014 at 17:07
  • 1
    Oh and one more thing. Why an 'empty paragraph' has not a valid meaning by itself? Because it is like a house without walls :). Simply loses its meaning.
    – kapa
    Commented Feb 6, 2014 at 17:09
  • 2
    @Jako The style attribute is also something to avoid, it puts style info right into the HTML, so it's the same violation Merguez suggested (or worse).
    – Jav Rok
    Commented Feb 6, 2014 at 17:55
  • 1
    @kapa I guess you're right, a wall-less house is worse than an extra class :)
    – Jav Rok
    Commented Feb 6, 2014 at 17:56

2 Answers 2

9

It's because an empty paragraph is not a paragraph at all. A paragraph is defined as "A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea." (by Wikipedia)

From a typographic point-of-view there are other elements that help seperating content in a more semantic way. If the next paragraph is so important you maybe want to add a heading in front of it.

You also violate the rules of seperating content and design. It's just not a good idea. Think of a blog you're writing. If you do something like that, you're typographic appearance may become totally inconsistent because sometimes you use 2 empty paragraphs, sometimes none. It's just not a good idea to mix content and appearance.

2
  • That was quite convincing. What other more semantic elements are there to separate?
    – Jav Rok
    Commented Feb 6, 2014 at 17:58
  • @JavRok As i mentioned you can use headlines, you could use an image to insert some context, and most likely for your usecase would be the hr element, which in HTML 5 stands for paragraph-level thematic break (W3C) Commented Feb 6, 2014 at 18:13
1

It is wrong in terms of semantics because these semantics define a way to properly "Talk" to the machine. Although it displays fine, it is can become an issue when you need some automated process.

To put it in another perspective, lets say you have a recipe, that works well when you tell it to someone. At some point you are writing down the recipe for an automated robot.

Instead of writing "Add ice cream in the blender" you are writing "Add I scream in the blender"

When you hear it, it is the same. When someone reads it, and can correct the mistake, is fine. What about when the robot reads it ?

Not the answer you're looking for? Browse other questions tagged or ask your own question.