Complete the code to update the Bootstrap 4 class to Bootstrap 5 for responsive containers.
<div class="container[1]"> Content here </div>
container-fluid which is always full-width.container-responsive.In Bootstrap 5, new responsive container classes like container-sm provide fluid width below the sm breakpoint and container max-width above. This is a key new feature.
Complete the code to replace the Bootstrap 4 class .form-group with the Bootstrap 5 equivalent.
<div class="[1]"> <label for="inputEmail">Email address</label> <input type="email" class="form-control" id="inputEmail"> </div>
.form-group which is removed in Bootstrap 5..form-row which is for grid layout, not spacing.Bootstrap 5 removed .form-group. Instead, spacing utilities like .mb-3 are used to add margin below form elements.
Fix the error in the Bootstrap 5 navbar code by replacing the deprecated class.
<nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="#">Brand</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav"> <li class="nav-item active"> <a class="nav-link" [1]="page" href="#">Home</a> </li> </ul> </div> </nav>
.sr-only class which is removed in Bootstrap 5.aria-hidden.Bootstrap 5 replaces .sr-only with aria-current="page" for indicating the current page in navigation.
Fill both blanks to update the Bootstrap 4 grid classes to Bootstrap 5 syntax.
<div class="row"> <div class="col-[1]-6 col-[2]-4"> Content </div> </div>
Bootstrap 5 keeps the grid breakpoint names from Bootstrap 4: sm, md, lg, xl. Here, col-sm-6 and col-lg-4 are common responsive classes.
Fill the blanks to convert Bootstrap 4 button classes to Bootstrap 5 equivalents.
<button type="button" class="btn btn-[1] btn-[2]"> Click me </button>
btn-primary instead of btn-outline-primary for outlined style.Bootstrap 5 uses btn-outline-primary for outlined buttons. The size classes btn-lg and btn-sm remain the same.
