"clear" has three options: clear:left; clear:right; and clear:both; When you use clear:left, if you have any elements floated left before it, it will go under it instead of wrapping around it. clear:right does the same thing, but for elements floated right, and clear:both clears both left and right floated elements.
Use of the HTML Div Tag is to layout your page. And Both mean in <div style=â€clear:both;â€></div> is No floating elements allowed on either the left or the right side. It can be used to clear the CSS float within a layout.
<div id="div1" style="float:left;"></div> <div id="div2" style="float:right;"></div> <div id="div3" style="clear:both;"></div> In this example, div3 will be under div1 and div2 (the floated elements) instead of trying to wrap around them, because it uses clear:both; If it didn't have clear:both; it would try and wrap around the first 2 divs.