How to Define Float and Clear in CSS?

float-

This property is used to specify that an element should be placed along the left or right side of its container, where text and inline elements will wrap around it. We can set this property to left, right, none (default).

Ex: –

img { float: left;}

clear-

This property is used to specify whether an element can be next to floating elements that precede it or must be moved down (cleared) below them. We can set this property to left, right, both, none (default).

Ex:-

p { clear: left;}

Tagged : / / /