Paragraph Alignment

Description

We can control the text alignment of a paragraph with the following three classes.

Example


<!DOCTYPE HTML>
<html> 
<head> 
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--   w  ww .  j av a 2s.co  m-->
<body style='margin:20px;'>

    <p class="text-left">Left aligned text.</p>
    <p class="text-center">Center aligned text.</p>
    <p class="text-right">Right aligned text.</p>
        
</body>
</html>

Click to view the demo





















Home »
  Bootstrap »
    Tutorial »




Bootstrap
Basic HTML Style
List
Table