WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Empty <P> Tags For Spacing

for

From: Christine Hogenkamp
Date: Feb 11, 2022 2:17PM


Hi all,

Just to share a web developer perspective that's not just about
accessibility, there is no reason any developer who codes properly should
be using empty paragraph tags just to provide spacing. There are more than
one ways to code spacing that are far better for the overall state of the
page than empty paragraph tags, whereas most instances of people using
paragraph tags like that come from people who don't know these better
techniques. Or they are using a CMS to generate code for them and the CMS
generates an empty paragraph tag every time they hit the Enter button -
again, not someone coding the page from a place of knowing how to format
the page code properly.

So I would recommend against using paragraph tags for spacing, to encourage
instead creating webpages with code that is not cluttered unnecessarily,
because those extra bits of code can easily become opportunities to
accidentally have a negative effect on the overall page structure aka the
DOM. Each webpage should be lean and neatly ordered, with exactly as much
code as needed to display the content in the correct logical reading order,
the same way we try to limit the payload for loading the page itself and
its linked resources.

And when it comes to PDFs, most of the empty paragraph tags I've seen came
about due to some sort of error when exporting the document - I am most
familiar with InDesign and that's one of the issues we are still actively
trying to reduce in our documents, most likely due to having design files
with an emphasis on complicated design instead of accessibility as the
priority. So again, if I saw a document littered with empty paragraph
tags, I would assume they were being done accidentally by someone who
doesn't know how to fix them.

In both cases, empty paragraph tags suggest a lack of expertise in the
medium being used. So it's just an easy way to avoid looking
unprofessional, I know it's sometimes hard to get rid of empty paragraph
tags in PDF documents but definitely don't go out of your way to add them
in LOL

*x*
*Christine Hogenkamp (She, Her)*
Front-end Developer
ContextCreative.com <http://contextcreative.com/>;

*20 years of purposeful creativity*
* ˟**˟*