Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Placing Radio Buttons Inline</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="m-4"> <h3 class="mb-4">Default Placement of Radio Buttons</h3> <div class="row"> <div class="col-12"> <div class="form-check mb-3"> <input type="radio" class="form-check-input" name="gender" id="radioMale" checked> <label class="form-check-label" for="radioMale">Male</label> </div> <div class="form-check"> <input type="radio" class="form-check-input" name="gender" id="radioFemale"> <label class="form-check-label" for="radioFemale">Female</label> </div> </div> </div> <hr> <h3 class="mb-4">Inline Placement of Radio Buttons</h3> <div class="row"> <div class="col-12"> <div class="form-check form-check-inline"> <input type="radio" class="form-check-input" name="gender" id="radioMale" checked> <label class="form-check-label" for="radioMale">Male</label> </div> <div class="form-check form-check-inline ms-3"> <input type="radio" class="form-check-input" name="gender" id="radioFemale"> <label class="form-check-label" for="radioFemale">Female</label> </div> </div> </div> </div> </body> </html>