Bootstrap col-md-6 Class

 

.row class create a row and then under that row create the columns class named .col-md-6 used to create the two columns in a row. Similarly col-sm, col-lg, col-xs can also be used according to requirement.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bootstrap Grid Example</title> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"> </script> </head> <body> <div> <div class="row"> <div class="col-md-6" style="background-color:yellow;">col-md-6</div> <div class="col-md-6" style="background-color:pink;">col-md-6</div> </div> </div> </body> </html>
Output