Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

clear in br is obsolete

edited August 2014 in Future

The clear attribute on the br element is obsolete in HTML5.

I found eight occurrences of:

    <br clear="both" />

How do we change it?

For now I've used:

<div style="clear:both;">&nbsp;</div>

Comments

  • I think <br style="clear: both" /> also works. I thought about adding a generic .clear{ clear:both; } to the CSS and using <div class="clear"></div> or <br class="clear" />, but it seemed unnecessary when the former is so short already.

  • Oh yes, it works anyway. I just wanted to avoid W3C validation errors. Thanks.

Sign In or Register to comment.