Right Align Text in Bootstrap framework

We have text aligned left by default. If you are using Twitter's Bootstrap Framework and want to align text right then you must make use of class="text-right" in the element that contains the text.

text aligned right
text aligned right

Let's have a look at an example :

<!DOCTYPE html>
<html lang="en">
  <title>Bootstrap : Text Align Right</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<div class="container">
<p class="text-right" style="padding:20px">Text aligned right</p>