float and clear

Float

The float property moves an element to the left or right of the container.

On this page, the w3schools and Higher logos have been floated to the right.

Display element on the left:

.sideimage {
    float: left;
}

Display element on the right:

.sideimage {
    float: right;
} 

Floating Multiple Elements

Floating several elements one after another will result in the elements being display beside each other.

This can be seen at the top of the page where the w3schools and Higher logo are beside each other.

 

Clear

After floating elements, it may be necessary to move to a blank line below them before displaying further elements.

.startunderneath {
    clear: both;
}