Bootstrap Text Color

by Abhishek 27-Aug-16

0 1100


Bootstrap contextual color classes used for color class used. like: .text-primary, .text-success, .text-info, text-warning, text-muted. These default colors use for highlight any text for success, primary, information, warning, muted as well.

No need to type text color names for update the format, just use bootstrap default classes for this. For more understand copy and paste below example code and see the result.

Example:

<!DOCTYPE html>
<html>
<head>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>

<body>
<div class="container">

<p class="text-primary"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempor varius lacus, vitae feugiat dolor sagittis vitae. </p>
<p class="text-success"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempor varius lacus, vitae feugiat dolor sagittis vitae. </p>
<p class="text-info"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempor varius lacus, vitae feugiat dolor sagittis vitae. </p>
<p class="text-danger"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempor varius lacus, vitae feugiat dolor sagittis vitae. </p>
<p class="text-warning"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempor varius lacus, vitae feugiat dolor sagittis vitae. </p>
<p class="text-muted"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempor varius lacus, vitae feugiat dolor sagittis vitae. </p>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"> </script>
</body>

</html>

Result:

Bootstrap Text Color


Share:


Comments

    Waiting for your comments

Leave a Reply