<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Responsive Text Alignment</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"> <p class="text-sm-center">Up to and including small size (sm) viewports, content will be centered.</p> <p class="text-md-center">For medium-sized (md) viewports and larger, content will be centered.</p> <p class="text-lg-center">In large viewports (lg) and larger, content will be centered aligned.</p> <p class="text-xl-center">In extra-large (xl) viewports and larger, content will be center aligned.</p> <div class="my-3"><strong>Note:</strong> To learn the how Bootstrap responsive textual alignments functions, view the result in a new empty tab by clicking the arrow next to the "Show Results" button. Next, resize the browser window.</div> </div> </body> </html>