Clear Both ini berfungsi untuk tidak mengizinkannya suatu elemen menggunakan float left atau right. jadi ketika ada permintaan untuk float left atau right maka elemen yang diberi clear both tidak akan menjalankan float tersebut. saya akan contoh kan seperti code di bawah ini :
<!DOCTYPE html>
<html>
<head>
<style>
img {
float: left;
}
p.clear {
clear: both;
}
</style>
</head>
<body>
<img src="logocss.gif" width="95" height="84">
<p>This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.</p>
<p class="clear">This is also some text. This is also some text. This is also some text. This is also some text. This is also some text. This is also some text.</p>
</body>
</html>