Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS float property</title> <style> p { width: 150px; padding: 50px 0; text-align: center; } p.red { float: left; background: #ff0000; } p.green { float: right; background: #00ff00; } </style> </head> <body> <p class="red">Float Left</p> <p class="green">Float Right</p> </body> </html>