Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Align Text on the Left and Button on the Right in Bootstrap</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script> <style> .bs-example{ margin: 20px; } </style> </head> <body> <div class="bs-example"> <div class="bg-light clearfix"> <span>Click any button to proceed</span> <button type="button" class="btn btn-warning float-right ml-2">Save</button> <button type="button" class="btn btn-primary float-right">Cancel</button> </div> </div> </body> </html>