Container for checkboxes in Bootstrap

BootstrapWeb DevelopmentCSS Framework

Add checkbox to a web page with Bootstrap, using the .checkbox class in Bootstrap

You can try to run the following code to set container for checkboxes −

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "container">
         <h2>Programming Survey</h2>
         <p>Which programming languages do you like?</p>
         <form>
            <div class = "checkbox">
               <label><input type = "checkbox" value = " ">Java</label>
            </div>
            <div class = "checkbox">
               <label><input type = "checkbox" value="">C++</label>
            </div>
            <div class = "checkbox">
               <label><input type = "checkbox" value="">C</label>
            </div>
         </form>
      </div>
   </body>
</html>
raja
Published on 21-Jun-2018 12:17:08
Advertisements