We are making an effort to enhance the semantics of our HTML, and one element that stands out in our code related to presentation is
<div class="clear"></div>
For instance, if we consider the following semantic HTML structure:
<div class="widgetRow">
<div class="headerInfo">My header info</div>
<div class="widgetPricing">$20 to $30</div>
<div class="footerInfo">My footer info</div>
</div>
In this scenario, both headerInfo and footerInfo are floated left via CSS, while widgetPricing is floated right (just as an illustration).
The Query:
The widgetRow div currently lacks any defined height or width. Would it be appropriate to insert
<div class="clear"></div>
immediately after .footerInfo? It appears that this approach might compromise the semantic hierarchy at that point.
A Broader Perspective:
While striving for semantic HTML, should we include a div element in our markup solely for the purpose of clearing floats?