float:left
- will cause each floated element to move as far left on the page as it can -- until it bumps against another element.
float:right
- does the same, but elements line up to the right
clear:left
- apply this property to the next element after an element that has been floated left so that the element will move below the floated element
clear:right
- does the same, but for elements that have been floated right
clear:left
to paragraph eight and clear:right
to paragraph nine?← click the button when you are done editing<!DOCTYPE html> <html> <head> <title>CSS Float Property</title> <style> p { margin: 5px; border-style: solid; } .left { float: left; background-color: lightblue; } .right { float: right; background-color: lightgreen; } </style> </head> <body> <p class="left">one</p> <p class="left">two</p> <p class="left">three</p> <p class="right" style="clear:left">four</p> <p class="right">five</p> <p class="right">six</p> <p style="clear:right">seven</p> <p>eight</p> <p>nine</p> </body> </html>