Articles → BOOTSTRAP → Background Color Classes In Bootstrap

Background Color Classes In Bootstrap






Example




<!DOCTYPE html>
<html lang="en">
   <head>
      <title>Bootstrap Example</title>
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
   </head>
   <body>
      <div class="container">
         <p class="bg-primary">Paragraph for bg-primary class</p>
         <p class="bg-success">Paragraph for bg-success class</p>
         <p class="bg-info">Paragraph for bg-info class</p>
         <p class="bg-warning">Paragraph for bg-warning class</p>
         <p class="bg-danger">Paragraph for bg-danger class</p>
      </div>
   </body>
</html>



Output


Picture showing the output of the Background color classes in Bootstrap
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, September 3, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250