Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS floating</title> <style> div { width: 200px; padding: 10px; } div.red { float: left; background: #ff0000; } div.green { float: right; background: #00ff00; } </style> </head> <body> <div class="red">Floated to left.</div> <div class="green">Floated to right.</div> </body> </html>