WebAIM - Web Accessibility In Mind

E-mail List Archives

Empty tags (divs, p and strong) in the code?

for

From: Rabab Gomaa
Date: Aug 17, 2012 9:56AM


Hello,

I am wondering if using empty tags can cause any accessibility failures.
Example:
- <div class="hrline">&nbsp;</div>
This class is used to have a decorative horizontal line.

- <strong></strong>
- <p>&#160;</p>
This is sometimes a miss during markup.

I searched in the archived and found an older post about empty anchors http://webaim.org/discussion/mail_thread?thread=5172 but my question is about divs, p and strong elements with or without spaces like &nbsp;.

Thank you,
Rabab